FeralAI / GP2040

Gamepad firmware for Raspberry Pi Pico and other RP2040 microcontrollers supporting Nintendo Switch, XInput and DirectInput
https://gp2040.info
MIT License
585 stars 125 forks source link

Refine debouncing configuration #52

Open FeralAI opened 2 years ago

FeralAI commented 2 years ago

Debouncing is currently configured at the beginning of the main.cpp file with a fixed 5ms delay. At the very least this should be editable via the web configurator.

A more robust implementation would have preset values for certain types of devices. For instance stock Sanwa JLFs may need more than the stock 5ms debounce delay, but the normal buttons may not. Would be nice to say "set debounce to X for directionals/stick and Y for buttons".

jbarket commented 2 years ago

This should definitely be part of the button redo.

To me it seems like physical buttons.. pins… whatever correspond with something button wise, and there’s where LEDs and denounce belong.

For example, if someone made a controller that has both buttons and a stick for movement, debounce values might be different for the stick direction than the button direction