From 5e92ec24dfa354523a5973f1c8923943aaca11a5 Mon Sep 17 00:00:00 2001 From: Brendan Hubble Date: Tue, 22 Mar 2022 09:05:53 +1100 Subject: [PATCH] touchtimer: ADD ability to repeat the timer - By adding the REPEAT value at the end of buzzCount loop it allows for finshed to be shown for the full buzzCount before it changes the text to REPEAT --- apps/touchtimer/ChangeLog | 3 ++- apps/touchtimer/app.js | 7 +++++++ apps/touchtimer/metadata.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/touchtimer/ChangeLog b/apps/touchtimer/ChangeLog index 01904c6ea..fbabe6cb7 100644 --- a/apps/touchtimer/ChangeLog +++ b/apps/touchtimer/ChangeLog @@ -1,2 +1,3 @@ 0.01: Initial creation of the touch timer app -0.02: Add settings menu \ No newline at end of file +0.02: Add settings menu +0.03: Add ability to repeat last timer diff --git a/apps/touchtimer/app.js b/apps/touchtimer/app.js index ffa1af80a..61d3a08fd 100644 --- a/apps/touchtimer/app.js +++ b/apps/touchtimer/app.js @@ -141,6 +141,13 @@ var main = () => { if (buzzCount >= settings.buzzCount) { clearInterval(buzzIntervalId); buzzIntervalId = undefined; + + buttonStartPause.value = "REPEAT"; + buttonStartPause.draw(); + buttonStartPause.value = "START"; + timerCountDown = undefined; + timerEdit.draw(); + return; } else { Bangle.buzz(settings.buzzDuration * 1000, 1); diff --git a/apps/touchtimer/metadata.json b/apps/touchtimer/metadata.json index 645a0ce18..50c5f03dd 100644 --- a/apps/touchtimer/metadata.json +++ b/apps/touchtimer/metadata.json @@ -2,7 +2,7 @@ "id": "touchtimer", "name": "Touch Timer", "shortName": "Touch Timer", - "version": "0.02", + "version": "0.03", "description": "Quickly and easily create a timer with touch-only input. The time can be easily set with a number pad.", "icon": "app.png", "tags": "tools",