forked from espruino/BangleApps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snappybtn: new app. setWatch falling -> rising
Came out of this discussion: espruino#3435
- Loading branch information
thyttan
committed
Jun 8, 2024
1 parent
946d722
commit 0d77e45
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.01: New App! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Snappy Button (BETA) | ||
|
||
Make your Bangle.js 2 watch react quicker when you press the hardware button. | ||
|
||
## Usage | ||
|
||
Just install it from the app loader to enable the behaviour on your watch. | ||
|
||
## Features | ||
|
||
The Bangle.js 2 often reacts at first when the hardware button is released. **Snappy Button** changes this so it reacts as soon as the button is pressed down. | ||
|
||
When installed the app highjacks the `setWatch` function and changes the `edge` option from `"falling"` to `"rising"`. | ||
|
||
Snappy button can be incompatible with some apps **(breaking them!)** that uses long presses of the hardware button. This is worked around by hardcoding Snappy Button to not interfere with these apps. **Please if you encounter problems report them as per below!** | ||
|
||
## TODO | ||
|
||
- Disable for more incompatible apps as they are found. | ||
- Enable for Bangle.js 1? **Help with testing needed!** | ||
|
||
## Requests | ||
|
||
Mention @thyttan in an issue on the espruino/BangleApps repository if you encounter problems or have an idea for improving Snappy Button. | ||
|
||
Pull requests always welcome! | ||
|
||
This app was proposed on the espruino/BangleApps repository: [Discussion: HW buttons should act on 'rising' edge](https://github.com/espruino/BangleApps/issues/3435) . | ||
|
||
## Creator | ||
|
||
gfwilliams, thyttan |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
let _setWatch = setWatch; | ||
global.setWatch = (fn,pin,opt) => { | ||
if (opt && opt.edge && opt.edge!="both" && global.__FILE__!="runplus.app.js") opt.edge = "rising"; | ||
return _setWatch(fn, pin, opt); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ "id": "snappybtn", | ||
"name": "Snappy Button", | ||
"version":"0.01", | ||
"description": "Make your Bangle.js 2 watch react quicker when you press the hardware button.", | ||
"icon": "app.png", | ||
"tags": "ui,interface,ux,faster,quicker,shorter,speed", | ||
"type": "bootloader", | ||
"supports" : ["BANGLEJS2"], | ||
"readme": "README.md", | ||
"storage": [ | ||
{"name":"snappybtn.boot.js","url":"boot.js"}, | ||
] | ||
} |