From be539e59932c7627cf91e3709082fbc709ce8a7d Mon Sep 17 00:00:00 2001 From: Red-The-Hunter <62763030+Red-The-Hunter@users.noreply.github.com> Date: Sat, 28 Mar 2020 12:12:22 +0800 Subject: [PATCH] Update stopwatch.js -Swapped functions of BN1 and BN3 --- apps/swatch/stopwatch.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/swatch/stopwatch.js b/apps/swatch/stopwatch.js index ac1cc0d5b..73cf0adfc 100644 --- a/apps/swatch/stopwatch.js +++ b/apps/swatch/stopwatch.js @@ -18,8 +18,8 @@ function updateLabels() { g.setFont("6x8",2); g.setFontAlign(0,0,3); g.drawString(started?"STOP":"GO",230,120); - if (!started) g.drawString("RESET",230,50); - g.drawString(started?"LAP":"SAVE",230,190); + if (!started) g.drawString("RESET",230,190); + g.drawString(started?"LAP":"SAVE",230,50); g.setFont("6x8",1); g.setFontAlign(-1,-1); for (var i in lapTimes) { @@ -78,14 +78,6 @@ setWatch(function() { // Start/stop drawms(); }, 20); }, BTN2, {repeat:true}); -setWatch(function() { // Reset - Bangle.beep(); - if (!started) { - tStart = tCurrent = Date.now(); - } - lapTimes = []; - updateLabels(); -}, BTN1, {repeat:true}); setWatch(function() { // Lap Bangle.beep(); if (started) tCurrent = Date.now(); @@ -98,6 +90,14 @@ setWatch(function() { // Lap require("Storage").writeJSON("StpWch-"+timenow.toString(), saveTimes); } updateLabels(); +}, BTN1, {repeat:true}); +setWatch(function() { // Reset + Bangle.beep(); + if (!started) { + tStart = tCurrent = Date.now(); + } + lapTimes = []; + updateLabels(); }, BTN3, {repeat:true}); updateLabels();