trying to add timeout after it's done buzzing... again
parent
09b2d9259f
commit
2e92b04af5
|
|
@ -25,3 +25,4 @@
|
|||
1.23: forgot to resolve the promise
|
||||
1.24: fixed dumb errors
|
||||
1.25: god I hope this works
|
||||
1.26: trying to add timeout after it's done buzzing... again
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ function touchHandler (button, xy) {
|
|||
|
||||
function accelHandler (xyz) {
|
||||
|
||||
if (xyz.diff >= 0.3) {
|
||||
if (xyz.diff >= 0.4) {
|
||||
|
||||
menu = false;
|
||||
mutex (rollDice);
|
||||
|
|
@ -111,11 +111,6 @@ function mutex (functionRef) {
|
|||
});
|
||||
}
|
||||
|
||||
function voidFn() {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function rollDice() {
|
||||
|
||||
resultsArr = new Uint8Array (8);
|
||||
|
|
@ -151,7 +146,16 @@ function rollDice() {
|
|||
|
||||
function vibrate() {
|
||||
|
||||
return Bangle.buzz(50, 0.5);
|
||||
return new Promise ((resolve, reject) => {
|
||||
|
||||
return Bangle.buzz (50, 0.5).then ((value) => {
|
||||
|
||||
setTimeout (() => {
|
||||
|
||||
resolve (value);
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function random (max) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "multidice",
|
||||
"name": "multiple dice roller",
|
||||
"shortName":"multidice",
|
||||
"version":"1.25",
|
||||
"version":"1.26",
|
||||
"description": "roll anywhere from 1-8 dice at the same time",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,game",
|
||||
|
|
|
|||
Loading…
Reference in New Issue