diff --git a/library.properties b/library.properties index c63e22b..2baa241 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SBNetwork -version=1.0.4 +version=1.1.0 author=Schullebernd,schullebernd@googlemail.com maintainer=Schullebernd,schullebernd@googlemail.com sentence=Build simple master/client networks with nRF24L01 transmitter. diff --git a/src/Device.cpp b/src/Device.cpp deleted file mode 100644 index 6012e6b..0000000 --- a/src/Device.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "SBDevice.h" - -SBMasterStorage SBMasterStorage::initialize() { - SBMasterStorage storage; -#if defined(ESP8266) - EEPROM.begin(SB_NETWORK_FLASH_SIZE); -#endif - EEPROM.get(0 + sizeof(SBNetworkDevice), storage); - if (storage.ID[0] != 'M' || storage.ID[1] != 'S') { - // We have to create a new one - storage.ID[0] = 'M'; - storage.ID[1] = 'S'; - Serial.println("Creating new Master Storage"); - EEPROM.put(0 + sizeof(SBNetworkDevice), storage); -#if defined(ESP8266) - EEPROM.commit(); - EEPROM.end(); -#endif - } - return storage; -} - -void SBMasterStorage::save() { -#if defined(ESP8266) - EEPROM.begin(SB_NETWORK_FLASH_SIZE); -#endif - EEPROM.put(sizeof(SBNetworkDevice), *this); -#if defined(ESP8266) - EEPROM.commit(); - EEPROM.end(); -#endif -} \ No newline at end of file