Code hopefully correct for B1

pull/2243/head
thyttan 2022-11-07 20:36:54 +01:00 committed by GitHub
parent 4d01bb44f2
commit 7a2acd8c48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -17,10 +17,8 @@ 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) {
setWatch(()=>load(), BTN1, {edge: 'rising'});
setWatch(()=>load(), BTN2, {edge: 'rising'});
setWatch(()=>load(), BTN3, {edge: 'rising'});
if (process.env.HWVERSION==1 && (n==1 || n==2 || n==3)) {
load();
}
},
});