From 6e8f46185c5a37da71bc9265f671bd1694faacdd Mon Sep 17 00:00:00 2001 From: noobejby Date: Mon, 23 Dec 2024 23:18:43 +0100 Subject: [PATCH 1/4] Added charging screen --- apps/bttfclock/ChangeLog | 3 +- apps/bttfclock/README.md | 2 + apps/bttfclock/app.js | 81 ++++++++++++++++++++++++-- apps/bttfclock/metadata.json | 2 +- apps/bttfclock/screenshotCharging.png | Bin 0 -> 4248 bytes 5 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 apps/bttfclock/screenshotCharging.png 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..399bf95cff 100644 --- a/apps/bttfclock/README.md +++ b/apps/bttfclock/README.md @@ -23,6 +23,8 @@ 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+EyFIkiMBQxBlDpLuBQasADQIdDYRA4BIJAICKwsIMokkgB0GAR0EIIgdBBwh0BHApBIdIwjFwCDVDQZBDBYdIHBBBJwUBIJGQgBBTgBBMHxwI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YQQCXFJ1BkkQm3QgTOCIK8BQbwICwE2QYI7LYr8QFiJBCQBwICYrSDQYoJBBCiKDvINiwQwE2zDFVgKDomiDcfxACIFiJBXHaICGQcY7XIP4CIVpYICwE26ECYRoICiFAINiDBIJyAcAQYvNiBBCYp1BQYICdQcWAIPqAeAQbFOzDFOfzACJQZs0QbECIOyDjOJpBCYpj+aARKDqgJBim3QIJiDliDFLmzFNfzgCKIL2AQ0K2KIJrCkAQiDXDQMAZEyDKzBBJHcoCEGQKDImiDJYVICDQZBB0gSGCAoKDQYVICHIJzCsZBWAm3QgTCuARZ6DmyDFH2aGFiEAgBBCiTsZIj8gIAIABHzICjgMkyUAgMEgRB5gFJIINIgAskYqtAiRBCpMgdLoCcoA+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,24 @@ function drawBlackBox() { //Status g.fillRect(62, statusDataY-1, 62+49, statusDataY+15); } + + +function draw(){ + let time = 60000; + if(charching){ + Bangle.setLCDTimeout(0); + Bangle.setLCDPower(1); + drawCharging(); + time = 500; + }else{ + Bangle.setLCDTimeout(1); + Bangle.setLCDPower(1); + drawWatchface(); + } + //console.log(charching); + queueDraw(time); +} + function drawGoal() { var goal = stepGoal <= steps; g.reset(); @@ -113,7 +142,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 +274,6 @@ function draw(){ g.setFont("4x5"); g.drawString('Present day', 62, 88); - queueDraw(); } /** @@ -221,19 +285,26 @@ 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) { + 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 0000000000000000000000000000000000000000..852ddbf2dd4a62e9f9d160b87deaab09083e6f5d GIT binary patch literal 4248 zcmV;J5NGd+P)Px_Qb|NXRCr$Por{v=C=5lX|No;il@J2P!srRYR@YW-PsheK99^yiN&f!*`}g|% z_wO(L8vl=e*ocEKwE-?IaQ_A5P9XpL_wV(h4PL+={Uw>Lb%Q??I4slFv&q8%){Xv9 zVu=##%;aGqoOn6^3AE4Pf0zR6M7@95p7WfW0PHjR!$O3G*gApO1K@iH|0W9joGEdS zpzt#u#sJ?t`UAGG5Md#@RgegNOtNgOz<#EhP|Njdi2;&2P91(}b70Zftt>d$#*)E|q{Y)1rG>jq`;9@R)QsM0W=)e;YCLE#7| z58!m&^SK((7DK>+_dEvqFItS?+F6*y@uJ>FiI3B`1hzQ8T|2cmBqkKJ*rC zj=bXWbx-546~GBFiRXe64LrnjCAEOfqD>CKHse4M5gEMiXI|ie6M~wZhpR}?;pGHd z3D16of%@#2HqW!i6&$O^Kn`qMI$Z)VbpSEt9T?(~SL8u`WkGQDUfOkKZ9>rK3dp%4 zF;9gjd*E3XVm`QO5TTM64c6RF9VGIq$Q+1qGoh{u-wa?V^5p<=lfE>d*hLFm(#LPJ z21nmQ+FN5t3xXixJ7kfz0SLid_IIwB>Mo*g0m= z=C%ESl^3>N1DX#=%RMYsX_ej+xBiApa#g8ytHgh~%2_9Nys8A<7moe6MVtNPlnQTq z|7)xP7Hp=4$aU9Q57&dQQR2oe^pgxc%oea&v2WPcrjW7Q?3zm{ODn0_P z8YlyZtxInAx z&bgO!3qgUm9%yOi&Al!bHtqIj2CfE(dIESe1%4vLvy|6oQYTPgt5TYlIspSqE+a|r zMSA|oqpnC^LxGVAoyOodQ|qwACcS2R{^;K$Ku7nZSt=V{%jW`zk%i!@Gqn>j$6Kq^ z2+|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90IQ*62dv{?CFb>|&#vyXR1E0EreoGeyUcLHnQwP?K3Q87P z-jzEZ82W(Jb=Ny6@VJlaMH-9#fhZO8*{67NQbn+HSOQpxHm$ zXvX5Gu2~YN-!MIq8xI;)LG1?_vIBsHKq+wj{No@#2a>%1=xwft*vV3|jSr>|2nU>c z0i$f%hCb{s9eFe%{eNErIp^6%L176n&LcbWz@yF@!<7KhNJ_940s``jX|pB(TL}I$ z+s`gxA%yRFq66DnjCG}^^Cz*N0p`QoPbO!zX{o$4JL}X!$Oa-$%WG5$QwNqm-#QE7 z2VSRjVEN!?E8$mx<Ti&CB_5e0pvrT?$tTK$APBr zA{g&)wP^D*d`-hg3$Yu(7-(my^YJ{LV)jylLg?O z3aqc{nc&-|c!P#*k!=nP@>_z}=y^!H{CGM=Gp}-1Xo7C>zCCcfa;M*B<$)_}t_?6I`Q$&_6_B{8UAj>nd%k-M zQ9p>q)<=srf7>ay19*?x?^Y{ua)7UsJibcxEXv&#*caqmSqSX3(m&3|7oYb`*l*^+ zSO|H4t@F0n`tSn)hJ3JP-596?pH||mukTAGu`qIu+sXrT9&n8suY5;_f7R3+$D09+ z&5&y=p{<5Y%{V~D*Xk3x0Wb?-x^3tI9(F?J=ZyeRzBf>t&KsEsQ&b9&CfX*+e1-vqNV Date: Mon, 23 Dec 2024 23:26:07 +0100 Subject: [PATCH 2/4] updated readme --- apps/bttfclock/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/bttfclock/README.md b/apps/bttfclock/README.md index 399bf95cff..90ced26283 100644 --- a/apps/bttfclock/README.md +++ b/apps/bttfclock/README.md @@ -22,9 +22,9 @@ A watchface inspierd by