GP2040-CE
GP2040-CE copied to clipboard
allow one GPIO pin to trigger 2+ buttons
This adds a couple protobuf fields to the GpioMappingInfo
structure to include dpad and button masks and uses them when setting up the Gamepad
object to allow a pin to be the trigger for more than one button. All the cost is at setup time, so this shouldn't have any material effect on gamepad performance.
As usual, @Pelsin helped my proto-brain (pun intended) with the UI work. It will need improvement/expansion in the future, but this works for now.
This works.
via
Is this all ready to review?
Confirmed this is working, going to have some other eyes on the UI as well.
Confirmed this is working, going to have some other eyes on the UI as well.
Thats good! Please ping me if the UI is not good enough for the first iteration, if so i will try to merge the new page with pin mapping page.
Marked this a draft again, since we are saving it for after 0.7.8, and there has been a desire for and already some experimentation around a better UI/UX --- ideally a single page and a fancier selection/modal thing or something.
Quick screenshot of the UI as it stands right now in this branch:
Note that this can only be done for the time being on the base mappings (profile 1).
Thanks for this!