Package lib.humaninput
Class HumanInput
java.lang.Object
lib.humaninput.HumanInput
- All Implemented Interfaces:
Nameable
A generic human interface class. This is designed to be used to bind commands
to controllers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidA function where the driver's and operator's controls are bound to commandsgetName()static doublescaleGain(double input, double exp) static doublescaleGain(double input, double exp, double deadzone) voidCan be optionally overridden to unbind commands that were bound in bindCommands().
-
Field Details
-
name
-
-
Constructor Details
-
HumanInput
public HumanInput() -
HumanInput
-
-
Method Details
-
scaleGain
public static double scaleGain(double input, double exp, double deadzone) -
scaleGain
public static double scaleGain(double input, double exp) -
getName
-
bindCommands
public abstract void bindCommands()A function where the driver's and operator's controls are bound to commandsCan't be done in the constructor because constructors are called too early
-
unbindCommands
public void unbindCommands()Can be optionally overridden to unbind commands that were bound in bindCommands().You should do this for any commands that were not bound to one of the following:
-
RobotMap.HumanInput.Driver.xyJoystick -
RobotMap.HumanInput.Driver.turnJoystick -
RobotMap.HumanInput.Operator.joystick
CommandRobotBase.clearBindings() -
-