From 79dcbd7fd11608485694c6a1567892550e6fd7dc Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Wed, 30 Jul 2025 11:13:07 -0400 Subject: [PATCH] Remove outdated update changes --- apps/widsmartbatt/widget.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/widsmartbatt/widget.js b/apps/widsmartbatt/widget.js index 684890f96..e995cd298 100644 --- a/apps/widsmartbatt/widget.js +++ b/apps/widsmartbatt/widget.js @@ -1,7 +1,5 @@ (function(){ - - const intervalLow = 30000; // update interval when not charging - const intervalHigh = 30000; // faster update when charging + var showPercent = false; const width = 40; const height = 24; @@ -57,8 +55,7 @@ g.setFont('6x8'); g.drawString(txt, x + 14, y + 10); - if (Bangle.isCharging()) changeInterval(id, intervalHigh); - else changeInterval(id, intervalLow); + } WIDGETS["widsmartbatt"] = { area: "tr", @@ -80,6 +77,7 @@ if (w.x - oversize <= x && x < w.x + width + oversize && w.y - oversize <= y && y < w.y + height + oversize) { E.stopEventPropagation && E.stopEventPropagation(); + Bangle.buzz(20); showPercent = true; setTimeout(() => { showPercent = false; @@ -93,8 +91,8 @@ Bangle.on('charging', function () { WIDGETS["widsmartbatt"].draw(); }); - - var id = setInterval(() => WIDGETS["widsmartbatt"].draw(), intervalLow); + //draw once per minute... + var id = setInterval(() => WIDGETS["widsmartbatt"].draw(), 60000); })();