-
• #2
Hi,
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? -
• #3
Yes ,
Bangle.bleAdvert
does exist. I think it just gets set once though, and doesn't get updated. -
• #4
You're right. Large Clock does a
clearInterval()
when it starts.What do you think can be done about that?
g.clear(); clearInterval(); drawClockFace(); interval = setInterval(drawClockFace, REFRESH_RATE); Bangle.loadWidgets(); Bangle.drawWidgets();
-
• #5
I think these are all the places where
clearInterval()
is called. Presumably they break all boot code or widgets that use an interval?https://github.com/espruino/BangleApps/blob/f17ddbc652385870a4975fc05a9f74ac3cbd921c/apps/largeclock/largeclock.js#L201
https://github.com/espruino/BangleApps/blob/2bbecfc7f3b22dfecd3dd304d1ba028cf445e519/apps/alarm/alarm.js#L3
https://github.com/espruino/BangleApps/blob/a8953f40ea88f5b71dddb885c2495c96c57282cd/apps/trex/trex.js#L160
https://github.com/espruino/BangleApps/blob/81b5d5e8e2717c9649ee71e1604bd01c6433a30a/apps/pong/app.js#L401 -
• #6
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?
-
• #7
I can give it a go. Thanks Gordon.
-
• #8
Great - thanks!
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?
Thanks.