pioneerspacesim/pioneer — pull request #3236 by fluffyfreak (2014-10-31 06:15:11+00:00)
Title: Deadzone

There were a number of things wrong with this.

* 20% deadzone is standard for gamepad controllers, their analogue sticks are very noisey,
* Don't square the deadzone value, user asked for 10% or 20% give them it,
* Finally subtract the deadzone then normalise the value back into 0 to 1 range.

This gives us nice, smooth, per-axis control that is precise down at the deadzone but with full range upto the maximum stick extension.