Skip to content

Commit

Permalink
Bangle.js: Change order of items in the Recovery Menu (hold BTN at bo…
Browse files Browse the repository at this point in the history
…ot) to put more common options first
  • Loading branch information
gfwilliams committed Oct 5, 2023
1 parent e3505a6 commit bbb6c89
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Ensure default args for arrow functions fail with error `(a,b=3)=>a+b` now fails (until default args get added)
nRF52: bootloader asks for connection interval 7.5->30ms now, not just 15ms. Should improve DFU on iOS 16 which doesn't honour 15ms request
Fix unicode in object keys when UTF8 support enabled, eg. {'\u00e4':1}
Bangle.js: Change order of items in the Recovery Menu (hold BTN at boot) to put more common options first

2v19 : Fix Object.values/entries for numeric keys after 2v18 regression (fix #2375)
nRF52: for SD>5 use static buffers for advertising and scan response data (#2367)
Expand Down
36 changes: 18 additions & 18 deletions libs/js/banglejs/Bangle_showRecoveryMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
NRF.removeAllListeners();
Bangle.setLCDBrightness(1);
E.showMenu({"":{title:"Recovery"},
"Attempt Compact": () => {
E.showMessage("Compacting...\nMay take\n5 min.");
if(!NRF.getSecurityStatus().connected)
Terminal.setConsole();
require("Storage").compact();
"Clean Boot": () => {
reset();
},
"Reboot": () => {
E.reboot();
},
"Rewrite Bootloader": () => {
setTimeout(load,1000);
eval(require("Storage").read("bootupdate.js"));
"Turn Off": () => {
Bangle.off();
},
"Factory Reset": () => {
E.showPrompt("Are you sure?\nThis will remove all data.",{title:"Factory Reset"}).then(ok => {
Expand All @@ -27,16 +25,7 @@
Terminal.setConsole();
Bangle.factoryReset();
});
},
"Clean Boot": () => {
reset();
},
"Reboot": () => {
E.reboot();
},
"Turn Off": () => {
Bangle.off();
},
},
"Exit": () => {
if (require("Storage").list().length>0) {
E.showMessage("Loading...");
Expand All @@ -47,5 +36,16 @@
E.reboot();
}
},
"Attempt Compact": () => {
E.showMessage("Compacting...\nMay take\n5 min.");
if(!NRF.getSecurityStatus().connected)
Terminal.setConsole();
require("Storage").compact();
E.reboot();
},
"Rewrite Bootloader": () => {
setTimeout(load,1000);
eval(require("Storage").read("bootupdate.js"));
},
});
})

0 comments on commit bbb6c89

Please sign in to comment.