forked from FOSS/BangleApps
score: keep display powered on
parent
f6f1a1c352
commit
f5fefc7c99
|
@ -19,6 +19,8 @@ let correctionMode = false;
|
|||
let w = g.getWidth();
|
||||
let h = g.getHeight();
|
||||
|
||||
let isBangle1 = process.env.BOARD === 'BANGLEJS';
|
||||
|
||||
function getXCoord(func) {
|
||||
let offset = 40;
|
||||
return func(w-offset)+offset;
|
||||
|
@ -29,7 +31,6 @@ function getSecondsTime() {
|
|||
}
|
||||
|
||||
function setupInputWatchers(init) {
|
||||
isBangle1 = process.env.BOARD === 'BANGLEJS';
|
||||
Bangle.setUI('updown', v => {
|
||||
if (v) {
|
||||
if (isBangle1) {
|
||||
|
@ -458,6 +459,12 @@ function draw() {
|
|||
g.flip();
|
||||
}
|
||||
|
||||
// make sure LCD on Bangle.js 1 stays on
|
||||
if (isBangle1) {
|
||||
Bangle.setLCDTimeout(0);
|
||||
Bangle.setLCDPower(true);
|
||||
}
|
||||
|
||||
setupInputWatchers(true);
|
||||
setupMatch();
|
||||
draw();
|
||||
|
|
Loading…
Reference in New Issue