feat: Add per-profile keyboard mapping and per-pin GPIO polarity support#1566
Open
yun-wulian wants to merge 3 commits intoOpenStickCommunity:mainfrom
Open
feat: Add per-profile keyboard mapping and per-pin GPIO polarity support#1566yun-wulian wants to merge 3 commits intoOpenStickCommunity:mainfrom
yun-wulian wants to merge 3 commits intoOpenStickCommunity:mainfrom
Conversation
### Details - Add keyboardMapping field to GpioMappings proto message for per-profile storage - Update storagemanager to return profile-aware keyboard mapping - Add keyboard mapping read/write to webconfig profile API - Add profile selector UI in SettingsPage for keyboard mode - Add KeyboardMappingType to useProfilesStore - Add localization strings (en, zh-CN) - Include implementation plan document Key files: - proto/config.proto: Added keyboardMapping to GpioMappings - src/storagemanager.cpp: Profile-aware getKeyboardMapping() - src/webconfig.cpp: Profile API keyboard mapping support - www/src/Pages/SettingsPage.jsx: Profile selector dropdown ### Impact - User-facing: yes - Breaking change: no
### Details - Add invertPolarity field to GpioMappingInfo proto (default: true) - Add enablePinInversion global toggle to GamepadOptions (default: false) - Implement getInversionMask() in storagemanager to build per-pin mask - Modify debounceGpioGetAll() to use XOR with inversion mask - Add per-pin Invert checkbox in Pin Mapping UI - Add global Enable Per-Pin Inversion toggle in Settings page - Add localization strings (en, zh-CN) Key files: - proto/config.proto: New invertPolarity and enablePinInversion fields - src/gp2040.cpp: XOR-based selective inversion in debounceGpioGetAll() - src/storagemanager.cpp: getInversionMask() implementation - www/src/Pages/PinMapping.tsx: Per-pin inversion toggle UI ### Impact - User-facing: yes - Breaking change: no
Contributor
|
Hi @yun-wulian , Thank you for this submission. The build attempt failed. Let me try a re-run just incase it was a GitHub issue, past that please take a look. |
Author
Im checking this too. the build was successful in my local machine, and tested the function. (im using it.) |
Contributor
|
Thanks @yun-wulian the re-try of the action run worked. We will check it out! |
This file contains hidden or 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
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 PR adds two new features to GP2040-CE:
Enable Per-Pin Inversionin Settings > Gamepad SettingsInvertcheckbox in Pin Mapping pageBackward Compatibility