mirror of https://github.com/espruino/BangleApps
added a delay after the buzzer stops to prevent multi-rolling
parent
f9c338d90d
commit
a89f6cb4df
|
@ -12,3 +12,4 @@
|
|||
1.10: not having web bluetooth to debug is a PAIN
|
||||
1.11: decreased vibration time, decreased accel requirement
|
||||
1.12: issue with app calling roll function too many times at startup
|
||||
1.13: added a delay after the buzzer stops to prevent multi-rolling
|
||||
|
|
|
@ -126,7 +126,14 @@ function rollDice() {
|
|||
}
|
||||
}
|
||||
|
||||
vibrate();
|
||||
Bangle.on ('accel', voidFn);
|
||||
Bangle.buzz(50, 0.5).then (() => {
|
||||
|
||||
setTimeout (function() { // wait 50ms *after* the buzzing has stopped
|
||||
|
||||
Bangle.on ('accel', accelHandler);
|
||||
}, 50);
|
||||
});
|
||||
}
|
||||
|
||||
function random (max) {
|
||||
|
@ -134,15 +141,6 @@ function random (max) {
|
|||
return Math.round (Math.random() * (max - 1) + 1);
|
||||
}
|
||||
|
||||
function vibrate() {
|
||||
|
||||
Bangle.on ('accel', voidFn);
|
||||
Bangle.buzz(50, 0.5).then ((value) => {
|
||||
|
||||
Bangle.on ('accel', accelHandler);
|
||||
});
|
||||
}
|
||||
|
||||
drawMenu();
|
||||
Bangle.on ('touch', touchHandler);
|
||||
Bangle.on ('accel', accelHandler);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "multidice",
|
||||
"name": "multiple dice roller",
|
||||
"shortName":"multidice",
|
||||
"version":"1.12",
|
||||
"version":"1.13",
|
||||
"description": "roll anywhere from 1-8 dice at the same time",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,game",
|
||||
|
|
Loading…
Reference in New Issue