Skip to content

Add debouncer support for B,Select and Start buttons. #34

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

Merged

Conversation

flom84
Copy link
Contributor

@flom84 flom84 commented Feb 27, 2022

Hi

I have tried the buttons on my PyGamer and the UI runs quite smoothly with the de-bouncing enabled for all of them :)

This pull request is an attempt to introduce support for de-bouncing on all the PyGamer/PyBadge buttons.

I have extended the current API and kept the same function signature for the A button ( current applications that relies on this API would not be required to change if only A button is being used.)

@FoamyGuy
Copy link
Contributor

Thanks for working on these further enhancements!

Would you be willing to add a new file inside of examples/ directory that illustrates the usage of the new functionality?

@flom84
Copy link
Contributor Author

flom84 commented Feb 27, 2022

Sure, I can add code examples !

I will add another commit tomorrow or the day after.

@tekktrik
Copy link
Member

My computer died while I originally saw this, but it looks like your use of items() could be changed to keys() as well!

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this is late, just my above comment tagged on the line number!

@flom84
Copy link
Contributor Author

flom84 commented Mar 1, 2022

@FoamyGuy I have added a code example (four buttons that change colours when the real ones are pressed :) ) and the changes @tekktrik has requested.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for this new functionality @flom84

Looks good to me. Tested successfully on PyGamer 7.2.0

@FoamyGuy FoamyGuy merged commit 53ad808 into adafruit:main Mar 4, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 4, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 5.4.0 from 5.3.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#98 from tekktrik/dev/add-suspend-mode
  > Fixed readthedocs build

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol to 0.6.3 from 0.6.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP_ATcontrol#53 from sidikalamini/patch-1
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_INA219 to 3.4.12 from 3.4.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA219#30 from tekktrik/doc/fix-note
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_CursorControl to 2.7.0 from 2.6.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_CursorControl#34 from flom84/pygamer-start-select-buttons-debouncer
@flom84 flom84 deleted the pygamer-start-select-buttons-debouncer branch March 4, 2022 17:46
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.

3 participants