Skip to content

bugfix(button): only install isr service once#87

Merged
finger563 merged 3 commits intomainfrom
bugfix/button-gpio-isr
Jul 11, 2023
Merged

bugfix(button): only install isr service once#87
finger563 merged 3 commits intomainfrom
bugfix/button-gpio-isr

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Jul 11, 2023

Description

  • Update button constructor to have a static bool tracking if the isr service was installed and if so, do not install it again
  • Updated example to have another button to ensure multiple buttons are supported with no warnings or anything

Motivation and Context

If you have multiple buttons, you get the following error:
CleanShot 2023-07-11 at 15 24 03
Note: This is a benign error as both buttons still work, but I don't like errors hence this PR :)

How has this been tested?

Building and running the example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2023-07-11 at 15 28 01

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Update button constructor to have a static bool tracking if the isr service was installed and if so, do not install it again
* Updated example to have another button to ensure multiple buttons are supported with no warnings or anything
@finger563 finger563 added bug Something isn't working button labels Jul 11, 2023
@finger563 finger563 merged commit d38b58d into main Jul 11, 2023
@finger563 finger563 deleted the bugfix/button-gpio-isr branch July 11, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working button

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant