Allow the caller to override the axis' default dead

zone configured at startup.
This commit is contained in:
Paul Speed 2015-12-05 06:27:17 -05:00
parent 2a2c71dadf
commit 46794e251d

View File

@ -135,6 +135,14 @@ public class DefaultJoystickAxis implements JoystickAxis {
return deadZone;
}
/**
* Sets/overrides the dead zone for this axis. This indicates that values
* within +/- deadZone should be ignored.
*/
public void setDeadZone( float f ) {
this.deadZone = f;
}
@Override
public String toString(){
return "JoystickAxis[name=" + name + ", parent=" + parent.getName() + ", id=" + axisIndex