From 30b6763ee0bd8cc7a6d8b9e04e209f899a4f3c3f Mon Sep 17 00:00:00 2001 From: OmegaRogue Date: Wed, 13 Jan 2021 15:07:32 +0100 Subject: [PATCH] =?UTF-8?q?=E2=8F=AA=20(DANE)=20Revert=20Number=20display?= =?UTF-8?q?=20to=20button=20counter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert Number display to button counter as mentioned in #613 Signed-off-by: OmegaRogue --- apps/dane/app.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/dane/app.js b/apps/dane/app.js index 841ecdfeb..3663d92a1 100644 --- a/apps/dane/app.js +++ b/apps/dane/app.js @@ -67,7 +67,7 @@ function levelColor(l) { function drawBattery() { const l = E.getBattery(), c = levelColor(l); - count = l; + // count = l; const xl = 45 + l * (194 - 46) / 100; g.clearRect(46, 58 + 80 + yOffset + 37, 193, height - 5); g.setColor(c).fillRect(46, 58 + 80 + yOffset + 37, xl, height - 5); @@ -124,14 +124,14 @@ drawClock(); setWatch(Bangle.showLauncher, BTN2, {repeat: false, edge: "falling"}); -// setWatch(function () { -// count++; -// drawCounterText(); -// }, BTN1, {repeat: true, edge: "falling"}); -// setWatch(function () { -// count--; -// drawCounterText(); -// }, BTN3, {repeat: true, edge: "falling"}); +setWatch(function () { + count++; + drawCounterText(); +}, BTN1, {repeat: true, edge: "falling"}); +setWatch(function () { + count--; + drawCounterText(); +}, BTN3, {repeat: true, edge: "falling"}); // refesh every 100 milliseconds setInterval(updateClock, 500);