Merge pull request #2253 from thyttan/torch

[Torch] Comply w FW change back/btn
pull/2256/head
Gordon Williams 2022-11-11 09:04:33 +00:00 committed by GitHub
commit 8c75c07686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View File

@ -6,3 +6,4 @@
0.06: Press upper left corner to exit on Bangle.js 2
0.07: Code tweaks
0.08: Force background of widget field to the torch colour
0.09: Change code taking FW tweaks into account

View File

@ -16,10 +16,6 @@ g.setColor(settings.bg);
g.fillRect(0,0,g.getWidth(),g.getHeight());
Bangle.setUI({
mode : 'custom',
back : load, // B2: Clicking the hardware button or pressing upper left corner turns off (where red back button would be)
btn : (n)=>{ // B1: Any button turns off
if (process.env.HWVERSION==1 && (n==1 || n==2 || n==3)) {
load();
}
}
back : load, // B2: SW back button to exit
btn : ()=>{load();}, // B1&2: HW button to exit. // A simple 'load' as on the line above did not work for btn???
});

View File

@ -2,7 +2,7 @@
"id": "torch",
"name": "Torch",
"shortName": "Torch",
"version": "0.08",
"version": "0.09",
"description": "Turns screen white to help you see in the dark. Select from the launcher or press BTN1,BTN3,BTN1,BTN3 quickly to start when in any app that shows widgets on Bangle.js 1. You can also set the color through the app's setting menu.",
"icon": "app.png",
"tags": "tool,torch",