diff --git a/apps/longpressbuzz/README.md b/apps/longpressbuzz/README.md index 7f094e191..f145e38a7 100644 --- a/apps/longpressbuzz/README.md +++ b/apps/longpressbuzz/README.md @@ -1,6 +1,6 @@ # Long Press, Buzz! -Buzz on long press (assumed and hardcoded to 1500ms) to indicate the watch will be reinitiated per your command. +Buzz at boot after a long press to indicate the watch was reinitiated per your command. ## Usage diff --git a/apps/longpressbuzz/boot.js b/apps/longpressbuzz/boot.js index 42cef9890..05bc4a9b3 100644 --- a/apps/longpressbuzz/boot.js +++ b/apps/longpressbuzz/boot.js @@ -1,6 +1 @@ -let btnLoadTimeout = 1500; //Bangle.getOptions().btnLoadTimeout; // Hardcode value to minimize impact on load time at boot. Change to the commented out code to couple it to the actual system setting in the options object. -let buzzTimeout; -setWatch(function(e) { buzzTimeout = setTimeout(Bangle.buzz, btnLoadTimeout-100, 45, 0.35); }, BTN, { -repeat:true, edge:'rising' }); -setWatch(function(e) { if (buzzTimeout) clearTimeout(buzzTimeout); }, BTN, { -repeat:true, edge:'falling' }); +if (BTN.read()) Bangle.buzz(80,0.40); diff --git a/apps/longpressbuzz/metadata.json b/apps/longpressbuzz/metadata.json index 58b8f7cef..f978bf113 100644 --- a/apps/longpressbuzz/metadata.json +++ b/apps/longpressbuzz/metadata.json @@ -2,13 +2,13 @@ "name": "Long Press, Buzz!", "shortName":"LPB", "version":"0.01", - "description": "Buzz on long press (assumed and hardcoded to 1500ms) to indicate the watch will be reinitiated per your command.", + "description": "Buzz at boot after a long press to indicate the watch was reinitiated per your command.", "icon": "app.png", "type": "bootloader", "tags": "system", "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ - {"name":"longpressbuzz.boot.js","url":"boot.js"} + {"name":"longpressbuzz.0.boot.js","url":"boot.js"} ] }