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 w = g.getWidth();
|
||||||
let h = g.getHeight();
|
let h = g.getHeight();
|
||||||
|
|
||||||
|
let isBangle1 = process.env.BOARD === 'BANGLEJS';
|
||||||
|
|
||||||
function getXCoord(func) {
|
function getXCoord(func) {
|
||||||
let offset = 40;
|
let offset = 40;
|
||||||
return func(w-offset)+offset;
|
return func(w-offset)+offset;
|
||||||
|
@ -29,7 +31,6 @@ function getSecondsTime() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupInputWatchers(init) {
|
function setupInputWatchers(init) {
|
||||||
isBangle1 = process.env.BOARD === 'BANGLEJS';
|
|
||||||
Bangle.setUI('updown', v => {
|
Bangle.setUI('updown', v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
if (isBangle1) {
|
if (isBangle1) {
|
||||||
|
@ -458,6 +459,12 @@ function draw() {
|
||||||
g.flip();
|
g.flip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure LCD on Bangle.js 1 stays on
|
||||||
|
if (isBangle1) {
|
||||||
|
Bangle.setLCDTimeout(0);
|
||||||
|
Bangle.setLCDPower(true);
|
||||||
|
}
|
||||||
|
|
||||||
setupInputWatchers(true);
|
setupInputWatchers(true);
|
||||||
setupMatch();
|
setupMatch();
|
||||||
draw();
|
draw();
|
||||||
|
|
Loading…
Reference in New Issue