diff --git a/apps/multidice/ChangeLog b/apps/multidice/ChangeLog index 84b20801f..d139f16c5 100644 --- a/apps/multidice/ChangeLog +++ b/apps/multidice/ChangeLog @@ -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 diff --git a/apps/multidice/app.js b/apps/multidice/app.js index 9f74b1a09..c4597cdaf 100644 --- a/apps/multidice/app.js +++ b/apps/multidice/app.js @@ -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) { diff --git a/apps/multidice/metadata.json b/apps/multidice/metadata.json index a6de27ac1..e5d555fa8 100644 --- a/apps/multidice/metadata.json +++ b/apps/multidice/metadata.json @@ -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",