Skip to content

Commit

Permalink
multitimer: readme update, remove dead code, restore sched
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrippling committed Jun 30, 2023
1 parent 8cf0782 commit b2e74d9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion apps/multitimer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
With this app, you can set timers and chronographs (stopwatches) and watch them count down/up in real time. You can also set alarms - swipe left or right to switch between the three functions.

"Hard mode" is also available for timers and alarms. It will double the number of buzz counts and you will have to swipe the screen five to eight times correctly - make a mistake, and you will need to start over.
"Oneshot" can be set on timers and alarms to have it delete itself once it's sounded (uses the "Delete after expiration" setting from the alarm app).
"Delete after expiration" can be set on a timer/alarm to have it delete itself once it's sounded (the same as the alarm app).

## WARNING
* Editing timers in another app (such as the default Alarm app) is not recommended. Editing alarms should not be a problem (in theory).
Expand Down
7 changes: 0 additions & 7 deletions apps/multitimer/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Bangle.loadWidgets();
Bangle.drawWidgets();

const triggercheck = `
eval(require("Storage").read("multitimer.ext.js"));
buzzCount *= 3;
startHM();
"skipPrompt"
`;

var R = Bangle.appRect;
var layer;
var drag;
Expand Down
10 changes: 5 additions & 5 deletions apps/multitimer/boot.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
const resetTimer = alarm => {
if (alarm.timer) alarm.timer = alarm.data.ot;
};
const resetTimer = alarm => {
if (alarm.timer) alarm.timer = alarm.data.ot;
};

Bangle.on("alarmSnooze", resetTimer);
Bangle.on("alarmDismiss", resetTimer);
Bangle.on("alarmSnooze", resetTimer);
Bangle.on("alarmDismiss", resetTimer);
}
1 change: 0 additions & 1 deletion apps/sched/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@
0.20: Alarm dismiss and snooze events
0.21: Fix crash in clock_info
0.22: Dated event repeat option
0.23: Allow alarms to run custom code (and disable the default prompt) when triggered
2 changes: 1 addition & 1 deletion apps/sched/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "sched",
"name": "Scheduler",
"version": "0.23",
"version": "0.22",
"description": "Scheduling library for alarms and timers",
"icon": "app.png",
"type": "scheduler",
Expand Down
4 changes: 0 additions & 4 deletions typescript/types/sched.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ declare module Sched {
js?: string,
data?: unknown,

// optional features
triggercheck?: string, // code that's eval'd when the alarm is triggered,
// may return "skipPrompt" to cancel the default behaviour

// set by sched
last?: number,
} & (
Expand Down

0 comments on commit b2e74d9

Please sign in to comment.