From 465673bd567cf43d793675196a932638818297e9 Mon Sep 17 00:00:00 2001 From: naden Date: Fri, 1 Mar 2024 21:32:08 +0100 Subject: [PATCH] Update app.js --- apps/regattatimer/app.js | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/apps/regattatimer/app.js b/apps/regattatimer/app.js index 87769ee0e..6ca0eaf68 100644 --- a/apps/regattatimer/app.js +++ b/apps/regattatimer/app.js @@ -90,7 +90,7 @@ function Regattatimer() { Bangle.setLCDPower(1); Bangle.setLCDTimeout(0); - /* + // in "idle", "start" or "stoped" mode, a button click (re)starts the countdown // in "race" mode, a button click stops the counter var onButtonClick = (function(ev) { @@ -116,35 +116,10 @@ function Regattatimer() { }).bind(this); setWatch(onButtonClick, BTN1, true); - */ - - setWatch(this.onButtonClick.binf(this), BTN1, true); this.setLayoutIdle(); }, - onButtonClick: function(ev) { - switch(this.mode) { - case "idle": - this.resetCounter(); - this.mode = "start"; - this.setLayoutStartMinSec(); - this.startCounter(); - this.interval = setInterval((function() { - this.startCounter(); - }).bind(this), 1000); - break; - case "stoped": - case "start": - this.resetCounter(); - this.setLayoutIdle(); - break; - case "race": - this.raceCounterStop(); - break; - } - }, - onGPS: function(fix) { if(this.mode == "race") { if(fix.fix && isFinite(fix.speed)) {