GP2040-CE icon indicating copy to clipboard operation
GP2040-CE copied to clipboard

allow one GPIO pin to trigger 2+ buttons

Open bsstephan opened this issue 1 year ago • 5 comments

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.

bsstephan avatar Dec 27 '23 15:12 bsstephan

This works.

image

via

image

bsstephan avatar Dec 27 '23 17:12 bsstephan

Is this all ready to review?

arntsonl avatar Dec 29 '23 23:12 arntsonl

Confirmed this is working, going to have some other eyes on the UI as well.

arntsonl avatar Mar 19 '24 22:03 arntsonl

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.

Pelsin avatar Mar 20 '24 09:03 Pelsin

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.

bsstephan avatar Apr 01 '24 19:04 bsstephan

Quick screenshot of the UI as it stands right now in this branch: image

Note that this can only be done for the time being on the base mappings (profile 1).

bsstephan avatar Jun 12 '24 15:06 bsstephan

Thanks for this!

reimertz avatar Jun 18 '24 22:06 reimertz