Skip to content

Remove gamepad usage #48

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
merged 4 commits into from
Nov 9, 2021
Merged

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Jul 25, 2021

ref: #4940

This removes all usages of gamepad and gamepadshift and replaces them with the analogous APIs from keypad

I tested these changes on all affected devices supported by this library: PyBadge, PyGamer, CLUE, CPB+Gizmo, and PewPewM4 all on CircuitPython 7.0.0-alpha.5

@dhalbert
Copy link
Contributor

@kattni and I discussed a plan for this yesterday. If we substitute keypad for gamepad and gamepadshift right now, then it will break for users using CircuitPython 6.3.0. Instead, we can leave gamepad in for 7.0.0, but deprecate it. Once 7.0.0 is final, we will drop 6.3.0 support and can change the library. So this PR can just be held in abeyance until then.

The other possibility is to add conditional import code that allows either gamepad/gamepadshift or keypad to be used. If keypad is not present, then the library reverts to the old code. When 6.x is no longer supported, this code can be removed.

@FoamyGuy How does this sound to you?

@dhalbert dhalbert assigned dhalbert and unassigned dhalbert Jul 25, 2021
@FoamyGuy
Copy link
Contributor Author

Waiting until 7.0.0 is final sounds good to me.

I think making the code conditional and supporting both would end up being a bit overly complex due to the differing APIs between them.

@ladyada ladyada requested a review from kattni July 25, 2021 17:57
@kattni kattni marked this pull request as draft July 26, 2021 14:57
@kattni
Copy link
Contributor

kattni commented Jul 26, 2021

Converting this PR to draft status so it's clear we're waiting to merge it. Once 7.0.0 is released, we can revisit. Thanks!

@dhalbert
Copy link
Contributor

dhalbert commented Nov 9, 2021

We can proceed with this, right? See #52 for a user caught by this.

@dhalbert dhalbert marked this pull request as ready for review November 9, 2021 14:14
@dhalbert dhalbert marked this pull request as draft November 9, 2021 14:16
@kattni kattni marked this pull request as ready for review November 9, 2021 17:17
@kattni
Copy link
Contributor

kattni commented Nov 9, 2021

@FoamyGuy Can you please drop an empty commit in here so the checks run again? It's almost certainly out of date at this point. Once passing we can get this merged.

@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Nov 9, 2021

@kattni empty commit added. Will check back in a bit to see if anything needs tweaked to get it passing.

Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

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

Looks like it's passing! Thanks!

@kattni kattni merged commit a7e3aa0 into adafruit:main Nov 9, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 11, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_TM to 1.0.5 from 1.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_TM#7 from tekktrik/feature/add-typing
  > Updated readthedocs file
  > Updated readthedocs requirements path
  > Disabled unspecified-encoding pylint check
  > add docs link to readme
  > Globally disabled consider-using-f-string pylint check
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template

Updating https://github.com/adafruit/Adafruit_CircuitPython_AVRprog to 1.4.0 from 1.3.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#28 from mafiltenborg/patch-2
  > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#27 from mafiltenborg/patch-1
  > Updated readthedocs file
  > Disabled unspecified-encoding pylint check
  > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#26 from adafruit/patch-fix
  > PATCH Pylint and readthedocs patch test
  > add docs link to readme
  > Globally disabled consider-using-f-string pylint check
  > Moved default branch to main
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.6.0 from 3.5.1:
  > Updated readthedocs file
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#48 from FoamyGuy/remove_gamepad_usage
  > Disabled unspecified-encoding pylint check
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#51 from adafruit/patch-fix
  > PATCH Pylint and readthedocs patch test
  > add docs link to readme
  > Globally disabled consider-using-f-string pylint check
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