Skip to content

Support & demo interrupt handlers for buttons#10

Merged
Gadgetoid merged 4 commits intomainfrom
feature/button-interrupt
Feb 3, 2022
Merged

Support & demo interrupt handlers for buttons#10
Gadgetoid merged 4 commits intomainfrom
feature/button-interrupt

Conversation

@Gadgetoid
Copy link
Copy Markdown
Member

This demo - inspired by #5 - attaches an interrupt handler to the Display HAT Mini buttons, and then feeds them into the PyGame event queue so they can be read as ordinary keys.

Buttons could generate pretty much any event, but I picked the a/b/x/y keycodes since these match the actual buttons.

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 3, 2022

Pull Request Test Coverage Report for Build 1790108513

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 49.398%

Files with Coverage Reduction New Missed Lines %
displayhatmini/init.py 3 75.93%
Totals Coverage Status
Change from base Build 1789624486: -0.6%
Covered Lines: 41
Relevant Lines: 83

💛 - Coveralls

This doesn't work so well on a Pi Zero 2, with intermittent flickers being much more obvious in the backlight than the RGB LED... but it's at least *something*.
@Gadgetoid Gadgetoid force-pushed the feature/button-interrupt branch from a2dea43 to 1feadd7 Compare February 3, 2022 15:27
@Gadgetoid Gadgetoid merged commit 0ace127 into main Feb 3, 2022
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