AntiMicroX / antimicrox

Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support.
GNU General Public License v3.0
2.52k stars 146 forks source link

make accelerometer stable #1011

Closed pepper-jelly closed 4 months ago

pepper-jelly commented 4 months ago

I've noticed an issue when pitching forward or backward. I expect only the "up" or "down" directions to be registered, but instead, "left" and/or "right" are also triggered for a brief period.

The SENSOR_CENTERED is 0, so at the end we just return 0 if button not yet triggered while we change direction, otherwise it can crash as it's a non-void function.

Anyway that's what I use for a week and it works for me.

pepper-jelly commented 4 months ago

@pktiuk So now it's better and based on the visual feedback, we should use the dead zone for pitch and keep the diagonal range for roll.

pktiuk commented 4 months ago

@pepper-jelly
Thank you for your contribution