Commit Graph

9 Commits (53956667b8fb76387189b98fe5ab6c5b5d7ad4b4)

Author SHA1 Message Date
Erik Andresen 5e847a56fd sched: fix formatTime reference 2022-04-20 20:26:06 +02:00
Erik Andresen 8c048f321c Refactor some methods to scheduling library 2022-04-20 19:32:23 +02:00
Alessandro Cocco b0a43413c8 [Scheduler] Export new functions
- newDefaultAlarm
- newDefaultTimer
- get/setSettings
2022-04-20 14:35:50 +02:00
storm64 c4b7c798d2 sched: Ensure dow wrap, Sa(6)+1 = Su(0) 2022-04-09 14:46:08 +02:00
storm64 9ab2fcdf31 sched: `getTimeToAlarm` check next dow if t<now
Fix undefined output of `getTimeToAlarm` on an alarm that is already in the past to check for the next dow instead of the actual dow.
>> add +1 to time.getDay() if alarm.t < currentTime
2022-04-08 21:24:24 +02:00
storm64 2c729af68c sched: Fix `getTimeToAlarm` for timers
Only set `last` for alarms to prevent a wrong output of `getTimeToAlarm` for a timer already used at same day.
2022-04-07 19:47:45 +02:00
Gordon Williams 67facc692d fix https://github.com/espruino/BangleApps/issues/1555#issuecomment-1087784581 2022-04-05 10:59:13 +01:00
Gordon Williams 25aafe1ccf more refactoring to try and reduce code duplication 2022-04-04 16:58:17 +01:00
Gordon Williams 5c84ec9e2c Refactored alarm into separate 'sched' library/app 2022-04-04 15:49:45 +01:00