Skip to content

Commit fa5c249

Browse files
committed
Allow sleep durations of 1 day or longer
Previously, sleep durations "overflowed" at one day, resulting in a maximum sleep duration of 1 millisecond less than a day.
1 parent 892594a commit fa5c249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/samd/ArduinoLowPower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void ArduinoLowPowerClass::setAlarmIn(uint32_t millis) {
5656

5757
uint32_t now = rtc.getEpoch();
5858
rtc.setAlarmEpoch(now + millis/1000);
59-
rtc.enableAlarm(rtc.MATCH_HHMMSS);
59+
rtc.enableAlarm(rtc.MATCH_YYMMDDHHMMSS);
6060
}
6161

6262
void ArduinoLowPowerClass::attachInterruptWakeup(uint32_t pin, voidFuncPtr callback, uint32_t mode) {

0 commit comments

Comments
 (0)