Skip to content

Improve release action callback behavior in the example#28

Open
Avamander wants to merge 1 commit intoBodmer:mainfrom
Avamander:patch-1
Open

Improve release action callback behavior in the example#28
Avamander wants to merge 1 commit intoBodmer:mainfrom
Avamander:patch-1

Conversation

@Avamander
Copy link
Copy Markdown

Because releaseAction is not specific to a single button any random two taps can be made so that they fulfill the condition of millis() - btnL.getReleaseTime() >= waitTime and that will toggle the button. It would likely be better to keep track globally which specific button was actually released and toggle the state of only it.

This check avoids trying to visually toggle a button that wasn't held in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant