-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fix the issue where alarms set to go off at Midnight (on a daily or weekly basis) will fail and act as if the alarm is disabled. Note that the definition of "dtINVALID_TIME" changed (see below). The following changes have been made to TimeAlarms.cpp: -AlarmClass::updateNextTrigget(): Only rely on Mode.isEnabled to determine if enabled or not (no longer check value as it is redundent) -TimeAlarmsClass::enable(): Changed how a valid alarm is checked to allow for a value of 0 only on alarms that should accept it -TimeAlarmsClass::enable(): Now the alarm is disabled if we don't have safe conditions to enable it -TimeAlarmsClass::free(): When freeing an alarm, we set .onTickHandler to NULL to avoid confusion -TimeAlarmsClass::create(): Changed how a valid alarm is checked to allow for a value of 0 only on alarms that should accept it The following changes have been made to TimeAlarms.h: -Add macro: dtUseAbsoluteValue to simplify checking of the value parameter -dtINVALID_TIME: Change definition from 0 to (time_t)(-1) as now a value of 0 can be valid. Now the highest possible value is used. -move 'TimeAlarmsClass::free()' to the public portion of the class so we can always use it to properly free alarms.
- Loading branch information
Showing
2 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters