From f1453c5b8101de21970a9efbc011d331f09f3350 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 19 Aug 2024 13:51:28 -0400 Subject: [PATCH 01/11] Added OpenLocate Beacon app --- apps/openlocatebeacon/ChangeLog | 1 + apps/openlocatebeacon/README.md | 28 ++++ apps/openlocatebeacon/metadata.json | 19 +++ .../openlocatebeacon/openlocatebeacon-icon.js | 1 + apps/openlocatebeacon/openlocatebeacon.js | 123 ++++++++++++++++++ apps/openlocatebeacon/openlocatebeacon.png | Bin 0 -> 1977 bytes 6 files changed, 172 insertions(+) create mode 100644 apps/openlocatebeacon/ChangeLog create mode 100644 apps/openlocatebeacon/README.md create mode 100644 apps/openlocatebeacon/metadata.json create mode 100644 apps/openlocatebeacon/openlocatebeacon-icon.js create mode 100644 apps/openlocatebeacon/openlocatebeacon.js create mode 100644 apps/openlocatebeacon/openlocatebeacon.png diff --git a/apps/openlocatebeacon/ChangeLog b/apps/openlocatebeacon/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/openlocatebeacon/ChangeLog @@ -0,0 +1 @@ +0.01: New App! diff --git a/apps/openlocatebeacon/README.md b/apps/openlocatebeacon/README.md new file mode 100644 index 000000000..ef4d20a21 --- /dev/null +++ b/apps/openlocatebeacon/README.md @@ -0,0 +1,28 @@ +# OpenLocate Beacon + +Collect geolocation sensor data from the Bangle.js 2's GPS and barometer, display the live readings on-screen, and broadcast in Bluetooth Low Energy (BLE) OpenLocate Beacon packets (LCI over BLE) to any listening devices in range. + + +## Usage + +The advertising packets will be recognised by [Pareto Anywhere](https://www.reelyactive.com/pareto/anywhere/) open source middleware and any other program which observes the standard packet types. See our [Bangle.js Development Guide](https://reelyactive.github.io/diy/banglejs-dev/) for details. + + +## Features + +Advertises packets with the OpenLocate Beacon geolocation element when a GPS fix is available, and packets with the name "Bangle.js" otherwise. + + +## Controls + +None. + + +## Requests + +[Contact reelyActive](https://www.reelyactive.com/contact/) for support/updates. + + +## Creator + +Developed by [jeffyactive](https://github.com/jeffyactive) of [reelyActive](https://www.reelyactive.com) diff --git a/apps/openlocatebeacon/metadata.json b/apps/openlocatebeacon/metadata.json new file mode 100644 index 000000000..87e38f985 --- /dev/null +++ b/apps/openlocatebeacon/metadata.json @@ -0,0 +1,19 @@ +{ + "id": "openlocatebeacon", + "name": "OpenLocate Beacon", + "shortName": "OpenLocale Beacon", + "version": "0.01", + "description": "Advertise GPS geolocation date using the OpenLocate Beacon packet specification.", + "icon": "openlocatebeacon.png", + "screenshots": [], + "type": "app", + "tags": "tool,sensors,bluetooth", + "supports" : [ "BANGLEJS2" ], + "allow_emulator": true, + "readme": "README.md", + "storage": [ + { "name": "openlocatebeacon.app.js", "url": "openlocatebeacon.js" }, + { "name": "openlocatebeacon.img", "url": "openlocatebeacon-icon.js", + "evaluate": true } + ] +} \ No newline at end of file diff --git a/apps/openlocatebeacon/openlocatebeacon-icon.js b/apps/openlocatebeacon/openlocatebeacon-icon.js new file mode 100644 index 000000000..7e838aaa0 --- /dev/null +++ b/apps/openlocatebeacon/openlocatebeacon-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwhHXAB+sr1dnMzmcPh4DBnNdr2sDyAsOropCABczroyaxE5FhoAFnOIFqutFqgxE1ouSrwdHnWIxGz2YPBAYIHBnQTHrwuQLgwsBURwyGnIWN2bmFnR4S1oxFmZyCFx0zLY2r0md4AACzuk1ZjGDoowKCAk6JwuBFggAFzuBOApiEmYuIBwjSE2ddvOcFxIABzl5rpWErxQJN4QuIPIN5FpYADvKlFGAivGHZAuSGBCDEFwg6EOoZnBFyQwCK4mzQg4IECIYuBqzqKehVWDwxWFLwc5M4czLxPB5HP5/I4JgJmYfDnJgFEwJeFG4MyLw4tB6wPB6wxBMA8yRAhgDHAOtY44FBq2cFw3Qa4nX6AwGziQBEIwAB1o1DHoyOG4PPFwoAB56SGSAKBGA4SVDBgc6AwKOG45eGMAXHSAwbBnSQGnIvD1psFF43IXgQAF6yQGF4SQDXQczdwezF5pfJF5uzF4bED1gACF5KPSKoMzEY0PgAAJuQdFMAIvH5wQGuQkKABVOzhgG57BE63PLw2cpwvVkgvGGAPI5/Q6HP5AuGF4MkF6pgIAAPB4/H4ILHLxsrMBbBHABlyLxcrF5ZgKABJeOqyRMMCVyEBlWwLyNywuPyzsNwPXeS6NTAAPX67AMSKCNNXwIvBSBqRBGBlyRpqOCAAIRNSJiNPRwQABqwwPF5IuPqwvD1gUOSJKNPgGsF4bBPgEqSI2clQYOXoYADlbCUXiErFwyRQgCREuQVPRoqRTkmWFwOWXh6NHGCaRBRqAuLGCIAQFxowgFx70ClYtZlbqJMUZcRAA1WFqdWFq5jESp0rLbAyJq0rGggFBqwsSA==")) \ No newline at end of file diff --git a/apps/openlocatebeacon/openlocatebeacon.js b/apps/openlocatebeacon/openlocatebeacon.js new file mode 100644 index 000000000..fe2420173 --- /dev/null +++ b/apps/openlocatebeacon/openlocatebeacon.js @@ -0,0 +1,123 @@ +/** + * Copyright reelyActive 2024 + * We believe in an open Internet of Things + */ + + +// Non-user-configurable constants +const APP_ID = 'openlocatebeacon'; +const ADVERTISING_OPTIONS = { showName: false, interval: 5000 }; + + +// Global variables +let bar, gps; +let sequenceNumber = 0; + + +// Menus +let mainMenu = { + "": { "title": "OpenLocateBeacon" }, + "Lat": { value: null }, + "Lon": { value: null }, + "Altitude": { value: null }, + "Satellites": { value: null }, + "HDOP": { value: null } +}; + + +// Encode the OpenLocate geo location element advertising packet +function encodeGeoLocationElement() { + let lci = new Uint8Array(16); + let seqFrag = ((sequenceNumber++ & 0x0f) << 4) + 0x01; + let rfc6225lat = toRfc6225Coordinate(gps.lat); + let rfc6225lon = toRfc6225Coordinate(gps.lon); + let rfc6225alt = toRfc6225Coordinate(bar.altitude); + lci[0] = rfc6225lat.integer >> 7; + lci[1] = ((rfc6225lat.integer & 0xff) << 1) + (rfc6225lat.fraction >> 24); + lci[2] = (rfc6225lat.fraction >> 16) & 0xff; + lci[3] = (rfc6225lat.fraction >> 8) & 0xff; + lci[4] = rfc6225lat.fraction & 0xff; + lci[5] = rfc6225lon.integer >> 7; + lci[6] = ((rfc6225lon.integer & 0xff) << 1) + (rfc6225lon.fraction >> 24); + lci[7] = (rfc6225lon.fraction >> 16) & 0xff; + lci[8] = (rfc6225lon.fraction >> 8) & 0xff; + lci[9] = rfc6225lon.fraction & 0xff; + lci[10] = Number.isFinite(bar.altitude) ? 0x10 : 0x00; + lci[11] = (rfc6225alt.integer >> 16) & 0xff; + lci[12] = (rfc6225alt.integer >> 8) & 0xff; + lci[13] = rfc6225alt.integer & 0xff; + lci[14] = rfc6225alt.fraction & 0xff; + lci[15] = 0x41; + + return [ + 0x02, 0x01, 0x06, // Flags + 0x16, 0x16, 0x94, 0xfd, 0x09, seqFrag, 0x30, lci[0], lci[1], lci[2], + lci[3], lci[4], lci[5], lci[6], lci[7], lci[8], lci[9], lci[10], lci[11], + lci[12], lci[13], lci[14], lci[15] + ]; +} + + +// Convert a latitude or longitude coordinate to RFC6225 +function toRfc6225Coordinate(coordinate) { + let integer = Math.floor(coordinate); + let fraction = Math.round((coordinate - integer) * 0x1ffffff); + + if(integer < 0) { + integer += 0x1ff + 1; + } + + return { integer: integer, fraction: fraction }; +} + + +// Convert altitude to RFC6225 +function toRfc6225Altitude(altitude) { + if(!Number.isFinite(altitude)) { + return { integer: 0, fraction: 0 }; + } + + let integer = Math.floor(altitude); + let fraction = Math.round((altitude - integer) * 0xff); + + if(integer < 0) { + integer += 0x3fffff + 1; + } + + return { integer: integer, fraction: fraction }; +} + + +// Update barometer +Bangle.on('pressure', (newBar) => { + bar = newBar; + + mainMenu.Altitude.value = bar.altitude.toFixed(1) + 'm'; + E.showMenu(mainMenu); +}); + + +// Update GPS +Bangle.on('GPS', (newGps) => { + gps = newGps; + + mainMenu.Lat.value = gps.lat.toFixed(4); + mainMenu.Lon.value = gps.lon.toFixed(4); + mainMenu.Satellites.value = gps.satellites; + mainMenu.HDOP.value = (gps.hdop * 5).toFixed(1) + 'm'; + E.showMenu(gpsMenu); + + if(Number.isFinite(gps.lat) && Number.isFinite(gps.lon)) { + NRF.setAdvertising(encodeGeoLocationElement(), ADVERTISING_OPTIONS); + } + else { + NRF.setAdvertising({}, { name:"Bangle.js" }); + } +}); + + +// On start: enable sensors and display main menu +g.clear(); +Bangle.setGPSPower(true, APP_ID); +Bangle.setBarometerPower(true, APP_ID); +E.showMenu(mainMenu); \ No newline at end of file diff --git a/apps/openlocatebeacon/openlocatebeacon.png b/apps/openlocatebeacon/openlocatebeacon.png new file mode 100644 index 0000000000000000000000000000000000000000..b3294dae03285aa269545fe5b267ea6f357cc32a GIT binary patch literal 1977 zcmV;q2S)gbP)f7_p*YaLP86U;HN2;H3qFl1<^M+g?mBSd_c_)VV)srv@-O;2Os(Yhp5Y z3`xmX?6uUx$$8NkMaL>@sFrJJ3S>H2F?xmdG5og*{~#YCRM#0i1gfZQd@A*SMX|3@ z@8?61dN{&mpu3&s#Qb9a#La5mdy}?AeR1%;z2)1>FI8Q=@kdij`<=TeT;LXim;wPb zbuR=H@{U5B`gOs1pr)JcV^$Wb<(|pdZz`*4ZttKC&Hx(7lQQvBCa=mrn5{G>>XxZ0A<#YqL-E291 zu<*!7G3Sy-G#mWQdLI-naC>y+E2j?>+-#+05P_7v@_>a~U`J>Uftp&|$*#r&zuMep z&-vwY{U_>VR?Nr=NZRvVCtu^DVN1Lz44h zYR_>96qT{Zo*ld8#2veT-^Ioj{W{ZHFKJB`0=B^y-!W0Ogfvo=`zoxN8ia-#u z_AXP_?3T0KKG2%O752QC+++58VaJ(EPrs99GDcq4^^}jqeSrq@Hsk0C3)0Xor63D& zd#{Wmwj;_KsP0Bv;M=xcI{vf09d|n=3EOz+{PZoxasTLgxOp(@0vRn^jbqUc5h)09 zSV+5oq|FGROj!fP<{XyO{T7>WqR8geN6rS$->}N~{55@mS7~G>G@>0Mkdm^n=)1@y zO=CA6QpQCfY`>lfwgwu9UjaSgwBvB9OA*uvsV0OH%|; zP5}|<-J%jX5&Gdy`A5Fqc6&f_!Ts@HZZeE-(REilaYS4?gl~-DyO)c~c~#sx%Z>fG z*)R@L5WI2Adal9soP%ZqG*G5U%=h^9fUpU$g~@(zbnO59c#^Q`HVtYZ*?6a*m)afJ>$n92YM!&dAT zk3p&EoMNdg7kGnVVwD#?2`^E+j5kKqZk!IuWgjN%tdB$)zJAUL)_1X7A7#3dJ|GQe}I3fZH}ZJ#@M zVv=`%*ONT{)?+jcDt9iguasnp`YN6qOIvgdQi>+TCAZ|F?LRXtC65I!u^k5T_`&-{ z4wfc`sipabmwD|kQk0_hSN>HrZPBsP#4srfK1Qp&M2I=qX-ld+ZdI2l&U~qy-{ni^o2^v_PptKb=*)U@E;3hV|*whq=X?aqRDT z^tbYa0KRLf*y?IvaMvP~OLIT-=7ucOQr~$`O`TnE4Fp-y<`1!-4a8Z;b234mh z+93id_Yh$`E}4%HTlggVbB-#IQgPk+vPXFOL{ZCzs?TVp(7rHCNV$gy6A}_ahgBGU zANwYX-FltcXe=~-8zn?MLWGHmilW2LFlQL6oQ-b@YUZ)fQuQ*69Zm(ELWGHrkEg@V z5ah>Jk7Z4-Q9qB>WZ7In9{#9Sh%hFTi4MC!_ycU;G}i9T!hwtyG-`wh)6mf1yjX(^p zd@*KbX3|O52n}LIlRfV^5VlWYBYV?!H$V()pr)p#UcGwJdDoaZgq6;4w{Vy$n;~f0 zfdGhM4Fn`6CQ^!PbnnKJN3r_3G>0rqrHm3Z?LYt}i8WAdZLPn*KV`Ybpa7OL$@#)z zFn5w5Xa}qjz#$NjmX=0|Zt+|&E1u5oIxZY;k4S}@WK-{u+Uj3i61G4Isl5iP_TmIu-?K>@iAo&*)xC_KB zX8{fgug*+YfC!}Qceqn{2&AB{t}Y=V!K?S3J34BK3(+;1TQ>RYFXL Date: Mon, 19 Aug 2024 14:00:48 -0400 Subject: [PATCH 02/11] Corrected variable/function names --- apps/openlocatebeacon/openlocatebeacon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openlocatebeacon/openlocatebeacon.js b/apps/openlocatebeacon/openlocatebeacon.js index fe2420173..72a5a4547 100644 --- a/apps/openlocatebeacon/openlocatebeacon.js +++ b/apps/openlocatebeacon/openlocatebeacon.js @@ -31,7 +31,7 @@ function encodeGeoLocationElement() { let seqFrag = ((sequenceNumber++ & 0x0f) << 4) + 0x01; let rfc6225lat = toRfc6225Coordinate(gps.lat); let rfc6225lon = toRfc6225Coordinate(gps.lon); - let rfc6225alt = toRfc6225Coordinate(bar.altitude); + let rfc6225alt = toRfc6225Altitude(bar.altitude); lci[0] = rfc6225lat.integer >> 7; lci[1] = ((rfc6225lat.integer & 0xff) << 1) + (rfc6225lat.fraction >> 24); lci[2] = (rfc6225lat.fraction >> 16) & 0xff; @@ -105,7 +105,7 @@ Bangle.on('GPS', (newGps) => { mainMenu.Lon.value = gps.lon.toFixed(4); mainMenu.Satellites.value = gps.satellites; mainMenu.HDOP.value = (gps.hdop * 5).toFixed(1) + 'm'; - E.showMenu(gpsMenu); + E.showMenu(mainMenu); if(Number.isFinite(gps.lat) && Number.isFinite(gps.lon)) { NRF.setAdvertising(encodeGeoLocationElement(), ADVERTISING_OPTIONS); From 431f7570d73a46d23984ec8b60a7d66255bcf8f1 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 19 Aug 2024 17:47:59 -0400 Subject: [PATCH 03/11] Corrected shortName --- apps/openlocatebeacon/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openlocatebeacon/metadata.json b/apps/openlocatebeacon/metadata.json index 87e38f985..ff96a464e 100644 --- a/apps/openlocatebeacon/metadata.json +++ b/apps/openlocatebeacon/metadata.json @@ -1,7 +1,7 @@ { "id": "openlocatebeacon", "name": "OpenLocate Beacon", - "shortName": "OpenLocale Beacon", + "shortName": "OpenLocate Beacon", "version": "0.01", "description": "Advertise GPS geolocation date using the OpenLocate Beacon packet specification.", "icon": "openlocatebeacon.png", From 46de0a5ae87917445c4610c00fae650643ba525f Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 19 Aug 2024 18:00:30 -0400 Subject: [PATCH 04/11] Corrected test for NaN --- apps/openlocatebeacon/openlocatebeacon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openlocatebeacon/openlocatebeacon.js b/apps/openlocatebeacon/openlocatebeacon.js index 72a5a4547..b4f7ba5db 100644 --- a/apps/openlocatebeacon/openlocatebeacon.js +++ b/apps/openlocatebeacon/openlocatebeacon.js @@ -107,11 +107,11 @@ Bangle.on('GPS', (newGps) => { mainMenu.HDOP.value = (gps.hdop * 5).toFixed(1) + 'm'; E.showMenu(mainMenu); - if(Number.isFinite(gps.lat) && Number.isFinite(gps.lon)) { + if(!isNaN(gps.lat) && !isNaN(gps.lon)) { NRF.setAdvertising(encodeGeoLocationElement(), ADVERTISING_OPTIONS); } else { - NRF.setAdvertising({}, { name:"Bangle.js" }); + NRF.setAdvertising({}, { name: "Bangle.js" }); } }); From eb20a35e0d0b6ae547cd702241bb105888c874c2 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 19 Aug 2024 18:09:01 -0400 Subject: [PATCH 05/11] Version bump --- apps/openlocatebeacon/ChangeLog | 1 + apps/openlocatebeacon/metadata.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openlocatebeacon/ChangeLog b/apps/openlocatebeacon/ChangeLog index 5560f00bc..3b392b46b 100644 --- a/apps/openlocatebeacon/ChangeLog +++ b/apps/openlocatebeacon/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Corrected NaN test for GPS diff --git a/apps/openlocatebeacon/metadata.json b/apps/openlocatebeacon/metadata.json index ff96a464e..98a8a008f 100644 --- a/apps/openlocatebeacon/metadata.json +++ b/apps/openlocatebeacon/metadata.json @@ -2,7 +2,7 @@ "id": "openlocatebeacon", "name": "OpenLocate Beacon", "shortName": "OpenLocate Beacon", - "version": "0.01", + "version": "0.02", "description": "Advertise GPS geolocation date using the OpenLocate Beacon packet specification.", "icon": "openlocatebeacon.png", "screenshots": [], From 1443cc400046365cd7d54e9b2e91281128158fd4 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 19 Aug 2024 18:22:03 -0400 Subject: [PATCH 06/11] Removed remaining invalid references to Number.isFinite() --- apps/openlocatebeacon/ChangeLog | 1 + apps/openlocatebeacon/metadata.json | 2 +- apps/openlocatebeacon/openlocatebeacon.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openlocatebeacon/ChangeLog b/apps/openlocatebeacon/ChangeLog index 3b392b46b..2a9236565 100644 --- a/apps/openlocatebeacon/ChangeLog +++ b/apps/openlocatebeacon/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Corrected NaN test for GPS +0.03: Removed remaining invalid references to Number.isFinite diff --git a/apps/openlocatebeacon/metadata.json b/apps/openlocatebeacon/metadata.json index 98a8a008f..d46624b8b 100644 --- a/apps/openlocatebeacon/metadata.json +++ b/apps/openlocatebeacon/metadata.json @@ -2,7 +2,7 @@ "id": "openlocatebeacon", "name": "OpenLocate Beacon", "shortName": "OpenLocate Beacon", - "version": "0.02", + "version": "0.03", "description": "Advertise GPS geolocation date using the OpenLocate Beacon packet specification.", "icon": "openlocatebeacon.png", "screenshots": [], diff --git a/apps/openlocatebeacon/openlocatebeacon.js b/apps/openlocatebeacon/openlocatebeacon.js index b4f7ba5db..b240e6f6f 100644 --- a/apps/openlocatebeacon/openlocatebeacon.js +++ b/apps/openlocatebeacon/openlocatebeacon.js @@ -42,7 +42,7 @@ function encodeGeoLocationElement() { lci[7] = (rfc6225lon.fraction >> 16) & 0xff; lci[8] = (rfc6225lon.fraction >> 8) & 0xff; lci[9] = rfc6225lon.fraction & 0xff; - lci[10] = Number.isFinite(bar.altitude) ? 0x10 : 0x00; + lci[10] = bar.altitude ? 0x10 : 0x00; lci[11] = (rfc6225alt.integer >> 16) & 0xff; lci[12] = (rfc6225alt.integer >> 8) & 0xff; lci[13] = rfc6225alt.integer & 0xff; @@ -73,7 +73,7 @@ function toRfc6225Coordinate(coordinate) { // Convert altitude to RFC6225 function toRfc6225Altitude(altitude) { - if(!Number.isFinite(altitude)) { + if(!altitude) { return { integer: 0, fraction: 0 }; } From 058e19ad496f93a405a292d33fa3a2254fd5668c Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Tue, 20 Aug 2024 09:06:19 -0400 Subject: [PATCH 07/11] Corrected typo and removed extra newlines --- apps/openlocatebeacon/README.md | 9 --------- apps/openlocatebeacon/metadata.json | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/openlocatebeacon/README.md b/apps/openlocatebeacon/README.md index ef4d20a21..944bb51bf 100644 --- a/apps/openlocatebeacon/README.md +++ b/apps/openlocatebeacon/README.md @@ -2,27 +2,18 @@ Collect geolocation sensor data from the Bangle.js 2's GPS and barometer, display the live readings on-screen, and broadcast in Bluetooth Low Energy (BLE) OpenLocate Beacon packets (LCI over BLE) to any listening devices in range. - ## Usage The advertising packets will be recognised by [Pareto Anywhere](https://www.reelyactive.com/pareto/anywhere/) open source middleware and any other program which observes the standard packet types. See our [Bangle.js Development Guide](https://reelyactive.github.io/diy/banglejs-dev/) for details. - ## Features Advertises packets with the OpenLocate Beacon geolocation element when a GPS fix is available, and packets with the name "Bangle.js" otherwise. - -## Controls - -None. - - ## Requests [Contact reelyActive](https://www.reelyactive.com/contact/) for support/updates. - ## Creator Developed by [jeffyactive](https://github.com/jeffyactive) of [reelyActive](https://www.reelyactive.com) diff --git a/apps/openlocatebeacon/metadata.json b/apps/openlocatebeacon/metadata.json index d46624b8b..e029731a0 100644 --- a/apps/openlocatebeacon/metadata.json +++ b/apps/openlocatebeacon/metadata.json @@ -3,7 +3,7 @@ "name": "OpenLocate Beacon", "shortName": "OpenLocate Beacon", "version": "0.03", - "description": "Advertise GPS geolocation date using the OpenLocate Beacon packet specification.", + "description": "Advertise GPS geolocation data using the OpenLocate Beacon packet specification.", "icon": "openlocatebeacon.png", "screenshots": [], "type": "app", From 5d241b3830326fb2bf505bfcf1748bdee73c9667 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 26 Aug 2024 09:20:16 -0400 Subject: [PATCH 08/11] Removed HDOP from menu/display to elimate need for scrolling --- apps/openlocatebeacon/openlocatebeacon.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/openlocatebeacon/openlocatebeacon.js b/apps/openlocatebeacon/openlocatebeacon.js index b240e6f6f..2b7e10e54 100644 --- a/apps/openlocatebeacon/openlocatebeacon.js +++ b/apps/openlocatebeacon/openlocatebeacon.js @@ -20,8 +20,7 @@ let mainMenu = { "Lat": { value: null }, "Lon": { value: null }, "Altitude": { value: null }, - "Satellites": { value: null }, - "HDOP": { value: null } + "Satellites": { value: null } }; @@ -104,7 +103,6 @@ Bangle.on('GPS', (newGps) => { mainMenu.Lat.value = gps.lat.toFixed(4); mainMenu.Lon.value = gps.lon.toFixed(4); mainMenu.Satellites.value = gps.satellites; - mainMenu.HDOP.value = (gps.hdop * 5).toFixed(1) + 'm'; E.showMenu(mainMenu); if(!isNaN(gps.lat) && !isNaN(gps.lon)) { From fc4428a054e30fe191bf1c4c651016c3e97671bc Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 26 Aug 2024 09:22:16 -0400 Subject: [PATCH 09/11] Shortened menu title (app name) to fit screen --- apps/openlocatebeacon/openlocatebeacon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openlocatebeacon/openlocatebeacon.js b/apps/openlocatebeacon/openlocatebeacon.js index 2b7e10e54..0fa60419e 100644 --- a/apps/openlocatebeacon/openlocatebeacon.js +++ b/apps/openlocatebeacon/openlocatebeacon.js @@ -16,7 +16,7 @@ let sequenceNumber = 0; // Menus let mainMenu = { - "": { "title": "OpenLocateBeacon" }, + "": { "title": "OpenLocateBcn" }, "Lat": { value: null }, "Lon": { value: null }, "Altitude": { value: null }, From c330ef9cc07b2df382d592c489c1d40e12d4cc55 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 26 Aug 2024 09:24:50 -0400 Subject: [PATCH 10/11] Version bump --- apps/openlocatebeacon/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/openlocatebeacon/ChangeLog b/apps/openlocatebeacon/ChangeLog index 2a9236565..4a396d83f 100644 --- a/apps/openlocatebeacon/ChangeLog +++ b/apps/openlocatebeacon/ChangeLog @@ -1,3 +1,4 @@ 0.01: New App! 0.02: Corrected NaN test for GPS 0.03: Removed remaining invalid references to Number.isFinite +0.04: Improved menu/display interaction From d66fc98676fabcfacee08e142fc577c5bd6cbda0 Mon Sep 17 00:00:00 2001 From: jeffyactive Date: Mon, 26 Aug 2024 09:27:22 -0400 Subject: [PATCH 11/11] Corrected version number to match ChangeLog --- apps/openlocatebeacon/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openlocatebeacon/metadata.json b/apps/openlocatebeacon/metadata.json index e029731a0..85f7e2fee 100644 --- a/apps/openlocatebeacon/metadata.json +++ b/apps/openlocatebeacon/metadata.json @@ -2,7 +2,7 @@ "id": "openlocatebeacon", "name": "OpenLocate Beacon", "shortName": "OpenLocate Beacon", - "version": "0.03", + "version": "0.04", "description": "Advertise GPS geolocation data using the OpenLocate Beacon packet specification.", "icon": "openlocatebeacon.png", "screenshots": [],