diff --git a/src/Config.cpp b/src/Config.cpp index 933f326..dfac240 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -19,6 +19,7 @@ namespace config { hardware::i2c::powerOn(); hardware::i2c::eeprom.readBlock(CONFIG_ADDR, value); + print(); if (CONFIG_SEED != value.seed) reset(); //todo : reset network if seed for network is not right hardware::i2c::powerOff(); diff --git a/src/MainUnit.cpp b/src/MainUnit.cpp index 369322d..37b51df 100644 --- a/src/MainUnit.cpp +++ b/src/MainUnit.cpp @@ -42,7 +42,7 @@ namespace mainunit { void deepSleep(uint16_t seconds) { #define CURRENT_LOGGER_FUNCTION "deepSleep" - NOTICE_FORMAT("%d seconds", seconds); + NOTICE_FORMAT("%ds", seconds); interruptIn(seconds); details::prepareSleep(); diff --git a/src/Positions.cpp b/src/Positions.cpp index 8221475..67aca18 100644 --- a/src/Positions.cpp +++ b/src/Positions.cpp @@ -112,12 +112,12 @@ namespace positions { entryIndex = config->lastEntry + 1; entryAddress = details::getEntryAddress(entryIndex); + print(entryIndex, entry); hardware::i2c::powerOn(); hardware::i2c::eeprom.writeBlock(entryAddress, entry); NOTICE_MSG("Saved"); - print(entryIndex, entry); config->lastEntry++; if (config->lastEntry > details::maxEntryIndex) config->lastEntry = 0;