Skip to content

Commit

Permalink
Bangle_setUI_F18: add btnRelease (read below)
Browse files Browse the repository at this point in the history
Explicitly state button should fire on falling edge.

Does not change `btn` mapped handlers to act on rising edge just jet.

As per suggestion in
espruino#2571 (comment).
  • Loading branch information
thyttan committed Nov 1, 2024
1 parent 269b3e3 commit cdfb4d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/js/banglejs/Bangle_setUI_F18.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
Bangle.swipeHandler = options.swipe;
Bangle.on("swipe", Bangle.swipeHandler);
}
if (options.btn) {
if (options.btn || options.btnRelease) {
Bangle.btnWatches = [
setWatch(function() { options.btn(1); }, BTN1, {repeat:1,edge:"falling"}),
setWatch(function() { options.btn(2); }, BTN2, {repeat:1,edge:"falling"}),
Expand Down

0 comments on commit cdfb4d6

Please sign in to comment.