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

Pin assigned to addon will not be unassigned #667

Closed
4 tasks done
jack2game opened this issue Dec 16, 2023 · 3 comments · Fixed by #726
Closed
4 tasks done

Pin assigned to addon will not be unassigned #667

jack2game opened this issue Dec 16, 2023 · 3 comments · Fixed by #726
Assignees

Comments

@jack2game
Copy link

jack2game commented Dec 16, 2023

Prerequisites

Please check the following before posting an issue / bug report.

  • I am running the latest version of the firmware - built from latest main branch
  • I have checked the documentation HERE and found no answer
  • I checked to make sure that this issue has not already been filed HERE
  • I am reporting the issue to the correct repository

Context

Please provide all relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Firmware Version: latest main
  • Name of device: pico
  • Link to where you purchased the device: x
  • Is this a custom build?: No
  • Operating System: Windows
  • Browser: Chrome

Expected Behavior

Pins previously assigned to addon should be automatically unassigned if unused, but this is not always the case.

Current Behavior

Taking Turbo addon for example

  • If PIN14 was previously assigned as Turbo pin
  • Then in the addon settings, change PIN14 to PIN16, and save
  • Both PIN14 and PIN16 will show as "Assigned to addon" in the Pin Mapping page, even when PIN14 shouldn't be
  • To unassign PIN14, you need to change the Turbo pin back to PIN14, save, then change to -1, save again

Steps to Reproduce

As explained above.

Screenshots & Files

x

@jack2game
Copy link
Author

Just want to add the comment above only works for Profile 1 (Base Profile):
"To unassign PIN14, you need to change the Turbo pin back to PIN14, save, then change to -1, save again"

For profile 2-4, there's actually no way to unassigned the previously assigned PINs.

Similarly, if any new PIN is assigned to a Addon, it only appears on Base Profile, but not Profile 2-4.

@bsstephan
Copy link
Contributor

Two things, though in general I believe all of this to be true.

* If PIN14 was previously assigned as Turbo pin

* Then in the addon settings, change PIN14 to PIN16, and save

* Both PIN14 and PIN16 will show as "Assigned to addon" in the Pin Mapping page, even when PIN14 shouldn't be

* To unassign PIN14, you need to change the Turbo pin back to PIN14, save, then change to -1, save again

I have some code that attempts to unassign the old pin, but it was overzealous is some form so I think it may not be triggering here when I intend it to. I can try to take a look.

Just want to add the comment above only works for Profile 1 (Base Profile): "To unassign PIN14, you need to change the Turbo pin back to PIN14, save, then change to -1, save again"

For profile 2-4, there's actually no way to unassigned the previously assigned PINs.

Similarly, if any new PIN is assigned to a Addon, it only appears on Base Profile, but not Profile 2-4.

This is a tricky one. I think this probably needs a UI/UX conversation, because the worst part is the "Assigned to Addon" pins in profiles 2-4 have no affect anyway, because profiles aren't allowed to unset the pins of addons at present. So, it's almost as if they shouldn't be restricted in profile 2-4, but what's probably better is they shouldn't even be reflected in those profiles' UI since they don't matter.

@bsstephan bsstephan self-assigned this Dec 18, 2023
bsstephan added a commit to bsstephan/GP2040-CE that referenced this issue Dec 27, 2023
docToPin and our USB D+/D- handling code only managed the core profile
configuration, but it also needs to set the fields in profiles.

fixes OpenStickCommunity#667
@bsstephan
Copy link
Contributor

#726 will address the latter problem where the assignments don't affect the profiles. It wasn't that tricky in the end. The former problem is trickier and needs another look, but the workaround above (assigning to -1 manually) works for the interim.

arntsonl pushed a commit that referenced this issue Dec 27, 2023
… pins (#726)

manage ASSIGNED_TO_ADDON profile pins as well as core pins

docToPin and our USB D+/D- handling code only managed the core profile
configuration, but it also needs to set the fields in profiles.

fixes #667
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 a pull request may close this issue.

2 participants