@@ -61,6 +61,8 @@ namespace core { | |||||
} | } | ||||
if (acquired) updateRtcTime(); | if (acquired) updateRtcTime(); | ||||
hardware::sim808::powerOff(); //forcing power off, regardless of the counts and current use | |||||
mainunit::deepSleep(sleepTime); | mainunit::deepSleep(sleepTime); | ||||
} | } | ||||
@@ -34,9 +34,10 @@ namespace mainunit { | |||||
} | } | ||||
void interruptIn(uint16_t seconds) { | void interruptIn(uint16_t seconds) { | ||||
rtc::setAlarm(seconds); | |||||
pinMode(RTC_WAKE, INPUT); | pinMode(RTC_WAKE, INPUT); | ||||
EIFR |= 1 << INTF1; //forcing interrupt clear as sometimes, it does not seems to work (1 second appart positions) | |||||
rtc::setAlarm(seconds); | |||||
attachInterrupt(digitalPinToInterrupt(RTC_WAKE), interrupt, FALLING); | attachInterrupt(digitalPinToInterrupt(RTC_WAKE), interrupt, FALLING); | ||||
} | } | ||||
@@ -3,7 +3,7 @@ | |||||
#define CONFIG_ADDR 0 ///< Address of the config block in the I2C EEPROM chip. | #define CONFIG_ADDR 0 ///< Address of the config block in the I2C EEPROM chip. | ||||
#define CONFIG_RESERVED_SIZE 128 ///< Reserved size for the config block in the I2C EEPROM chip. | #define CONFIG_RESERVED_SIZE 128 ///< Reserved size for the config block in the I2C EEPROM chip. | ||||
#define CONFIG_SEED 14 ///< Seed use to detect invalid or outdate configuration data. | #define CONFIG_SEED 14 ///< Seed use to detect invalid or outdate configuration data. | ||||
#define VERSION "1.42" /// Version string, only used for indicative purpose. | |||||
#define VERSION "1.43" /// Version string, only used for indicative purpose. | |||||
/** | /** | ||||