Hi - that sounds like a good idea...
But yes, multiple calls to NRF.setAdvertising() could overwrite each other. To work around it you could do:
NRF.setAdvertising()
if (!Bangle.bleAdvert) Bangle.bleAdvert = {}; function advertiseBattery() { Bangle.bleAdvert[0x180F] = [E.getBattery()]; NRF.setAdvertising(Bangle.bleAdvert); }
Then as long as other apps followed the same form they could all work together
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi - that sounds like a good idea...
But yes, multiple calls to
NRF.setAdvertising()
could overwrite each other. To work around it you could do:Then as long as other apps followed the same form they could all work together