Change to boot code, instead of widget
parent
65fa125774
commit
ffc057654b
|
|
@ -2133,14 +2133,14 @@
|
||||||
{ "id": "widgattbat",
|
{ "id": "widgattbat",
|
||||||
"name": "BLE GATT Battery Service",
|
"name": "BLE GATT Battery Service",
|
||||||
"shortName":"BLE Battery Service",
|
"shortName":"BLE Battery Service",
|
||||||
"icon": "widget.png",
|
"icon": "bluetooth.png",
|
||||||
"version":"0.01",
|
"version":"0.01",
|
||||||
"description": "Adds the GATT Battery Service to advertise the percentage of battery currently remaining over Bluetooth.\n",
|
"description": "Adds the GATT Battery Service to advertise the percentage of battery currently remaining over Bluetooth.\n",
|
||||||
"tags": "ble,bluetooth,gatt,widget",
|
"tags": "battery,ble,bluetooth,gatt,widget",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"gattbat.wid.js","url":"widget.js"}
|
{"name":"gattbat.boot.js","url":"boot.js"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
|
@ -7,10 +7,4 @@
|
||||||
if (!Bangle.bleAdvert) Bangle.bleAdvert = {};
|
if (!Bangle.bleAdvert) Bangle.bleAdvert = {};
|
||||||
setInterval(advertiseBattery, 60 * 1000);
|
setInterval(advertiseBattery, 60 * 1000);
|
||||||
advertiseBattery();
|
advertiseBattery();
|
||||||
|
})();
|
||||||
WIDGETS["gattbat"]={
|
|
||||||
area:"tl",
|
|
||||||
width:0,
|
|
||||||
draw:function() {}
|
|
||||||
};
|
|
||||||
})()
|
|
||||||
Loading…
Reference in New Issue