From 2b3350c6e72dc62d8f2549c520096b061bec7979 Mon Sep 17 00:00:00 2001 From: Bertrand Lemasle Date: Wed, 5 Dec 2018 20:54:05 +1300 Subject: [PATCH] Changed some prints --- src/Config.cpp | 1 + src/MainUnit.cpp | 2 +- src/Positions.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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;