AlexanderDzhoganov/ksp-advanced-flybywire — pull request #12 by vitorboschi (2014-10-09 21:54:16+00:00)
Title: improve axis detection

I've got some problems with this mod with my joystick, because it kept detecting the throttle axis (because I can't position it exaclty at zero) instead of any other, so I changed the logic to account for axis that don't stay at zero by default.

instead of searching for an axis with value != zero, looks for a delta
of more than 10% in axis value. The reference value for each axis is
captured when the user clicks the button to set an axis.