From ef8b26c4901c320f805de926dd976eb22a6b3a2e Mon Sep 17 00:00:00 2001 From: Le~Kat Date: Sat, 25 Feb 2023 13:00:36 -0500 Subject: [PATCH] enabled button usage & temporarily disabled acceleration --- apps/multidice/ChangeLog | 1 + apps/multidice/app.js | 15 ++++++++++++++- apps/multidice/metadata.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/multidice/ChangeLog b/apps/multidice/ChangeLog index 2e6b8c622..ff191cf13 100644 --- a/apps/multidice/ChangeLog +++ b/apps/multidice/ChangeLog @@ -15,3 +15,4 @@ 1.13: added a delay after the buzzer stops to prevent multi-rolling 1.14: made the delay needlessly long to see if it even does anything 1.15: moved accel & vibration commands to the accelHandler function +1.16: enabled button usage & temporarily disabled acceleration diff --git a/apps/multidice/app.js b/apps/multidice/app.js index 6dddf1e19..0893fe470 100644 --- a/apps/multidice/app.js +++ b/apps/multidice/app.js @@ -142,4 +142,17 @@ function random (max) { drawMenu(); Bangle.on ('touch', touchHandler); -Bangle.on ('accel', accelHandler); +//Bangle.on ('accel', accelHandler); +setWatch (function() { + + menu = false; + rollDice(); + + Bangle.buzz(50, 0.5).then (() => { + + setTimeout (function() { // wait 50ms *after* the buzzing has stopped + + //Bangle.on ('accel', accelHandler); + }, 50); + }); +}, BTN, {repeat: true, edge: "falling", debounce: 10}); diff --git a/apps/multidice/metadata.json b/apps/multidice/metadata.json index 7eb1c1607..9b2148682 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.15", + "version":"1.16", "description": "roll anywhere from 1-8 dice at the same time", "icon": "app.png", "tags": "tool,game",