I guess what might be happening is the widget gets Bangle.on('lcdPower' called before the multiclock face is called, so it's not turned on then. You could add a little delay to it?
Bangle.on('lcdPower', function(on) {
if (on) {
setTimeout(function() { WIDGETS.gps.draw(); }, 100); // <-- here
if (!timerInterval) timerInterval = setInterval(()=>WIDGETS["gps"].draw(), 2000);
} else {
if (timerInterval) {
clearInterval(timerInterval);
timerInterval = undefined;
}
}
});
or you could just overwrite the function when the widget is loaded so you respond immediately:
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.
Great! Yes, I'd say that looks good.
I guess what might be happening is the widget gets
Bangle.on('lcdPower'
called before the multiclock face is called, so it's not turned on then. You could add a little delay to it?or you could just overwrite the function when the widget is loaded so you respond immediately: