Closed per1234 closed 4 years ago
Previously, sleep durations "overflowed" at one day, resulting in a maximum sleep duration of 1 millisecond less than a day.
Demonstration sketch:
#include <ArduinoLowPower.h> void setup() { pinMode(LED_BUILTIN, OUTPUT); LowPower.sleep(24 * 60 * 60 * 1000); } void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(100); digitalWrite(LED_BUILTIN, LOW); delay(100); }
The expected behavior of the above code is the LED should start blinking after the sleep of 24 hours ends. With the current library code, the sleep ends, and LED starts blinking, immediately.
Fixes https://github.com/arduino-libraries/ArduinoLowPower/issues/22
Merging, thank you so much!
Previously, sleep durations "overflowed" at one day, resulting in a maximum sleep duration of 1 millisecond less than a day.
Demonstration sketch:
The expected behavior of the above code is the LED should start blinking after the sleep of 24 hours ends. With the current library code, the sleep ends, and LED starts blinking, immediately.
Fixes https://github.com/arduino-libraries/ArduinoLowPower/issues/22