Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Select button response when Long Press is enabled during CPU-intensive apps (WFM) #1304

Merged
merged 3 commits into from Jul 25, 2023

Conversation

NotherNgineer
Copy link
Contributor

@NotherNgineer NotherNgineer commented Jul 25, 2023

There's still some room for improvement on the select key response when "long press" is enabled, but this change basically resolves the issue with the frequency entry screen not being accessible in WFM mode due to missing "select" key presses.

Looks like several changes in this PR, but most of them were just moving code from the header module to the CPP module, and changing "0' to "false" for bool types.

When Long Press is enabled, the real button press is masked until either the button is released or the long press delay is reached. When the button is released, a simulated button press occurs. Previously, the simulated button press would be cleared on the next timer tick, so the EventDispatcher (which calls state()) might miss it. Now, I have added a "simulated_pulse_" flag to make sure that EventDispatcher sees the simulated pulse before clearing it.

I might have a better fix tomorrow, but this was a simple patch for now that gets the frequency entry screen working again in WFM mode after #1298.

@NotherNgineer NotherNgineer marked this pull request as ready for review July 25, 2023 00:37
@kallanreed kallanreed merged commit ea238f4 into portapack-mayhem:next Jul 25, 2023
3 checks passed
@NotherNgineer NotherNgineer deleted the long-press branch July 30, 2023 04:27
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.

None yet

2 participants