removing use of gamepad #48
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a breaking change! We will need to bump the major version if/when it's merged and released.
This removes the use of
gamepad
from the library which has been removed from the CircuitPython core (ref #4940). The only thing that this library used it for was thewere_pressed
API. This PR removes thewere_pressed
property and updates the relevant examples to useclue.button_a
andclue.button_b
instead ofwere_pressed
While working on this I also removed the lines in the advanced ams example like this one:
It seems to me these were accidental / unnecessary. The only other use of the
a
variable is before the main loop starts and was for the BLE advertisement rather than anything related to buttons. Nothing else in the main loop seemed to be accessing this value after it was being set based on the button value.I do not have an Apple media device to test the updated examples with, but I did test out that section of the code on a CLUE with CircuitPython
7.0.0-alpha.5
by running this minimal example that uses the same logic. Everything appears to be working as intended.