From f0aed4896a59026666d68e509a31579d41d9e319 Mon Sep 17 00:00:00 2001 From: ELIARENZONI <102217389+ELIARENZONI@users.noreply.github.com> Date: Wed, 30 Mar 2022 11:32:39 +0200 Subject: [PATCH] Delete My Denti --- apps/My Denti | 94 --------------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 apps/My Denti diff --git a/apps/My Denti b/apps/My Denti deleted file mode 100644 index 5a026893c..000000000 --- a/apps/My Denti +++ /dev/null @@ -1,94 +0,0 @@ -var counter = 30; -var counterInterval; -var img = Graphics.createImage(` - - ##### ##### - # ##### # - # # - # # - ## ## - ## ## - ## ## - # #### # - # # # # - # # # # - ## ## - ## ## -`); -var img1 = Graphics.createImage(` - - - ### # ##### ## #### -# # # # # # # -# # ### # # #### -# # # # # # # - ### #### ##### # # # # - - ##### ##### - # ##### # - # # - # # - ## ## - ## ## - ## ## - # #### # - # # # # - # # # # - ## ## - ## ## -`); - - -function outOfTime() { - if (counterInterval) return; - E.showMessage("Out of Time", "My Timer"); - Bangle.buzz(); - Bangle.beep(200, 4000) - .then(() => new Promise(resolve => setTimeout(resolve,200))) - .then(() => Bangle.beep(200, 3000)); - setTimeout(outOfTime, 10000); - g.setColor('#' + Math.floor(Math.random()*16777215).toString(16).padStart(6, '0')); -} - -function immagine(){ - g.drawImage(img1, 90, 20, {scale:2}); -} - -function countDown() { - g.setColor('#012345'); - counter--; - // Out of time - if (counter<=0) { - clearInterval(counterInterval); - counterInterval = undefined; - setWatch(startTimer, (process.env.HWVERSION==2) ? BTN1 : BTN2); - outOfTime(); - return; - } - g.clear(); - g.setFontAlign(0,0); // center font - g.setFont("Vector",80); // vector font, 80px - // draw the current counter value - g.drawImage(img, 90, 20, {scale:2}); - - g.drawString(counter,120,120); - g.drawLine(50,50,180,50); - g.drawLine(50,51,180,51); - g.drawLine(50,52,180,52); - // optional - this keeps the watch LCD lit up - Bangle.setLCDPower(1); - - if(counter<=5){ - immagine(); - } -} - - -function startTimer(){ - counter = 30; - countDown(); - if (!counterInterval) - counterInterval = setInterval(countDown, 1000); -} - -startTimer();