Skip to content
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

enabling analog addon bricks the controller after reconnect/reset #1183

Closed
MegaBitmap opened this issue Oct 3, 2024 · 2 comments · Fixed by #1184
Closed

enabling analog addon bricks the controller after reconnect/reset #1183

MegaBitmap opened this issue Oct 3, 2024 · 2 comments · Fixed by #1184
Labels
bug Something isn't working

Comments

@MegaBitmap
Copy link
Contributor

Expected Behavior

The controller should still work after multiple disconnect reconnect cycles with the analog addon enabled.

Current Behavior

With the current release 0.7.10, enabling the analog addon prevents the controller from working after a disconnect or reset.

Context

There seems to be a problem with this commit:
7491db6

With the current release 0.7.10, enabling the analog addon prevents the controller from working after a disconnect or reset.
I used the force_webconfig.uf2 to enter the web config then disabled the analog addon.
This fixed the controller buttons but then the analog sticks are disabled.
If I re-enable the analog sticks they work initially, but fails after a controller disconnect or reset.
I tried the PXPGamepad uf2 as well as WaveshareZero uf2 and both have the same issue.
The controller is not detected (I tried xinput and switch mode) and the only way to fix it was to use boot select mode.
The controller works if rebooted from within the webconfig gui, but as soon as the controller is disconnected or reset it fails.

I made a testing branch with this commit reverted:
https://github.com/MegaBitmap/GP2040-CE/tree/testing-24-10-3
After compiling a uf2 and flashing it, everything works perfectly with the analog addon enabled.
Even after multiple disconnect and reconnect/reset cycles everything works fine.

(Unrelated issue) Also with the latest pico-sdk there is a build error conflicting with Pico-PIO-USB.
I switched to pico-sdk v1.5.1 and there is no longer a build error with pio_sm_set_jmp_pin

Using windows 11 23H2 with edge browser

Steps to Reproduce

  1. enable analog addon in firmware 0.7.10
  2. Initially (on the fist reboot from within web config) everything works, analog sticks and all.
  3. After a USB disconnect or controller reset, after plugging the controller back in, the controller is not detected.
  4. The only way to fix it was to use the boot select button and flash old firmware or use force_webconfig.uf2.

Screenshots & Files

Reverting the changes from analog.cpp and analog.h fixes the issue.

@MegaBitmap MegaBitmap added the bug Something isn't working label Oct 3, 2024
@NickGuyver NickGuyver linked a pull request Oct 3, 2024 that will close this issue
@MegaBitmap
Copy link
Contributor Author

Thank you for solving the issue. That was fast!

@arntsonl
Copy link
Contributor

arntsonl commented Oct 4, 2024

Hot fix is live! Just download 0.7.10 and and flash the uf2 onto your device again. It won't change any of your settings and it will fix analog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants