drained: add more options to menu for escaping

master
Rob Pilling 2024-01-28 20:42:42 +00:00
parent cb2593337d
commit 6fd81fd36a
4 changed files with 16 additions and 16 deletions

View File

@ -2,3 +2,4 @@
0.02: Allow boot exceptions, e.g. to load DST 0.02: Allow boot exceptions, e.g. to load DST
0.03: Permit exceptions to load in low-power mode, e.g. daylight saving time. 0.03: Permit exceptions to load in low-power mode, e.g. daylight saving time.
Also avoid polluting global scope. Also avoid polluting global scope.
0.04: Enhance menu: enable bluetooth, visit settings & visit recovery

View File

@ -61,14 +61,13 @@ var reload = function () {
nextDraw = undefined; nextDraw = undefined;
}, },
btn: function () { btn: function () {
E.showPrompt("Restore watch to full power?").then(function (v) { var menu = {
if (v) { "Restore to full power": drainedRestore,
drainedRestore(); "Enable BLE": function () { return NRF.wake(); },
} "Settings": function () { return load("setting.app.js"); },
else { "Recovery": function () { return Bangle.showRecoveryMenu(); },
reload(); };
} E.showMenu(menu);
});
} }
}); });
Bangle.CLOCK = 1; Bangle.CLOCK = 1;

View File

@ -79,13 +79,13 @@ const reload = () => {
nextDraw = undefined; nextDraw = undefined;
}, },
btn: () => { btn: () => {
E.showPrompt("Restore watch to full power?").then(v => { const menu = {
if(v){ "Restore to full power": drainedRestore,
drainedRestore(); "Enable BLE": () => NRF.wake(),
}else{ "Settings": () => load("setting.app.js"),
reload(); "Recovery": () => Bangle.showRecoveryMenu(),
} };
}) E.showMenu(menu);
} }
}); });
Bangle.CLOCK=1; Bangle.CLOCK=1;

View File

@ -1,7 +1,7 @@
{ {
"id": "drained", "id": "drained",
"name": "Drained", "name": "Drained",
"version": "0.03", "version": "0.04",
"description": "Switches to displaying a simple clock when the battery percentage is low, and disables some peripherals", "description": "Switches to displaying a simple clock when the battery percentage is low, and disables some peripherals",
"readme": "README.md", "readme": "README.md",
"icon": "icon.png", "icon": "icon.png",