Skip to content

Commit e9d3c1d

Browse files
authored
[lightswitch] Add setLCDPower for unlocking
1 parent 04d497a commit e9d3c1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/lightswitch/lib.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ exports = {
1010
unlockSide: "",
1111
tapSide: "right",
1212
tapOn: "always",
13+
isOn: true
1314
}, require("Storage").readJSON("lightswitch.json", true) || {});
1415

1516
// cache lock status
1617
var locked = Bangle.isLocked();
1718

1819
// check to unlock
19-
if (locked && data.dir === w.unlockSide) Bangle.setLocked();
20+
if (locked && data.dir === w.unlockSide) {
21+
Bangle.setLocked();
22+
if (w.isOn) Bangle.setLCDPower(true);
23+
}
2024

2125
// check to flash
2226
if (data.dir === w.tapSide && (w.tapOn === "always" || locked === (w.tapOn === "locked"))) require("lightswitch.js").flash();

0 commit comments

Comments
 (0)