mirror of https://github.com/espruino/BangleApps
touchtimer: FIX countdown buzz to be in last 5 seconds
- The countdown buzz was happening on each minute and not only on the last 5 secondspull/1636/head
parent
e482707e89
commit
599f20aca9
|
@ -2,3 +2,4 @@
|
||||||
0.02: Add settings menu
|
0.02: Add settings menu
|
||||||
0.03: Add ability to repeat last timer
|
0.03: Add ability to repeat last timer
|
||||||
0.04: Add 5 second count down buzzer
|
0.04: Add 5 second count down buzzer
|
||||||
|
0.05: Fix 5 second count down buzzer to be only in the final 5 seconds
|
||||||
|
|
|
@ -129,7 +129,12 @@ var main = () => {
|
||||||
// Buzz lightly when there are less then 5 seconds left
|
// Buzz lightly when there are less then 5 seconds left
|
||||||
if (settings.countDownBuzz) {
|
if (settings.countDownBuzz) {
|
||||||
var remainingSeconds = timerCountDown.getAdjustedTime().seconds;
|
var remainingSeconds = timerCountDown.getAdjustedTime().seconds;
|
||||||
if (remainingSeconds <= 5 && remainingSeconds > 0) {
|
var remainingMinutes = timerCountDown.getAdjustedTime().minutes;
|
||||||
|
var remainingHours = timerCountDown.getAdjustedTime().hours;
|
||||||
|
if ( remainingSeconds <= 5
|
||||||
|
&& remainingSeconds > 0
|
||||||
|
&& remainingMinutes <= 0
|
||||||
|
&& remainingHours <= 0) {
|
||||||
Bangle.buzz();
|
Bangle.buzz();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "touchtimer",
|
"id": "touchtimer",
|
||||||
"name": "Touch Timer",
|
"name": "Touch Timer",
|
||||||
"shortName": "Touch Timer",
|
"shortName": "Touch Timer",
|
||||||
"version": "0.04",
|
"version": "0.05",
|
||||||
"description": "Quickly and easily create a timer with touch-only input. The time can be easily set with a number pad.",
|
"description": "Quickly and easily create a timer with touch-only input. The time can be easily set with a number pad.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tools",
|
"tags": "tools",
|
||||||
|
|
Loading…
Reference in New Issue