not having web bluetooth to debug is a PAIN

master
Le~Kat 2023-02-25 10:06:52 -05:00
parent 13c5b41aef
commit 1499a524d9
3 changed files with 14 additions and 2 deletions

View File

@ -9,3 +9,4 @@
1.07: IDK how to use promises properly
1.08: still trying to fix the lack of vibrations
1.09: hopefully now it's fixed?
1.10: not having web bluetooth to debug is a PAIN

View File

@ -35,6 +35,9 @@ function touchHandler (button, xy) {
return;
}
rollDice();
return;
if (xy.x <= 87) { // left
if (xy.y <= 43) {
@ -122,6 +125,13 @@ function rollDice() {
g.drawString ((" " + resultsArr [i]).slice (-3), 96, 10 + 40 * (i - 4));
}
}
Bangle.on ('accel', voidFn);
console.log ("before");
Bangle.buzz().then(()=>{
Bangle.on ('accel', accelHandler);
});
console.log ("after");
}
function random (max) {
@ -134,7 +144,8 @@ function vibrate() {
Bangle.on ('accel', voidFn);
Bangle.buzz().then ((value) => {
Bangle.on ('accel', accelHandler)
console.log ("I ran.");
Bangle.on ('accel', accelHandler);
});
}

View File

@ -1,7 +1,7 @@
{ "id": "multidice",
"name": "multiple dice roller",
"shortName":"multidice",
"version":"1.09",
"version":"1.10",
"description": "roll anywhere from 1-8 dice at the same time",
"icon": "app.png",
"tags": "tool,game",