-
Notifications
You must be signed in to change notification settings - Fork 260
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
Migrate profiles to use GpioMappings, allowing extra buttons, DDI, and sliders in profiles #652
Merged
arntsonl
merged 10 commits into
OpenStickCommunity:main
from
bsstephan:migrate-profiles-to-gpios
Dec 6, 2023
Merged
Migrate profiles to use GpioMappings, allowing extra buttons, DDI, and sliders in profiles #652
arntsonl
merged 10 commits into
OpenStickCommunity:main
from
bsstephan:migrate-profiles-to-gpios
Dec 6, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
now that the core GpioMappings is a simple array, profiles can just simply be more arrays. this updates the protobuf config and migration, and *mostly* covers the gamepad functionality. "normal" profile changes work fine, but it doesn't yet know how to un/remap DDI and sliders, since those are currently managed at addon init time and don't get altered. I'll probably just have to add some hooks to reinit those, until we fold them into core proper
this allows profiles, which can map the DDI, JS slider, and SOCD slider options to pins in the core profile, to change those mappings in other profiles. this is of dubious utility for the sliders (you have to enable and thus they apply the default even if you don't have a pin mapped to them, so their default mode will override the ability to hotkey change them, and thus every practical use will probably keep the slider pins the same in all profiles), but relevant for DDI, where you may have DDI buttons on some profiles and extra inputs on others. nevertheless this is tested on all three of the "simple" addons
arntsonl
requested changes
Dec 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really small change and a question about the exact="true" stuff since I don't know what that means.
arntsonl
approved these changes
Dec 6, 2023
This was referenced Dec 7, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 refactors the profile code to be extra copies of
GpioMappings
, which moved the core code (and now the profiles, with this change) from button-to-pin to pin-to-action mapping. The core change allowed for arbitrary extra buttons and also moved the DDI and slider pin assignments into the core pin configuration, and now the same applies to profiles.@Pelsin contributed all the UI code, and I am as always thankful for that. Note that the profiles have moved to the pin mapping page, and now the pin mapping page has four tabs, for the core config + 3 extra profiles.
CAVEATS:
Getting this one out there for people to play with and review.