From 3a5a6f47a58322bfe8b7da6b20187db43e4d9a8b Mon Sep 17 00:00:00 2001 From: Le~Kat Date: Sat, 25 Feb 2023 13:27:12 -0500 Subject: [PATCH] decided to keep around the button even while testing, disabled all safety round the accelHandler self-triggering --- apps/multidice/ChangeLog | 1 + apps/multidice/app.js | 10 +++++----- apps/multidice/metadata.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/multidice/ChangeLog b/apps/multidice/ChangeLog index 651233c63..ec0d407b8 100644 --- a/apps/multidice/ChangeLog +++ b/apps/multidice/ChangeLog @@ -17,3 +17,4 @@ 1.15: moved accel & vibration commands to the accelHandler function 1.16: enabled button usage & temporarily disabled acceleration 1.17: made changes to when accelHandler gets overwritten, temporarily disabled button usage +1.18: decided to keep around the button even while testing, disabled all safety round the accelHandler self-triggering diff --git a/apps/multidice/app.js b/apps/multidice/app.js index 3789dc04b..940de3eb3 100644 --- a/apps/multidice/app.js +++ b/apps/multidice/app.js @@ -83,12 +83,12 @@ function accelHandler (xyz) { if (xyz.diff >= 0.3) { - Bangle.on ('accel', voidFn); // temporarily disable more acceleration events + //Bangle.on ('accel', voidFn); // temporarily disable more acceleration events menu = false; rollDice (function() { - Bangle.on ('accel', accelHandler); // re-enable acceleration events + //Bangle.on ('accel', accelHandler); // re-enable acceleration events }); } } @@ -147,9 +147,9 @@ function random (max) { drawMenu(); Bangle.on ('touch', touchHandler); Bangle.on ('accel', accelHandler); -/*setWatch (function() { +setWatch (function() { menu = false; - rollDice(); + rollDice (voidFn); -}, BTN, {repeat: true, edge: "falling", debounce: 10});*/ +}, BTN, {repeat: true, edge: "falling", debounce: 10}); diff --git a/apps/multidice/metadata.json b/apps/multidice/metadata.json index 8a78fe22a..7b45f11eb 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.17", + "version":"1.18", "description": "roll anywhere from 1-8 dice at the same time", "icon": "app.png", "tags": "tool,game",