Class AnalogHIDButtonTrigger
java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
xbot.common.controls.sensors.buttons.AdvancedTrigger
xbot.common.controls.sensors.buttons.AnalogHIDButtonTrigger
- All Implemented Interfaces:
BooleanSupplier
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Fields inherited from class xbot.common.controls.sensors.buttons.AdvancedTrigger
supplier
-
Constructor Summary
ConstructorDescriptionAnalogHIDButtonTrigger
(XJoystick joystick, int axisNumber, double analogMinThreshold, double analogMaxThreshold) Create a joystick button for triggering commands based off of an analog axis -
Method Summary
Methods inherited from class xbot.common.controls.sensors.buttons.AdvancedTrigger
getInverted, setInverted
Methods inherited from class edu.wpi.first.wpilibj2.command.button.Trigger
and, debounce, debounce, getAsBoolean, negate, onChange, onFalse, onTrue, or, toggleOnFalse, toggleOnTrue, whileFalse, whileTrue
-
Constructor Details
-
AnalogHIDButtonTrigger
@AssistedInject public AnalogHIDButtonTrigger(@Assisted("joystick") XJoystick joystick, @Assisted("axisNumber") int axisNumber, @Assisted("analogMinThreshold") double analogMinThreshold, @Assisted("analogMaxThreshold") double analogMaxThreshold) Create a joystick button for triggering commands based off of an analog axis- Parameters:
joystick
- The GenericHID object that has the analog axis to useaxisNumber
- The axis number (appears to usually be [X=0,Y=1,Z=2])analogMinThreshold
- Analog threshold to trigger binary button stateanalogMaxThreshold
- Analog threshold to trigger binary button state
-
-
Method Details
-
getDescription
-