Package robot.humaninterface.drivers
Class NathanGain
java.lang.Object
lib.humaninput.HumanInput
lib.humaninput.Driver
robot.humaninterface.drivers.NathanGain
- All Implemented Interfaces:
Nameable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic final doublestatic final doublestatic final doublestatic final doublestatic doublestatic doublestatic final doublestatic final doublestatic final doublestatic final doubleFields inherited from class lib.humaninput.HumanInput
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidA function where the driver's and operator's controls are bound to commandsedu.wpi.first.math.geometry.Translation2ddoubleprotected doublescaleGain(double input, double gain, double exp) Methods inherited from class lib.humaninput.HumanInput
getName, unbindCommands
-
Field Details
-
isFlippy
public static boolean isFlippy -
SPEED_EXP
public static final double SPEED_EXP- See Also:
-
Y_SPEED_SCALE
public static final double Y_SPEED_SCALE- See Also:
-
TURN_EXP
public static final double TURN_EXP- See Also:
-
TURN_SPEED_SCALE
public static final double TURN_SPEED_SCALE- See Also:
-
NORMAL_SPEED_GAIN
public static final double NORMAL_SPEED_GAIN- See Also:
-
NORMAL_TURN_GAIN
public static final double NORMAL_TURN_GAIN- See Also:
-
PRECISE_SPEED_SCALE
public static final double PRECISE_SPEED_SCALE- See Also:
-
PRECISE_TURN_SCALE
public static final double PRECISE_TURN_SCALE- See Also:
-
precisionScaleY
public static double precisionScaleY -
precisionScaleTurn
public static double precisionScaleTurn
-
-
Constructor Details
-
NathanGain
public NathanGain()
-
-
Method Details
-
scaleGain
protected double scaleGain(double input, double gain, double exp) -
bindCommands
public void bindCommands()Description copied from class:HumanInputA 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
- Specified by:
bindCommandsin classHumanInput
-
getTranslation
public edu.wpi.first.math.geometry.Translation2d getTranslation()- Specified by:
getTranslationin classDriver- Returns:
- Speed that the driver wants, in wpilib field-relative coordinates (forward, left). Length of translation vector should not exceed 1
-
getTurnSpeed
public double getTurnSpeed()- Specified by:
getTurnSpeedin classDriver- Returns:
- Turn speed that the driver wants in the range [-1, 1], positive = counterclockwise
-