From ca16b7e225a8681f134494f212e48fe13da44abf Mon Sep 17 00:00:00 2001 From: xxDUxx <96152564+xxDUxx@users.noreply.github.com> Date: Wed, 3 Aug 2022 08:07:06 +0200 Subject: [PATCH] Update widalt.wid.js --- apps/widalt/widalt.wid.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/widalt/widalt.wid.js b/apps/widalt/widalt.wid.js index 23b1d3427..72f889748 100644 --- a/apps/widalt/widalt.wid.js +++ b/apps/widalt/widalt.wid.js @@ -1,12 +1,9 @@ (()=>{ var alt=""; - var lastDraw=0; var lastAlt=0; - var timer; Bangle.setBarometerPower(true,"widalt"); Bangle.on("pressure", (p)=>{ if (Math.floor(p.altitude)!=lastAlt) { - print("altitude changed!"); lastAlt=Math.floor(p.altitude); alt=p.altitude.toFixed(0); var w = WIDGETS["widalt"].width; @@ -15,13 +12,11 @@ else WIDGETS["widalt"].draw(); } Bangle.setBarometerPower(false,"widalt") - print("powering down"); - setTimeout(()=>{print("powering up");Bangle.setBarometerPower(true,"widalt");},5000); + setTimeout(()=>{Bangle.setBarometerPower(true,"widalt");},5000); }); function draw() { if (!Bangle.isLCDOn()) return; - print("drawing"); g.reset(); g.setColor(g.theme.bg); g.fillRect(this.x, this.y, this.x + this.width, this.y + 23);