From 53cc58845abd00347f6c0ea25ebc5855be0b97ba Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Wed, 8 Dec 2021 11:12:03 -0500 Subject: [PATCH 1/9] Advertise app name as Espruino manufacturer data when idle --- apps.json | 2 +- apps/emojuino/ChangeLog | 1 + apps/emojuino/emojuino.js | 20 +++++++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index e5d6dad8a..87f4e5dd2 100644 --- a/apps.json +++ b/apps.json @@ -4387,7 +4387,7 @@ "id": "emojuino", "name": "Emojuino", "shortName": "Emojuino", - "version": "0.02", + "version": "0.03", "description": "Emojis & Espruino: broadcast Unicode emojis via Bluetooth Low Energy.", "icon": "emojuino.png", "screenshots": [ diff --git a/apps/emojuino/ChangeLog b/apps/emojuino/ChangeLog index 1c99f1970..04367183f 100644 --- a/apps/emojuino/ChangeLog +++ b/apps/emojuino/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Upgraded text to images, added welcome screen and subtitles. +0.03: Advertise app name as Espruino manufacturer data when idle. diff --git a/apps/emojuino/emojuino.js b/apps/emojuino/emojuino.js index 5b7670652..d241063e6 100644 --- a/apps/emojuino/emojuino.js +++ b/apps/emojuino/emojuino.js @@ -32,6 +32,7 @@ const CYCLE_BUZZ_MILLISECONDS = 50; const WELCOME_MESSAGE = 'Emojuino:\r\n\r\n< Swipe >\r\nto select\r\n\r\nTap\r\nto transmit'; // Non-user-configurable constants +const APP_ID = 'emojuino'; const IMAGE_INDEX = 0; const CODE_POINT_INDEX = 1; const EMOJI_PX = 96; @@ -40,12 +41,11 @@ const EMOJI_Y = (g.getHeight() - EMOJI_PX) / 2; const TX_X = 68; const TX_Y = 12; const FONT_SIZE = 24; -const BTN_WATCH_OPTIONS = { repeat: true, debounce: 20, edge: "falling" }; +const ESPRUINO_COMPANY_CODE = 0x0590; const UNICODE_CODE_POINT_ELIDED_UUID = [ 0x49, 0x6f, 0x49, 0x44, 0x55, 0x54, 0x46, 0x2d, 0x33, 0x32 ]; - // Global variables let emojiIndex = 0; let isToggleOn = false; @@ -100,9 +100,22 @@ function transmitEmoji(image, codePoint, duration) { } +// Transmit the app name under the Espruino company code to facilitate discovery +function transmitAppName() { + let options = { + showName: false, + manufacturer: ESPRUINO_COMPANY_CODE, + manufacturerData: JSON.stringify({ name: APP_ID }), + interval: 2000 + } + + NRF.setAdvertising({}, options); +} + + // Terminate the emoji transmission function terminateEmoji(displayIntervalId) { - NRF.setAdvertising({ }); + transmitAppName(); isTransmitting = false; clearInterval(displayIntervalId); drawImage(EMOJIS[emojiIndex][IMAGE_INDEX], false); @@ -169,3 +182,4 @@ g.setFontAlign(0, 0); g.drawString(WELCOME_MESSAGE, g.getWidth() / 2, g.getHeight() / 2); Bangle.on('touch', handleTouch); Bangle.on('drag', handleDrag); +transmitAppName(); From f7a37288264fed375949d90097f6dfeee5781e23 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Wed, 8 Dec 2021 11:31:52 -0500 Subject: [PATCH 2/9] Added screenshots --- apps.json | 10 +++++++++- apps/sensible/ChangeLog | 1 + apps/sensible/screenshot-acc.png | Bin 0 -> 1093 bytes apps/sensible/screenshot-bar.png | Bin 0 -> 1297 bytes apps/sensible/screenshot-gps.png | Bin 0 -> 1253 bytes apps/sensible/screenshot-hrm.png | Bin 0 -> 1205 bytes apps/sensible/screenshot-mag.png | Bin 0 -> 1281 bytes apps/sensible/screenshot-top.png | Bin 0 -> 2861 bytes apps/sensible/sensible.js | 15 +++++++++++++++ 9 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 apps/sensible/screenshot-acc.png create mode 100644 apps/sensible/screenshot-bar.png create mode 100644 apps/sensible/screenshot-gps.png create mode 100644 apps/sensible/screenshot-hrm.png create mode 100644 apps/sensible/screenshot-mag.png create mode 100644 apps/sensible/screenshot-top.png diff --git a/apps.json b/apps.json index 87f4e5dd2..7e50fd94b 100644 --- a/apps.json +++ b/apps.json @@ -4605,9 +4605,17 @@ "id": "sensible", "name": "SensiBLE", "shortName": "SensiBLE", - "version": "0.02", + "version": "0.03", "description": "Collect, display and advertise real-time sensor data.", "icon": "sensible.png", + "screenshots": [ + { "url": "screenshot-top.png" }, + { "url": "screenshot-acc.png" }, + { "url": "screenshot-bar.png" }, + { "url": "screenshot-gps.png" }, + { "url": "screenshot-hrm.png" }, + { "url": "screenshot-mag.png" } + ], "type": "app", "tags": "tool,sensors", "supports" : [ "BANGLEJS2" ], diff --git a/apps/sensible/ChangeLog b/apps/sensible/ChangeLog index ba597a22f..baa93f297 100644 --- a/apps/sensible/ChangeLog +++ b/apps/sensible/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Corrected variable initialisation +0.03: Advertise app name, added screenshots diff --git a/apps/sensible/screenshot-acc.png b/apps/sensible/screenshot-acc.png new file mode 100644 index 0000000000000000000000000000000000000000..b286d1ed55b37ccbf406732238425a43630c1dfe GIT binary patch literal 1093 zcmeAS@N?(olHy`uVBq!ia0vp^8$g(Y4M?uv{v-}aaTa()7Bet#3xhBt!>lS)9LmJUYQ@?SKk&qGe7;j^{Vg1f4|6h=P5sEmbO}I zvSiAxTRYxA-}J5Rabj?Xzj8wahjHtJTee*d)^qi@?|QraeEz=YH-FjB|K{ZVefPJT zYwzB__;%x#b=+6BlY5Ux8^!09-oEwu=OpHpTkB`v&p(;1Rhj&zRyKS6>s84!!k1J` zuTxl?7hP@l|7~Q0*m2IS+m25?Zcuri`)%sHtq{qtv~D|*EP z!zO-j-=%KVaJKn13uJ>i1Po+mIPn}#;Bt((DIx*lb4V~YH#isvcT%Cg~eZg-`>si=XF=*yNkz-!|Thg zc-!B$*?aNUtT;DQr!$SwHI40p6TSH#EmQt{as9$odvEP9XKm+yly&5G(xUUmKXq6> zGH>g$T*#caF{r%za@5)|x8=RYVGaMc9{4&@J0^Ph-K=$HaYgf=9sirTlWC9WtwI5I zpm&rLKptf20ebL)&V#k*1%C7}x+P?Yevq6m)wE3cL(q{&OUvu+dd=ipk9x1L{9qFC zQAqE>Qcac?jtZ;iTQBi0WQwy&5H?g~+V)Ih`%GqMmAaL}$}l4pfTja2ao*hUH%Q$L zY!y5#@3O^gGL!o9;`!}Y#|ul2_U>TxcTZYu@a(_^=L6FsRF8-pGCv^vPl4}DBQ)&W z(mokXiO(!v)}+ULkL&W%ltX@sF`dde2Og>7!mIX}v_>cw?Ba=-ap#c&A20&j4q0wE zKQob~Esxpn<$rk&@ekH9%WrasZ>ZpuM#CEKyS9HRnPtwX?m0QXLQuYOxxo8^*ewcg z9Ora!%5Lc3lt;n}`S%WGnjY!{CKCYzo%4-n3k;b+sRkIfpj3kt%&6&zhsh1B1)9iE dlwbSH+#wY7aI&Dpb6^p`;OXk;vd$@?2>@-$<1GLH literal 0 HcmV?d00001 diff --git a/apps/sensible/screenshot-bar.png b/apps/sensible/screenshot-bar.png new file mode 100644 index 0000000000000000000000000000000000000000..781ddbaa63369ebb8dd1966564e486e185c2fea7 GIT binary patch literal 1297 zcmeAS@N?(olHy`uVBq!ia0vp^8$g(Y4M?uv{v-}aaTa()7Bet#3xhBt!>l+Ri(>lQ1BxIMh}lGW%PIRAt`?rtp>==<%FU$Y#&fP!JPWg7jf!^+!i+ksu zI<4w@F>vh=daXV-!0nqJ}&j{KNqtf7d49A?q%@Z-?n$v{mu8k z=53ame{14~G_{58ksO;P?%!s+U+~npi(%(wqsrev&X4Hr8jqBY2AywB_pjA@RHyO& zvfBam`H^Rsn-4HFHcwo5b?MWP{pm^G?|!da&Ru_VInSL98aH=0Tu4%1`peeZcE+!L z?w@y7&ySQpanbJmkrYR37mkJl4z4W~d*hT?j_E#fN$3z@Xk=sp8OO-P%)$mCIe3_u zYd?Hk<1W$I7~gx~|KHay?rmDEI^FxX_Vko(FNF82z6zas!2OZW<@@qZ4^J_^R9b)U zW?=r$x$27_pW6J=HE!zNu>3Da1tfQvonKSGeVT1)${eGq&DGOMzt7Es*Juyf5{v%NwcN`upe#9%`^x%p}NUlhR;o7OMFE`#0 z*WGigY;)zyD4XJE%kE~a+c4*4u-&_Uq4iq&3BLFKvAfDRBs3hTkdSATa7%a)uKeMb zysG|b>#B$MrcK%&_3T#7>(+aV_gTnjH};o3`XqMZ+WHFCRmv_|EJ`|UodWldX-da( z&Z##-=U1ba-gZZ%cksC3OA~~mMQrOvI|J;n0sKN zw2HF1_pXgX|6??Et}I@!(Ea4}rKHnSEkZbRj2&7SICumkK<+eI{$klVR$;LhK@Vna z-PgduC?L__FJL-n=giMJ(GR8^xM&{v?(UA6+0mEuKkW0mXB+74c4hVLCSZDORP44$ z;Aj*L5m00RCQ#9f4`=6Z+G55$J?+7r$%W@St}XJvGd(ZwmB}e5HgLMN6))7CP@4!$ z#NX4{*Hj;vz%={Tp$$xv#Se4&#PMhwR2r^1@Z=~+K>1VWiPw@@FM8`&U+g&`VdYfu zjj2ulkw?!$RyD&m@fk-X;u3_CD;hm}1W)K?n6GV1bO)vsEExrnT|jmdKI;Vst0Om45-v9sr literal 0 HcmV?d00001 diff --git a/apps/sensible/screenshot-gps.png b/apps/sensible/screenshot-gps.png new file mode 100644 index 0000000000000000000000000000000000000000..3fd1229e3d40c9e5a02f2360a165327766af2ed5 GIT binary patch literal 1253 zcmeAS@N?(olHy`uVBq!ia0vp^8$g(Y4M?uv{v-}aaTa()7Bet#3xhBt!>l}XPEYDQ1NDwa z&sR^k$o=~>$ZLLTq~CY*OV4GVR=?KzkYoAL=h~$6yUm|$(>eY4dG3?g{(^-iD-kpTs_|SzhOAb2Wpdje}7@;)S@P-TZ!z#tk*D z2^|6lf^|0pUoe>em#257pRCR{GOs}*yy}<*V3lu1J0*co2nJ8IN^}Q zj4Mp#_A_}H~FFx8V)EJ z7;sE?Q|#OH=BBW;XyxO=#_va>?fJgEJ8ajmPVmrU2SsM)waP7FV!ZNj>ySD3IFmaL*-7-C7)yk}99v&uZRt2bLgN+B=5691w zY`j;qoyBId`O+=X2i@Yn99iOb;s68C`eq>6XqUpfSXOkUyzY;pFLme4_8yzs8}F}B zkT-FcRUD7FVwUJi=6<)1dplB+H5!Y@y_=I%VJ;OXrYKUF+{ICN?bX?aj1NwY=ZiA()MEE<6Ah0_|1j@( z=F&@!tah&$a&1|j`aNG6#&e=iOwncx z50za`F1q8UDxk#tf7=<$pYQr^1lEb{Z2g#i^!>UV{*p&g_f~d&YJDd6{O01+(nngQ zj~Xs8&3@i`fob}heK(ULv`@L5n)LXJM#-!GKj%7kTi^V2>i!hJB{o*aR=?kBac=c< z4s#Z^l1B`{^vniI31@%Q*`=Cp*xGjf+HI+#L#d7HCq(ZIi&_yEB*-4pEAV>n%=EZz4mq{EK&3c%N`!W#Fs)clQ9hd%LdS#?CN`p>l^z#@vl)78&q Iol`;+0KlynVE_OC literal 0 HcmV?d00001 diff --git a/apps/sensible/screenshot-hrm.png b/apps/sensible/screenshot-hrm.png new file mode 100644 index 0000000000000000000000000000000000000000..aa6a0574fd89c1a9443ca8f3ec43454a2ddadd1c GIT binary patch literal 1205 zcmeAS@N?(olHy`uVBq!ia0vp^8$g(Y4M?uv{v-}aaTa()7Bet#3xhBt!>l{)yze(3 zGu5r$y5m@(3=sKLx^-L#l$Tw~%H!7YJN^9P%b)H|%=x)T26twe_Uko#JG4J5EbeyOoa0kB^Y;pf$9{c&rayXq_4ljQ z=f3ODou2*naDe-RE4)^pk9^;Bd0m(JE6qRe{FcSdzq0u9T~T|9@*|T!*)F~_bw|>F z+h0n0&r2%HMecJST0C>}RWp~pq2D_iiu7s9m)34j_{cBfn()at7@Z~}C{ybfst-3qy?d$1rQ>NzRpJR=C zX(wVJq3Cdc#hmYOLW{zhlN>#QOe{Q1ZU+<+1PnMN7@Hd$flQzX8{_A^|7*A>?%osF zUCK3Y&#WKOTVu?!t+Jdw8b$Q$EHyNL=`IBo}c<#&8Pj~9x%_zRVYnH{=>Y3B#Z`sN>ZLySM+5@rtZO=PS ztQ9X@sonm3-lzLJW?9JIX?QQov zj(UIX-m$rU-MmlXr`}myI2zk=>Bdp-%?;oCX6+Z`o)~_&l>r!Bf(9;}H)^A+!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EiaR7EfeV(?7)J6W1a-V-JV6L8V|=!Y3uIV!hTIO%Ei35|SQ?L4pAk z`wk3^%4>qAWH+bpbOa@W)iadM@9|2QaPOH~y>6-1uQOX`%_)mjTf6*e*^cNJ{K6I4 zpU&?No|<>R`q_tFZ|*Hw6tZcr`l;zIxwZaxRM_uXKQv9so%;7!&kpT-!tp%^l=z&u zYpw|~>+!U_JR<99+0lENW!*{Xr!yqh39}1G?C^SUDIn77;IqkzTk{iIFSS2Aur$>6 zy17wSdhgX~XU}?NpWV7PKx%g8#lx34r!q6Mh}C|aEAyjo(X^sUfeH@~tyYF(qBjJD z4{@zgZpP~Mi9b8`h_N2e_;b!pxKYrmbw`qu<%O-n?ny0TGmdcR8*~cBB?u|+IiTXk z(j|P0ceP>;3mbYIDHuRv&;giMKx|MFDm4Gcz>&4sdQXumu=HYJ@O1TaS?83{1OQ>{ BGa&!~ literal 0 HcmV?d00001 diff --git a/apps/sensible/screenshot-top.png b/apps/sensible/screenshot-top.png new file mode 100644 index 0000000000000000000000000000000000000000..e485933f004aa8d87e5f019b21c577b949786435 GIT binary patch literal 2861 zcmds({X5h9AICr28rhI?8zC~n+?;1Z}_w{% z6EDzXojU4e?co3hgTv)Oo-Iq0p--@y@1^u8c#(|-XHQDz)obzk;qesWN~eD z8>r`Y=IdQdCKW@Q3okGEn(v3?L~qx`r2Kj*()HkF$SRrMoT)PsFcP1C%5pONEg(+n z{*Y|qnw?9xf(a6>^ANiL43fzeLW10`xo+X;R*D>=o=1%SbhAY@B#1g% zGl*wz=PG?>hgX?Z^lqNTld@0)-|bfK5BRyBuNZ~!?CsTSHrTE*u9(!Wn-slM+sDdk z7;e_Y(K#bq{7M%3_#qjiFzSM_O-uEEE-B==&>#z|s=itmK>$`kQ?x49MSX(nIVYMI zLhsMCxm#i>d7eS)7%W3L6MoT26+^T5t?7T*e~px}1d;-Vi93Ix!xmW9a7o#{ycD4% z6!B6IL6*L2i`1s-B`cp?1c&Ga0`-#Z#x&c&$zI`$x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@vbPpg{uN_arZ-^0*CmG zl4)YByoiO(3mU+K{N_Q=E9eJ|@>aS`i^ z-^5K9Xx1(_AE{6B9?}0)zw7vScpRx9FC8~*e32wWgJ)hfZp%&N85$o0%AGu(mEwJQ zV3+}?Sa;~N(3#GZEVyV!c1{@EIr=8KYe2m@;6)|FK(|@DI?$lVyf^AsMt*d9^7^C% zPvM1f#(Hp$&J7loE8j^7t9eKC4PKvVn0}wSj)dVVlA32?181h_2;x%qt~9hhAVB*k zyY5^(sOVj4V$*IA0v8m7&(1fg?8ri|fi~4~s8(qxU~wiqCP5tQgY!Ln1_ZP_sz338 z0UUAiMf>SS=nC<0Eu=<&;H+1N32vNF1P9Hk+j7BU%>7U LtWCMKcl>_=8RaYN literal 0 HcmV?d00001 diff --git a/apps/sensible/sensible.js b/apps/sensible/sensible.js index c569ff720..45852adab 100644 --- a/apps/sensible/sensible.js +++ b/apps/sensible/sensible.js @@ -6,6 +6,7 @@ // Non-user-configurable constants const APP_ID = 'sensible'; +const ESPRUINO_COMPANY_CODE = 0x0590; // Global variables @@ -90,6 +91,19 @@ let magMenu = { }; +// Transmit the app name under the Espruino company code to facilitate discovery +function transmitAppName() { + let options = { + showName: false, + manufacturer: ESPRUINO_COMPANY_CODE, + manufacturerData: JSON.stringify({ name: APP_ID }), + interval: 2000 + } + + NRF.setAdvertising({}, options); +} + + // Update acceleration Bangle.on('accel', function(newAcc) { acc = newAcc; @@ -155,6 +169,7 @@ Bangle.on('mag', function(newMag) { // On start: enable sensors and display main menu g.clear(); +transmitAppName(); Bangle.setBarometerPower(isBarEnabled, APP_ID); Bangle.setGPSPower(isGpsEnabled, APP_ID); Bangle.setHRMPower(isHrmEnabled, APP_ID); From 26cb1e58a6322b7c976038d33d8f8197b335053f Mon Sep 17 00:00:00 2001 From: ps-igel <60899838+ps-igel@users.noreply.github.com> Date: Wed, 8 Dec 2021 23:17:06 +0100 Subject: [PATCH 3/9] enhance for use with Bangle2, add new draw mode --- apps.json | 3 +-- apps/numerals/ChangeLog | 1 + apps/numerals/README.md | 14 +++++++--- apps/numerals/numerals.app.js | 41 ++++++++++++++++++++++-------- apps/numerals/numerals.settings.js | 4 +-- 5 files changed, 45 insertions(+), 18 deletions(-) diff --git a/apps.json b/apps.json index e5d6dad8a..ef4ec7db6 100644 --- a/apps.json +++ b/apps.json @@ -2086,12 +2086,11 @@ "id": "numerals", "name": "Numerals Clock", "shortName": "Numerals Clock", - "version": "0.09", "description": "A simple big numerals clock", "icon": "numerals.png", "type": "clock", "tags": "numerals,clock", - "supports": ["BANGLEJS"], + "supports": ["BANGLEJS","BANGLEJS2"], "allow_emulator": true, "screenshots": [{"url":"bangle1-numerals-screenshot.png"}], "storage": [ diff --git a/apps/numerals/ChangeLog b/apps/numerals/ChangeLog index f94d719f4..57818c180 100644 --- a/apps/numerals/ChangeLog +++ b/apps/numerals/ChangeLog @@ -7,3 +7,4 @@ 0.07: Add date on touch and some improvements (see settings and readme) 0.08: Add new draw styles, tidy up draw functionality 0.09: Tweak for faster rendering +0.10: Enhance for use with Bangle2, insert new draw mode 'thickfill' \ No newline at end of file diff --git a/apps/numerals/README.md b/apps/numerals/README.md index ebf4c10fe..7a8c25212 100644 --- a/apps/numerals/README.md +++ b/apps/numerals/README.md @@ -7,14 +7,20 @@ Settings can be accessed through the app/widget settings menu of the Bangle.js ### Color: * rnd - shows numerals in different color combinations every time the watches wakes -* r/g - red/green -* y/w - yellow/white -* o/c - orange/cyan -* b/y - blue/yellow'ish +* r/g - red/green (Bangle1/Bangle2) +* y/w - yellow/white (Bangle1 only) +* o/c - orange/cyan (Bangle1 only) +* b/y - blue/yellow'ish (Bangle1 only) +* r/g - red/green (Bangle2 only) +* g/b - green/blue (Bangle2 only) +* r/c - red/cyan (Bangle2 only) +* m/g - magenta/green (Bangle2 only) ### Draw mode * fill - fill numerals * frame - only shows outline of numerals +* framefill - frame with lighter color fill +* thickfill - thick frame in theme foreground color ### Menu button * choose button to start launcher menu with diff --git a/apps/numerals/numerals.app.js b/apps/numerals/numerals.app.js index 3c7607eb1..baf859915 100644 --- a/apps/numerals/numerals.app.js +++ b/apps/numerals/numerals.app.js @@ -6,7 +6,7 @@ * + see README.md for details */ -var numerals = { + var numerals = { 0:[[9,1,82,1,90,9,90,92,82,100,9,100,1,92,1,9],[30,25,61,25,69,33,69,67,61,75,30,75,22,67,22,33]], 1:[[50,1,82,1,90,9,90,92,82,100,73,100,65,92,65,27,50,27,42,19,42,9]], 2:[[9,1,82,1,90,9,90,53,82,61,21,61,21,74,82,74,90,82,90,92,82,100,9,100,1,92,1,48,9,40,70,40,70,27,9,27,1,19,1,9]], @@ -19,8 +19,8 @@ var numerals = { 9:[[9,1,82,1,90,9,90,92,82,100,9,100,1,92,1,82,9,74,69,74,69,61,9,61,1,53,1,9],[22,27,69,27,69,41,22,41]], }; var _12hour = (require("Storage").readJSON("setting.json",1)||{})["12hour"]||false; -var _hCol = ["#ff5555","#ffff00","#FF9901","#2F00FF"]; -var _mCol = ["#55ff55","#ffffff","#00EFEF","#FFBF00"]; +var _hCol = []; +var _mCol = []; var _rCol = 0; var scale = g.getWidth()/240; var interval = 0; @@ -42,15 +42,23 @@ var drawFuncs = { }, thickframe : function(poly,isHole){ g.drawPoly(poly,true); - g.drawPoly(translate(1,0,poly),true); - g.drawPoly(translate(1,1,poly),true); - g.drawPoly(translate(0,1,poly),true); + g.drawPoly(translate(1,0,poly,1),true); + g.drawPoly(translate(1,1,poly,1),true); + g.drawPoly(translate(0,1,poly,1),true); + }, + thickfill : function(poly,isHole){ + if (isHole) g.setColor(g.theme.bg); + g.fillPoly(poly,true); + g.setColor(g.theme.fg); + g.drawPoly(translate(1,0,poly,1),true); + g.drawPoly(translate(1,1,poly,1),true); + g.drawPoly(translate(0,1,poly,1),true); } }; -function translate(tx, ty, p){ +function translate(tx, ty, p, ascale){ //return p.map((x, i)=> x+((i&1)?ty:tx)); - return g.transformVertices(p, {x:tx,y:ty,scale:scale}); + return g.transformVertices(p, {x:tx,y:ty,scale:ascale==undefined?scale:ascale}); } @@ -99,6 +107,18 @@ function setUpdateInt(set){ if (set) interval=setInterval(draw, REFRESH_RATE); } +function setUp(){ + if (process.env.HWVERSION==1){ + _hCol = ["#ff5555","#ffff00","#FF9901","#2F00FF"]; + _mCol = ["#55ff55","#ffffff","#00EFEF","#FFBF00"]; + } else { + _hCol = ["#ff0000","#00ff00","#ff0000","#ff00ff"]; + _mCol = ["#00ff00","#0000ff","#00ffff","#00ff00"]; + } + if (settings.color==0) _rCol = Math.floor(Math.random()*_hCol.length); +} + +setUp(); g.clear(1); // Show launcher when button pressed Bangle.setUI("clock"); @@ -111,11 +131,12 @@ if (settings.showDate) { } Bangle.on('lcdPower', function(on){ if (on){ - if (settings.color==0) _rCol = Math.floor(Math.random()*_hCol.length); + setUp(); draw(); setUpdateInt(1); } else setUpdateInt(0); }); +Bangle.on('lock', () => setUp()); Bangle.loadWidgets(); -Bangle.drawWidgets(); +Bangle.drawWidgets(); \ No newline at end of file diff --git a/apps/numerals/numerals.settings.js b/apps/numerals/numerals.settings.js index 70f6e0d98..ae321322a 100644 --- a/apps/numerals/numerals.settings.js +++ b/apps/numerals/numerals.settings.js @@ -12,8 +12,8 @@ } let numeralsSettings = storage.readJSON('numerals.json',1); if (!numeralsSettings) resetSettings(); - let dm = ["fill","frame","framefill","thickframe"]; - let col = ["rnd","r/g","y/w","o/c","b/y"]; + let dm = ["fill","frame","framefill","thickframe","thickfill"]; + let col = process.env.HWVERSION==1?["rnd","r/g","y/w","o/c","b/y"]:["rnd","r/g","g/b","r/c","m/g"]; let btn = [[24,"BTN1"],[22,"BTN2"],[23,"BTN3"],[11,"BTN4"],[16,"BTN5"]]; var menu={ "" : { "title":"Numerals"}, From 11cfd93c9cbbad697c59b636264129855e3f2fec Mon Sep 17 00:00:00 2001 From: ps-igel <60899838+ps-igel@users.noreply.github.com> Date: Wed, 8 Dec 2021 23:19:12 +0100 Subject: [PATCH 4/9] enhance for use with Bangle2, add new draw mode --- apps.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps.json b/apps.json index ef4ec7db6..c9f04fb4d 100644 --- a/apps.json +++ b/apps.json @@ -2086,6 +2086,7 @@ "id": "numerals", "name": "Numerals Clock", "shortName": "Numerals Clock", + "version": "0.10", "description": "A simple big numerals clock", "icon": "numerals.png", "type": "clock", From 602be413864abc7ce6729eac234c7a9e1c0d4d07 Mon Sep 17 00:00:00 2001 From: Ray Holder Date: Thu, 9 Dec 2021 00:51:36 -0600 Subject: [PATCH 5/9] Fix typo for Thursday image --- apps/93dub/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/93dub/app.js b/apps/93dub/app.js index 8f662a616..1b0f69a94 100644 --- a/apps/93dub/app.js +++ b/apps/93dub/app.js @@ -93,7 +93,7 @@ function draw(){ if (w == 1) {imgW = imgMon;} if (w == 2) {imgW = imgTue;} if (w == 3) {imgW = imgWed;} - if (w == 4) {imgW = imgThr;} + if (w == 4) {imgW = imgThu;} if (w == 5) {imgW = imgFri;} if (w == 6) {imgW = imgSat;} g.drawImage(imgW, 85, 63); From b3234a8e5cabf5316e870410f2250fa986fdcf74 Mon Sep 17 00:00:00 2001 From: Ray Holder Date: Thu, 9 Dec 2021 00:53:01 -0600 Subject: [PATCH 6/9] Update Changelog for 0.05 --- apps/93dub/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/93dub/ChangeLog b/apps/93dub/ChangeLog index 36859c060..c1b2588bb 100644 --- a/apps/93dub/ChangeLog +++ b/apps/93dub/ChangeLog @@ -2,3 +2,4 @@ 0.02: DiscoMinotaur's adjustments (removed battery and adjusted spacing) 0.03: Code style cleanup 0.04: Set 00:00 to 12:00 for 12 hour time +0.05: Display time, even on Thursday From 3de4a9145437186befb4aecbdb02c11478cfb3f4 Mon Sep 17 00:00:00 2001 From: Ray Holder Date: Thu, 9 Dec 2021 00:53:41 -0600 Subject: [PATCH 7/9] Update README.md to fix markdown rendering --- apps/93dub/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/93dub/README.md b/apps/93dub/README.md index 3830ee023..4d1ade582 100644 --- a/apps/93dub/README.md +++ b/apps/93dub/README.md @@ -5,8 +5,8 @@ Uses many portions from Espruino documentation, example watchfaces, and the waveclk app. It also sourced from Jon Barlow's 91 Dub v2.0 source code and resources and adapted for Bangle.js 2's screen. Time, date and the battery display works. It is not pixel perfect to the original. Contributors: -Leer10 -Orviwan (original watchface and assets) -Gordon Williams (Bangle.js, watchapps for reference code and documentation) -DiscoMinotaur (adjustments) -Ray Holder (minor 12 hour time rendering adjustment) +* Leer10 +* Orviwan (original watchface and assets) +* Gordon Williams (Bangle.js, watchapps for reference code and documentation) +* DiscoMinotaur (adjustments) +* Ray Holder (minor 12 hour time rendering adjustment, fix Thursdays) From 907d0a3f76b64ecf71dc08a3bc60abb385c7e049 Mon Sep 17 00:00:00 2001 From: Ray Holder Date: Thu, 9 Dec 2021 00:54:42 -0600 Subject: [PATCH 8/9] Bump 93dub version to 0.05 --- apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps.json b/apps.json index e5d6dad8a..1d8d4c00a 100644 --- a/apps.json +++ b/apps.json @@ -4575,7 +4575,7 @@ "shortName":"93 Dub", "icon": "93dub.png", "screenshots": [{"url":"screenshot.png"}], - "version":"0.04", + "version":"0.05", "description": "Fan recreation of orviwan's 91 Dub app for the Pebble smartwatch. Uses assets from his 91-Dub-v2.0 repo", "tags": "clock", "type": "clock", From 73574201bfc107aba7fdf19b3d22af2b3cf97eeb Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Thu, 9 Dec 2021 09:13:11 +0000 Subject: [PATCH 9/9] gpsrec 0.27: Map drawing with light theme (fix #1023) --- apps.json | 6 +++--- apps/gpsrec/ChangeLog | 1 + apps/gpsrec/app.js | 11 +++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps.json b/apps.json index 9e3d862e8..c47d3cf6b 100644 --- a/apps.json +++ b/apps.json @@ -727,7 +727,7 @@ { "id": "gpsrec", "name": "GPS Recorder", - "version": "0.26", + "version": "0.27", "description": "Application that allows you to record a GPS track. Can run in background", "icon": "app.png", "tags": "tool,outdoors,gps,widget", @@ -4791,7 +4791,7 @@ "icon": "app.png", "allow_emulator": true, "tags": "tools, keyboard, text, scribble", - "supports" : ["BANGLEJS2"], + "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"scribble.app.js","url":"app.js"}, @@ -4801,5 +4801,5 @@ { "url":"screenshot.png" } ] } - + ] diff --git a/apps/gpsrec/ChangeLog b/apps/gpsrec/ChangeLog index cb22dd13f..365405846 100644 --- a/apps/gpsrec/ChangeLog +++ b/apps/gpsrec/ChangeLog @@ -28,3 +28,4 @@ 0.24: Better support for Bangle.js 2, avoid widget area for Graphs, smooth graphs more 0.25: Fix issue where if Bangle.js 2 got a GPS fix but no reported time, errors could be caused by the widget (fix #935) 0.26: Multiple bugfixes +0.27: Map drawing with light theme (fix #1023) diff --git a/apps/gpsrec/app.js b/apps/gpsrec/app.js index df3353930..833a816ea 100644 --- a/apps/gpsrec/app.js +++ b/apps/gpsrec/app.js @@ -197,15 +197,14 @@ function plotTrack(info) { g.setColor(1,0.5,0.5); g.setFont("Vector",16); g.drawString("Track"+info.fn.toString()+" - Loading",10,220); - g.setColor(0,0,0); + g.setColor(g.theme.bg); g.fillRect(0,220,239,239); if (!info.qOSTM) { g.setColor(1, 0, 0); g.fillRect(9,80,11,120); g.fillPoly([9,60,19,80,0,80]); - g.setColor(1,1,1); + g.setColor(g.theme.fg); g.drawString("N",2,40); - g.setColor(1,1,1); } else { osm.lat = info.lat; osm.lon = info.lon; @@ -228,7 +227,7 @@ function plotTrack(info) { g.setColor(0,1,0); g.fillCircle(mp.x,mp.y,5); if (info.qOSTM) g.setColor(1,0,0.55); - else g.setColor(1,1,1); + else g.setColor(g.theme.fg); l = f.readLine(f); while(l!==undefined) { c = l.split(","); @@ -248,11 +247,11 @@ function plotTrack(info) { g.setColor(1,0,0); g.fillCircle(ox,oy,5); if (info.qOSTM) g.setColor(0, 0, 0); - else g.setColor(1,1,1); + else g.setColor(g.theme.fg); g.drawString(require("locale").distance(dist),g.getWidth() / 2, g.getHeight() - 20); g.setFont("6x8",2); g.setFontAlign(0,0,3); - g.drawString("Back",g.getWidth() - 10, g.getHeight() - 40); + g.drawString("Back",g.getWidth() - 10, g.getHeight()/2); setWatch(function() { viewTrack(info.fn, info); }, global.BTN3||BTN1);