Hi. I have BLE GATT Battery Service installed, but I'm finding that it doesn't always work. If I'm clicking around Settings it's fine, or of I leave the watch on Morphing Clock it's fine, but if I leave the watch on Large Clock it doesn't work.
Does an app have to do something to make sure boot code continues to run in the background?
That's an odd one. No, nothing should be needed.
Maybe log in with the IDE and check if Bangle.bleAdvert exists? At least that'll show if it has ever run.
I guess it's possible that Large Clock does clearInterval() which might blow away any existing intervals, like the one the updates the battery level?
Yes , Bangle.bleAdvert does exist. I think it just gets set once though, and doesn't get updated.
You're right. Large Clock does a clearInterval() when it starts.
What do you think can be done about that?
interval = setInterval(drawClockFace, REFRESH_RATE);
I think these are all the places where clearInterval() is called. Presumably they break all boot code or widgets that use an interval?
Yes - thanks for checking. Ideally all of those would be modified.
I guess out of those, Large Clock is the only one where it's really likely to cause you problems though, because the others don't tend to have widgets and/or aren't something you'd have running for a long period.
Also, in Large Clock that line is totally pointless and could just be removed
Are you interested in making the changes, or shall I do it?
I can give it a go. Thanks Gordon.
Great - thanks!
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem