-
• #2
Have you seen http://www.espruino.com/Bangle.js+Fast+Load ?
I can see you're still defining
function queueDraw()
/etc when you need to be doinglet queueDraw = function() { ...}
(for all functions in the global scope) so that might be causing you trouble -
• #3
EDIT: Gordon beat me to it.
-
• #4
Sorry, still learning. How does this work if I want to pass something to the function?
function doublenum(x) {
will that be like
let doublenum= function(x) {
?
-
• #5
Sorted it out. Looks if it is working so far. Thanks a million!
-
• #6
Current code attached (the bottom one) . There seems to still be a memory leak issue. Any advice?
Do I need to do something like
delete queueDraw; delete def; delete queueDrawSeconds; delete doublenum; delete draw; delete drawSeconds; delete getCurrentTimeFromOffset; delete updatePos; delete secondsMode; // etc.
?
2 Attachments
-
• #7
You shouldn't need to delete stuff if it was defined with
let/const
inside a{}
.Are you sure it's not modules? see http://www.espruino.com/Bangle.js+Fast+Load#testing-afterwards
All I can suggest is to maybe look at
Object.keys(global)
and see if there's anything there that shouldn't be
Current code attached.
When I change
in Line 123,
it does work when I open the launcher from the watchface. But when I get back to the watchface and open the launcher AGAIN, drawTimeoutSeconds seems to be undefined (and the seconds run behind the launcher) and the Timeout doesn't get cleared.
Any suggestions what I'm doing wrong here?
1 Attachment