btadv: typescript + icon

pull/2587/head
Rob Pilling 2023-01-20 21:15:11 +00:00
parent da58969924
commit 52894002e1
4 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,3 @@
// TODO debounce
const UPDATE_MILLISECONDS = 30 * 1000;
let acc: undefined | AccelData;
@ -217,7 +215,6 @@ const updateBleAdvert = () => {
// }
const encodeHrm = () => [0, hrm ? hrm.bpm : 0];
// TODO: emit this via set/updateServices
const encodeBarServiceData = (data: PressureData) => {
const t = toByteArray(Math.round(data.temperature * 100), 2, true);
const p = toByteArray(Math.round(data.pressure * 1000), 4, false);
@ -338,6 +335,8 @@ NRF.on("disconnect", () => {
updateInterval = undefined;
});
// TODO debounce
// TODO: emit other data beside HRM (via set/updateServices)
// FIXME: ui overlap
// Bangle.loadWidgets();
// Bangle.drawWidgets();

1
apps/btadv/icon.js Normal file
View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("AJpMMJA5mAPwA1AAyyd2EqCGWRouyggyvEBouMQRoiEBQKDMBoeEBg+ENEAgKBAhosHgxGIOCwgQCBROGPBhoITSA8GCQRoUgSAqGGSBYGtSJipTASE6RZgaBQUCJBAaELgQAGbQwGKGRgaIAAwWPAxQEBwRgEjBRMKfhQyIIBhoGmCQyKBhUwOGRRcGKwwMGMzQkGXxTcEZzAyK7hU2XIIG9QwuEKhWeYXSVwGcg3qIGQlWIkRlIEnhxuIGRxaGQRE8OGRxYIlBBaKGSUqKCCHkQKhxEWGRh8MIh08G8h0KKAgYgLhQAKRxwKHMVqMADwyCMjAyYMlkOEMlm0MGVQwsZWF2OAPwBaA="))

BIN
apps/btadv/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,9 +1,10 @@
{
"id": "btadv",
"name": "Export real-time sensor data over BLE",
"shortName": "btadv",
"version": "0.01",
"description": "Advertise & export live heart rate, accel, pressure, GPS & mag data over bluetooth",
"icon": "heartrate.png",
"icon": "icon.png",
"tags": "health,tool,sensors,bluetooth",
"supports": ["BANGLEJS2"],
"storage": [