Merge pull request #3620 from bobrippling/fix/alarm-clkinfo-enable

sched/clkinfo: reset `last` when activating an alarm
pull/3655/head
Rob Pilling 2024-11-11 12:08:56 +00:00 committed by GitHub
commit b6da9870f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -30,3 +30,4 @@
0.27: Tapping clkinfo enables/disables the selected alarm 0.27: Tapping clkinfo enables/disables the selected alarm
0.28: Added an icon for disabled events 0.28: Added an icon for disabled events
0.29: Improve clkinfo startup time by 10ms 0.29: Improve clkinfo startup time by 10ms
0.30: Fix possible bug in toggling an alarm to on, from clkinfo

View File

@ -127,6 +127,7 @@
run: function() { run: function() {
if (a.date) return; // ignore events if (a.date) return; // ignore events
a.on = !a.on; a.on = !a.on;
a.last = 0;
if(a.on && a.timer) require('sched').resetTimer(a); if(a.on && a.timer) require('sched').resetTimer(a);
this.emit("redraw"); this.emit("redraw");
require('sched').setAlarms(all); require('sched').setAlarms(all);

View File

@ -1,7 +1,7 @@
{ {
"id": "sched", "id": "sched",
"name": "Scheduler", "name": "Scheduler",
"version": "0.29", "version": "0.30",
"description": "Scheduling library for alarms and timers", "description": "Scheduling library for alarms and timers",
"icon": "app.png", "icon": "app.png",
"type": "scheduler", "type": "scheduler",