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

Fix taskInputHandler, remove blocking delay, optimisations #795

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

Tawank
Copy link
Contributor

@Tawank Tawank commented Feb 8, 2025

Proposed Changes

  • Removed blocking delays in InputHandler tasks
  • Optimized button state reading. Instead of calling digitalRead() multiple times for the same button, we read once and store the result.

Types of Changes

Bugfix

Verification

Verification

  • Test by clicking buttons and waking up the device.
  • The device should now wake up instantly when a button is pressed.
  • Holding a button should not cause lag or unresponsiveness.
  • Keypresses should only be processed after wake-up, after 200ms delay, preventing accidental inputs.

User-Facing Change

- Removed blocking delays in Input Handler
- Optimized button state reading

Further Comments

@Tawank
Copy link
Contributor Author

Tawank commented Feb 8, 2025

I found out that when are you using keyboard it's a bit bugged.
When you click the button it sometimes get short click as longpress,
and when you push down e.g. the next key it goes back, back, etc. but when you lift a key sometimes it goes to next item.
I guess we need to change timings on keyboard, as previous timings included lags in them.

@Tawank
Copy link
Contributor Author

Tawank commented Feb 9, 2025

I fixed mykeyboard component, now it should be ok.

@pr3y pr3y merged commit 712663a into pr3y:main Feb 11, 2025
5 checks passed
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.

2 participants