Oooh, yeah I did discover that because in my PR I had const {clock: clockApp} = ... and it died. I missed that one.
call load("clock_app_name.js")
It seems this is essentially having the same effect?
load the random clock on the lcdPower on event?
I did try that first! The thing is, it's better to have a little bit of flicker when the watch is going to sleep than when the watch is waking up. 99% of the time in the Real World™ I won't even see the flicker when the watch goes off, because I got what I needed and am not looking anymore. On the other hand, I will see it flicker every time before showing the clock, and that will (and did) drive me nuts :)
it would be pretty easy to call unload() and then eval() a new clock app
I did think about an approach like this but it's pretty intrusive in that 1. every clock app needs to conform and 2. it seems rather trivial to screw this up in any given clock app (even if there is an unload function), leading to leaks...
Thanks for responding :) I think the tl;dr for now is that what I have is the best that it can be without other deeper changes (e.g. firmware). I'm just happy I was able to get a random watch face!
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.
Oooh, yeah I did discover that because in my PR I had
const {clock: clockApp} = ...
and it died. I missed that one.It seems this is essentially having the same effect?
I did try that first! The thing is, it's better to have a little bit of flicker when the watch is going to sleep than when the watch is waking up. 99% of the time in the Real World™ I won't even see the flicker when the watch goes off, because I got what I needed and am not looking anymore. On the other hand, I will see it flicker every time before showing the clock, and that will (and did) drive me nuts :)
I did think about an approach like this but it's pretty intrusive in that 1. every clock app needs to conform and 2. it seems rather trivial to screw this up in any given clock app (even if there is an unload function), leading to leaks...
Thanks for responding :) I think the tl;dr for now is that what I have is the best that it can be without other deeper changes (e.g. firmware). I'm just happy I was able to get a random watch face!