Update fuzzyw.app.js
parent
eb0d809a61
commit
f0fce411b9
|
|
@ -62,11 +62,11 @@ draw();
|
||||||
|
|
||||||
// Stop updates when LCD is off, restart when on
|
// Stop updates when LCD is off, restart when on
|
||||||
Bangle.on('lcdPower',on=>{
|
Bangle.on('lcdPower',on=>{
|
||||||
if (secondInterval) clearInterval(secondInterval);
|
|
||||||
secondInterval = undefined;
|
|
||||||
if (on) {
|
if (on) {
|
||||||
secondInterval = setInterval(draw, 10000);
|
draw(); // draw immediately, queue redraw
|
||||||
draw(); // draw immediately
|
} else { // stop draw timer
|
||||||
|
if (drawTimeout) clearTimeout(drawTimeout);
|
||||||
|
drawTimeout = undefined;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue