From e9d3c1d6b8068f668debadbcf89e5e4c4e7a9f08 Mon Sep 17 00:00:00 2001 From: storm64 Date: Wed, 7 May 2025 12:13:01 +0200 Subject: [PATCH] [lightswitch] Add setLCDPower for unlocking --- apps/lightswitch/lib.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/lightswitch/lib.js b/apps/lightswitch/lib.js index 024da737d..446291f1e 100644 --- a/apps/lightswitch/lib.js +++ b/apps/lightswitch/lib.js @@ -10,13 +10,17 @@ exports = { unlockSide: "", tapSide: "right", tapOn: "always", + isOn: true }, require("Storage").readJSON("lightswitch.json", true) || {}); // cache lock status var locked = Bangle.isLocked(); // check to unlock - if (locked && data.dir === w.unlockSide) Bangle.setLocked(); + if (locked && data.dir === w.unlockSide) { + Bangle.setLocked(); + if (w.isOn) Bangle.setLCDPower(true); + } // check to flash if (data.dir === w.tapSide && (w.tapOn === "always" || locked === (w.tapOn === "locked"))) require("lightswitch.js").flash();