Add longpressbuzz app (boot code)
parent
59b66684a6
commit
d758d655b5
|
|
@ -0,0 +1 @@
|
|||
0.01: New App!
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Long Press, Buzz!
|
||||
|
||||
Buzz on long press (assumed and hardcoded to 1500ms) to indicate the watch will be reinitiated per your command.
|
||||
|
||||
## Usage
|
||||
|
||||
Just install and it will run as boot code.
|
||||
|
||||
## Requests
|
||||
|
||||
Mention @[thyttan](https://github.com/thyttan) in an issue to the official [BangleApps repository](https://github.com/espruino/BangleApps/issues) for bug reports and feature requests.
|
||||
|
||||
## Creator
|
||||
|
||||
[thyttan](https://github.com/thyttan)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,6 @@
|
|||
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, 30, 0.30); }, BTN, {
|
||||
repeat:true, edge:'rising' });
|
||||
setWatch(function(e) { if (buzzTimeout) clearTimeout(buzzTimeout); }, BTN, {
|
||||
repeat:true, edge:'falling' });
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{ "id": "longpressbuzz",
|
||||
"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.",
|
||||
"icon": "app.png",
|
||||
"type": "bootloader",
|
||||
"tags": "",
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name":"longpressbuzz.boot.js","url":"boot.js"}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue