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.03: Permit exceptions to load in low-power mode, e.g. daylight saving time.
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;
},
btn: function () {
E.showPrompt("Restore watch to full power?").then(function (v) {
if (v) {
drainedRestore();
}
else {
reload();
}
});
var menu = {
"Restore to full power": drainedRestore,
"Enable BLE": function () { return NRF.wake(); },
"Settings": function () { return load("setting.app.js"); },
"Recovery": function () { return Bangle.showRecoveryMenu(); },
};
E.showMenu(menu);
}
});
Bangle.CLOCK = 1;

View File

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

View File

@ -1,7 +1,7 @@
{
"id": "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",
"readme": "README.md",
"icon": "icon.png",