diff --git a/apps/bttfclock/ChangeLog b/apps/bttfclock/ChangeLog index cb16ec659c..2d7ac2abdf 100644 --- a/apps/bttfclock/ChangeLog +++ b/apps/bttfclock/ChangeLog @@ -1,2 +1,3 @@ 0.01: Back to the future clock first version. -0.02: Added more icons to the status field. Made it posible to custemize the step goal thrue the Health Tracking app. \ No newline at end of file +0.02: Added more icons to the status field. Made it posible to custemize the step goal thrue the Health Tracking app. +0.03: Added charging screen. \ No newline at end of file diff --git a/apps/bttfclock/README.md b/apps/bttfclock/README.md index 3eb162ce81..5417328c0a 100644 --- a/apps/bttfclock/README.md +++ b/apps/bttfclock/README.md @@ -22,7 +22,9 @@ A watchface inspierd by alarm.on); +let charching = Bangle.isCharging(); +let chargeAniFrame= 0; +const chargeAni =[require("heatshrink").decompress(atob("2GwgcEiFBAX4CbhEgwQC/ATeAUP4CegSh/ATyh/AT0AUP4CeUP4CeoCh/AT0BUP4CeUP4CewCh/AT0CUP4CeUP4CegCh/ATyh/AT1AUP4CegKh/ATyh/AT2AUP4CJgUBgAXSoBxNgEgaLUAAAMCCh8kKB4kCgKDXgAuBwAdLiRBCAoJEOgEEyFAAYJBVoECpMkyUIIJWChJEBAQJEBI4ZlIoIjBpJBQXI0AiRBCDoK/HQYQ+EyFIkiMBQxBlDpLuBQasADQIdDYRA4BIJAICKwsIMokkgB0GAR0EIIgdBBwh0BHApBIdIwjFwCDVDQZBDBYdIHBBBJwUBIJGQgBBTgBBMHxwIDdJJBWiJBGwDjCQCBBHdI2SEYT+JAQ+AII4pCHZwIGIJOQIKmBIIwdBF4KARBAhBBEY2SYryDXpBoBYo5BdBYI+UBAbFHyTFUwBBIHywIDII2QQYkAIP4CRDoxZBYrOCoBlGIKqDGgA+YBARBGyECX5oCGQYsggDFbgESdIyDUL4sAgECHy4IBiAcBU4pBWL4dIgHYgCDZwE2gCnFYSQCDgEJDoMAg3bAwKDYgO24EBEYNAgCATAQkALgJBCsEBIK8ghpBBEILKBEAJBYAAMSgHbtBIBQCg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SGCAoKDQYVICHIJzCsZBWAm3QgTCuARZ6DmyDFH2aGFiEAgBBCiTsZIj8gIAIABHzICjgMkyUAgMEgRB5gFJIINIgAskYqtAiRBCpMgdLoCcoA+BIIUkgBB5gBBrbqkEIIuAgT+ZATxB/kGAHwYCCyBBlbSZBHgD+aATpB/IP5B/IP4CHghBFwAskoEgwUIASBBHgQaRAU0AIIsAIP5BBFkeAbSsSIIcgfzgCegBBCpEAIPkBIIIDBFMMCbrMAAAT+cAUJABL7QC/AQbghAXlAUP4CegKh/ATyh/AT2AOJ4=")) + ]; const bluetoothOnIcon = require("heatshrink").decompress(atob("iEQwYROg3AAokYAgUMg0DAoUBwwFDgE2CIYdHAogREDoopFGoodGABI=")); @@ -30,12 +38,15 @@ const notificationIcon = require("heatshrink").decompress(atob("iEQyBC/AB3/8ABBD var drawTimeout; // schedule a draw for the next minute -function queueDraw() { +function queueDraw(time) { if (drawTimeout) clearTimeout(drawTimeout); drawTimeout = setTimeout(function() { drawTimeout = undefined; draw(); - }, 60000 - (Date.now() % 60000)); + //draw; + //console.log(drawTimeout); + }, time - (Date.now() % time)); + } function getSteps() { @@ -75,6 +86,20 @@ function drawBlackBox() { //Status g.fillRect(62, statusDataY-1, 62+49, statusDataY+15); } + + +function draw(){ + let time = 60000; + if(charching){ + drawCharging(); + time = 500; + }else{ + drawWatchface(); + } + //console.log(charching); + queueDraw(time); +} + function drawGoal() { var goal = stepGoal <= steps; g.reset(); @@ -113,7 +138,43 @@ function drawRedkBox() { g.fillRect(62, statusTextY,62+49, statusTextY+15); } -function draw(){ +function drawCharging(){ + g.drawImage(chargeAni[chargeAniFrame], 0, 0); + chargeAniFrame+=1; + if(chargeAniFrame>=chargeAni.length){ + chargeAniFrame=0; + } + + + var date = new Date(); + var h = date.getHours(), m = date.getMinutes(); + + if (h<10) { + h = ("0"+h).substr(-2); + } + if (m<10) { + m = ("0"+m).substr(-2); + } + + //time + g.reset(); + g.setBgColor(0,0,0); + g.setColor(1,0,0); + g.setFont("7x11Numeric7Seg",3); + g.drawString(h, 40, 105); + g.drawString(m, 95, 105); + + + var bat = E.getBattery(); + var batl = bat.toString().length-1; + var batDrawX = 80-(11*batl); + //80 69 58 + g.drawString(bat, batDrawX, 20); + //g.drawLine(77,18,94,18); + +} + +function drawWatchface(){ drawBackground(); getSteps(); drawBlackBox(); @@ -209,7 +270,6 @@ function draw(){ g.setFont("4x5"); g.drawString('Present day', 62, 88); - queueDraw(); } /** @@ -221,19 +281,28 @@ function draw(){ g.setTheme({bg:"#000",fg:"#fff",dark:true}).clear(); //draw(); //the following section is from waveclk -Bangle.on('lcdPower',on=>{ +Bangle.on('lcdPower',function(on) { if (on) { draw(); // draw immediately, queue redraw + console.log(drawTimeout); } else { // stop draw timer if (drawTimeout) clearTimeout(drawTimeout); drawTimeout = undefined; } }); +Bangle.on('charging', function(charging) { + Bangle.setLCDTimeout(!charging); + Bangle.setLCDPower(1); + charching = charging; + draw(); +}); + Bangle.setUI("clock"); // Load widgets, but don't show them Bangle.loadWidgets(); require("widget_utils").swipeOn(); // hide widgets, make them visible with a swipe g.clear(1); +//queueDraw(); draw(); \ No newline at end of file diff --git a/apps/bttfclock/metadata.json b/apps/bttfclock/metadata.json index 3923fcac57..eb66c30ef7 100644 --- a/apps/bttfclock/metadata.json +++ b/apps/bttfclock/metadata.json @@ -1,7 +1,7 @@ { "id": "bttfclock", "name": "Back To The Future", - "version": "0.02", + "version": "0.03", "description": "The watch of Marty McFly", "readme": "README.md", "icon": "app.png", diff --git a/apps/bttfclock/screenshotCharging.png b/apps/bttfclock/screenshotCharging.png new file mode 100644 index 0000000000..852ddbf2dd Binary files /dev/null and b/apps/bttfclock/screenshotCharging.png differ