Create appb2.js
parent
4198189fbb
commit
992f4cdf88
|
|
@ -0,0 +1,16 @@
|
||||||
|
const SETTINGS_FILE = "torch.json";
|
||||||
|
let settings;
|
||||||
|
|
||||||
|
function loadSettings() {
|
||||||
|
settings = require("Storage").readJSON(SETTINGS_FILE,1)|| {'bg': '#FFFFFF', 'color': 'White'};
|
||||||
|
}
|
||||||
|
|
||||||
|
loadSettings();
|
||||||
|
|
||||||
|
Bangle.setLCDPower(1);
|
||||||
|
Bangle.setLCDTimeout(0);
|
||||||
|
g.reset();
|
||||||
|
g.setColor(settings.bg);
|
||||||
|
g.fillRect(0,0,g.getWidth(),g.getHeight());
|
||||||
|
// Any button turns off
|
||||||
|
setWatch(()=>load(), BTN1);
|
||||||
Loading…
Reference in New Issue