mirror of https://github.com/espruino/BangleApps
0.26: Remove buzz in setUI polyfill (#750)
parent
6a092262fd
commit
2dd8844a45
|
@ -4,7 +4,7 @@
|
|||
"tags": "tool,system",
|
||||
"type":"bootloader",
|
||||
"icon": "bootloader.png",
|
||||
"version":"0.25",
|
||||
"version":"0.26",
|
||||
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||
"storage": [
|
||||
{"name":".boot0","url":"boot0.js"},
|
||||
|
|
|
@ -24,3 +24,4 @@
|
|||
0.23: Move to a precalculated .boot0 file which should speed up load time
|
||||
0.24: Add Bangle.setUI polyfill
|
||||
0.25: Fix error in 'no clock app' message
|
||||
0.26: Remove buzz in setUI polyfill (#750)
|
||||
|
|
|
@ -97,25 +97,22 @@ if (Bangle.touchandler) {
|
|||
Bangle.removeListener("touch", Bangle.touchHandler);
|
||||
delete Bangle.touchHandler;
|
||||
}
|
||||
function b() {
|
||||
try{Bangle.buzz(20);}catch(e){}
|
||||
}
|
||||
if (!mode) return;
|
||||
else if (mode=="updown") {
|
||||
Bangle.btnWatches = [
|
||||
setWatch(function() { b();cb(-1); }, BTN1, {repeat:1}),
|
||||
setWatch(function() { b();cb(1); }, BTN3, {repeat:1}),
|
||||
setWatch(function() { b();cb(); }, BTN2, {repeat:1})
|
||||
setWatch(function() { cb(-1); }, BTN1, {repeat:1}),
|
||||
setWatch(function() { cb(1); }, BTN3, {repeat:1}),
|
||||
setWatch(function() { cb(); }, BTN2, {repeat:1})
|
||||
];
|
||||
} else if (mode=="leftright") {
|
||||
Bangle.btnWatches = [
|
||||
setWatch(function() { b();cb(-1); }, BTN1, {repeat:1}),
|
||||
setWatch(function() { b();cb(1); }, BTN3, {repeat:1}),
|
||||
setWatch(function() { b();cb(); }, BTN2, {repeat:1})
|
||||
setWatch(function() { cb(-1); }, BTN1, {repeat:1}),
|
||||
setWatch(function() { cb(1); }, BTN3, {repeat:1}),
|
||||
setWatch(function() { cb(); }, BTN2, {repeat:1})
|
||||
];
|
||||
Bangle.swipeHandler = d => {b();cb(d);};
|
||||
Bangle.swipeHandler = d => {cb(d);};
|
||||
Bangle.on("swipe", Bangle.swipeHandler);
|
||||
Bangle.touchHandler = d => {b();cb();};
|
||||
Bangle.touchHandler = d => {cb();};
|
||||
Bangle.on("touch", Bangle.touchHandler);
|
||||
} else
|
||||
throw new Error("Unknown UI mode");
|
||||
|
|
Loading…
Reference in New Issue