Class DualSenseEdgeController
- All Implemented Interfaces:
HIDDevice, TelemetryLoggable
This class handles DualSenseEdge input that comes from the Driver Station. Each time a value is requested the most recent value is returned.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents an axis on a DualSenseEdgeController.static enumRepresents a digital button on a DualSenseEdgeController. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanWhether this controller supports mono LED output.static final booleanWhether this controller supports RGB LED output.static final booleanWhether this controller supports main rumble motors.static final booleanWhether this controller supports trigger rumble motors.static final intThe number of touchpads supported by this controller. -
Constructor Summary
ConstructorsConstructorDescriptionDualSenseEdgeController(int port) Construct an instance of a controller.Construct an instance of a controller with a GenericHID object. -
Method Summary
Modifier and TypeMethodDescriptionaxisGreaterThan(DualSenseEdgeController.Axis axis, double threshold, EventLoop loop) Constructs an event instance that is true when the axis value is greater thanthreshold.axisLessThan(DualSenseEdgeController.Axis axis, double threshold, EventLoop loop) Constructs an event instance that is true when the axis value is less thanthreshold.button(DualSenseEdgeController.Button button, EventLoop loop) Constructs an event instance around this button's digital signal.Constructs an event instance around the Circle button's digital signal.Constructs an event instance around the Create button's digital signal.Constructs an event instance around the Cross button's digital signal.Constructs an event instance around the Dpad Down button's digital signal.Constructs an event instance around the Dpad Left button's digital signal.Constructs an event instance around the Dpad Right button's digital signal.Constructs an event instance around the Dpad Up button's digital signal.doubleGet the value of the axis.booleanGet the button value.booleanWhether the button was pressed since the last check.booleanWhether the button was released since the last check.booleanRead the value of the Circle button on the controller.booleanWhether the Circle button was pressed since the last check.booleanWhether the Circle button was released since the last check.booleanRead the value of the Create button on the controller.booleanWhether the Create button was pressed since the last check.booleanWhether the Create button was released since the last check.booleanRead the value of the Cross button on the controller.booleanWhether the Cross button was pressed since the last check.booleanWhether the Cross button was released since the last check.booleanRead the value of the Dpad Down button on the controller.booleanWhether the Dpad Down button was pressed since the last check.booleanWhether the Dpad Down button was released since the last check.booleanRead the value of the Dpad Left button on the controller.booleanWhether the Dpad Left button was pressed since the last check.booleanWhether the Dpad Left button was released since the last check.booleanRead the value of the Dpad Right button on the controller.booleanWhether the Dpad Right button was pressed since the last check.booleanWhether the Dpad Right button was released since the last check.booleanRead the value of the Dpad Up button on the controller.booleanWhether the Dpad Up button was pressed since the last check.booleanWhether the Dpad Up button was released since the last check.getHID()Get the underlying GenericHID object.booleanRead the value of the L 1 button on the controller.booleanWhether the L 1 button was pressed since the last check.booleanWhether the L 1 button was released since the last check.doublegetL2()Get the L 2 value of the controller.booleanRead the value of the L 3 button on the controller.booleanWhether the L 3 button was pressed since the last check.booleanWhether the L 3 button was released since the last check.booleanRead the value of the Left Function button on the controller.booleanWhether the Left Function button was pressed since the last check.booleanWhether the Left Function button was released since the last check.booleanRead the value of the Left Paddle 1 button on the controller.booleanWhether the Left Paddle 1 button was pressed since the last check.booleanWhether the Left Paddle 1 button was released since the last check.doublegetLeftX()Get the Left X value of the controller.doublegetLeftY()Get the Left Y value of the controller.booleanRead the value of the Microphone button on the controller.booleanWhether the Microphone button was pressed since the last check.booleanWhether the Microphone button was released since the last check.booleanRead the value of the Options button on the controller.booleanWhether the Options button was pressed since the last check.booleanWhether the Options button was released since the last check.intgetPort()Get the port number of the HID.booleanRead the value of the PS button on the controller.booleanWhether the PS button was pressed since the last check.booleanWhether the PS button was released since the last check.booleanRead the value of the R 1 button on the controller.booleanWhether the R 1 button was pressed since the last check.booleanWhether the R 1 button was released since the last check.doublegetR2()Get the R 2 value of the controller.booleanRead the value of the R 3 button on the controller.booleanWhether the R 3 button was pressed since the last check.booleanWhether the R 3 button was released since the last check.booleanRead the value of the Right Function button on the controller.booleanWhether the Right Function button was pressed since the last check.booleanWhether the Right Function button was released since the last check.booleanRead the value of the Right Paddle 1 button on the controller.booleanWhether the Right Paddle 1 button was pressed since the last check.booleanWhether the Right Paddle 1 button was released since the last check.doubleGet the Right X value of the controller.doubleGet the Right Y value of the controller.booleanRead the value of the Square button on the controller.booleanWhether the Square button was pressed since the last check.booleanWhether the Square button was released since the last check.static EnumSet<GenericHID.SupportedOutput> Get the supported outputs expected for this controller type.Gets the telemetry table type.booleanRead the value of the Touchpad button on the controller.booleanWhether the Touchpad button was pressed since the last check.booleanWhether the Touchpad button was released since the last check.getTouchpadFinger(int finger) Get the touchpad finger data.booleangetTouchpadFingerAvailable(int finger) Check if a touchpad finger is available.booleanRead the value of the Triangle button on the controller.booleanWhether the Triangle button was pressed since the last check.booleanWhether the Triangle button was released since the last check.booleanGet if the HID is connected.Constructs an event instance around the L 1 button's digital signal.Constructs an event instance around the L 3 button's digital signal.leftFunction(EventLoop loop) Constructs an event instance around the Left Function button's digital signal.leftPaddle1(EventLoop loop) Constructs an event instance around the Left Paddle 1 button's digital signal.voidlogTo(TelemetryTable table) Logs the object to aTelemetryTable.microphone(EventLoop loop) Constructs an event instance around the Microphone button's digital signal.Constructs an event instance around the Options button's digital signal.Constructs an event instance around the PS button's digital signal.Constructs an event instance around the R 1 button's digital signal.Constructs an event instance around the R 3 button's digital signal.rightFunction(EventLoop loop) Constructs an event instance around the Right Function button's digital signal.rightPaddle1(EventLoop loop) Constructs an event instance around the Right Paddle 1 button's digital signal.voidsetL2Deadband(double deadband) Set the deadband for the L 2 axis.voidsetLeds(int r, int g, int b) Set leds on the controller.voidsetLeftXDeadband(double deadband) Set the deadband for the Left X axis.voidsetLeftYDeadband(double deadband) Set the deadband for the Left Y axis.voidsetR2Deadband(double deadband) Set the deadband for the R 2 axis.voidsetRightXDeadband(double deadband) Set the deadband for the Right X axis.voidsetRightYDeadband(double deadband) Set the deadband for the Right Y axis.voidsetRumble(GenericHID.RumbleType type, double value) Set the rumble output for the HID.Constructs an event instance around the Square button's digital signal.Constructs an event instance around the Touchpad button's digital signal.Constructs an event instance around the Triangle button's digital signal.
-
Field Details
-
TOUCHPAD_COUNT
public static final int TOUCHPAD_COUNTThe number of touchpads supported by this controller.- See Also:
-
SUPPORTS_RUMBLE
public static final boolean SUPPORTS_RUMBLEWhether this controller supports main rumble motors.- See Also:
-
SUPPORTS_TRIGGER_RUMBLE
public static final boolean SUPPORTS_TRIGGER_RUMBLEWhether this controller supports trigger rumble motors.- See Also:
-
SUPPORTS_MONO_LED
public static final boolean SUPPORTS_MONO_LEDWhether this controller supports mono LED output.- See Also:
-
SUPPORTS_RGB_LED
public static final boolean SUPPORTS_RGB_LEDWhether this controller supports RGB LED output.- See Also:
-
-
Constructor Details
-
DualSenseEdgeController
public DualSenseEdgeController(int port) Construct an instance of a controller.- Parameters:
port- The port index on the Driver Station that the controller is plugged into.
-
DualSenseEdgeController
Construct an instance of a controller with a GenericHID object.- Parameters:
hid- The GenericHID object to use for this controller.
-
-
Method Details
-
getHID
Get the underlying GenericHID object. -
getSupportedOutputCapabilities
Get the supported outputs expected for this controller type.- Returns:
- the expected supported outputs
-
getPort
public int getPort()Get the port number of the HID.- Returns:
- The port number of the HID.
-
isConnected
public boolean isConnected()Get if the HID is connected.- Returns:
- true if the HID is connected
-
getLeftX
public double getLeftX()Get the Left X value of the controller.A deadband of 0.1 is applied by default. Use
setLeftXDeadband(double)to change it.- Returns:
- The axis value.
-
setLeftXDeadband
public void setLeftXDeadband(double deadband) Set the deadband for the Left X axis.The deadband is clamped to [0, 1).
- Parameters:
deadband- The deadband to apply.
-
getLeftY
public double getLeftY()Get the Left Y value of the controller.A deadband of 0.1 is applied by default. Use
setLeftYDeadband(double)to change it.- Returns:
- The axis value.
-
setLeftYDeadband
public void setLeftYDeadband(double deadband) Set the deadband for the Left Y axis.The deadband is clamped to [0, 1).
- Parameters:
deadband- The deadband to apply.
-
getRightX
public double getRightX()Get the Right X value of the controller.A deadband of 0.1 is applied by default. Use
setRightXDeadband(double)to change it.- Returns:
- The axis value.
-
setRightXDeadband
public void setRightXDeadband(double deadband) Set the deadband for the Right X axis.The deadband is clamped to [0, 1).
- Parameters:
deadband- The deadband to apply.
-
getRightY
public double getRightY()Get the Right Y value of the controller.A deadband of 0.1 is applied by default. Use
setRightYDeadband(double)to change it.- Returns:
- The axis value.
-
setRightYDeadband
public void setRightYDeadband(double deadband) Set the deadband for the Right Y axis.The deadband is clamped to [0, 1).
- Parameters:
deadband- The deadband to apply.
-
getL2
public double getL2()Get the L 2 value of the controller.A deadband of 0.01 is applied by default. Use
setL2Deadband(double)to change it.- Returns:
- The axis value.
-
setL2Deadband
public void setL2Deadband(double deadband) Set the deadband for the L 2 axis.The deadband is clamped to [0, 1).
- Parameters:
deadband- The deadband to apply.
-
getR2
public double getR2()Get the R 2 value of the controller.A deadband of 0.01 is applied by default. Use
setR2Deadband(double)to change it.- Returns:
- The axis value.
-
setR2Deadband
public void setR2Deadband(double deadband) Set the deadband for the R 2 axis.The deadband is clamped to [0, 1).
- Parameters:
deadband- The deadband to apply.
-
getAxis
Get the value of the axis.- Parameters:
axis- The axis to read- Returns:
- The axis value.
-
axisLessThan
public BooleanEvent axisLessThan(DualSenseEdgeController.Axis axis, double threshold, EventLoop loop) Constructs an event instance that is true when the axis value is less thanthreshold.- Parameters:
axis- The axis to read.threshold- The value below which this event should return true.loop- the event loop instance to attach the event to.- Returns:
- an event instance that is true when the axis value is less than the provided threshold.
-
axisGreaterThan
public BooleanEvent axisGreaterThan(DualSenseEdgeController.Axis axis, double threshold, EventLoop loop) Constructs an event instance that is true when the axis value is greater thanthreshold.- Parameters:
axis- The axis to read.threshold- The value above which this event should return true.loop- the event loop instance to attach the event to.- Returns:
- an event instance that is true when the axis value is greater than the provided threshold.
-
getCrossButton
public boolean getCrossButton()Read the value of the Cross button on the controller.- Returns:
- The state of the button.
-
getCrossButtonPressed
public boolean getCrossButtonPressed()Whether the Cross button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getCrossButtonReleased
public boolean getCrossButtonReleased()Whether the Cross button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
cross
Constructs an event instance around the Cross button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Cross button's digital signal attached to the given loop.
-
getCircleButton
public boolean getCircleButton()Read the value of the Circle button on the controller.- Returns:
- The state of the button.
-
getCircleButtonPressed
public boolean getCircleButtonPressed()Whether the Circle button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getCircleButtonReleased
public boolean getCircleButtonReleased()Whether the Circle button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
circle
Constructs an event instance around the Circle button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Circle button's digital signal attached to the given loop.
-
getSquareButton
public boolean getSquareButton()Read the value of the Square button on the controller.- Returns:
- The state of the button.
-
getSquareButtonPressed
public boolean getSquareButtonPressed()Whether the Square button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getSquareButtonReleased
public boolean getSquareButtonReleased()Whether the Square button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
square
Constructs an event instance around the Square button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Square button's digital signal attached to the given loop.
-
getTriangleButton
public boolean getTriangleButton()Read the value of the Triangle button on the controller.- Returns:
- The state of the button.
-
getTriangleButtonPressed
public boolean getTriangleButtonPressed()Whether the Triangle button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getTriangleButtonReleased
public boolean getTriangleButtonReleased()Whether the Triangle button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
triangle
Constructs an event instance around the Triangle button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Triangle button's digital signal attached to the given loop.
-
getCreateButton
public boolean getCreateButton()Read the value of the Create button on the controller.- Returns:
- The state of the button.
-
getCreateButtonPressed
public boolean getCreateButtonPressed()Whether the Create button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getCreateButtonReleased
public boolean getCreateButtonReleased()Whether the Create button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
create
Constructs an event instance around the Create button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Create button's digital signal attached to the given loop.
-
getPSButton
public boolean getPSButton()Read the value of the PS button on the controller.- Returns:
- The state of the button.
-
getPSButtonPressed
public boolean getPSButtonPressed()Whether the PS button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getPSButtonReleased
public boolean getPSButtonReleased()Whether the PS button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
PS
Constructs an event instance around the PS button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the PS button's digital signal attached to the given loop.
-
getOptionsButton
public boolean getOptionsButton()Read the value of the Options button on the controller.- Returns:
- The state of the button.
-
getOptionsButtonPressed
public boolean getOptionsButtonPressed()Whether the Options button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getOptionsButtonReleased
public boolean getOptionsButtonReleased()Whether the Options button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
options
Constructs an event instance around the Options button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Options button's digital signal attached to the given loop.
-
getL3Button
public boolean getL3Button()Read the value of the L 3 button on the controller.- Returns:
- The state of the button.
-
getL3ButtonPressed
public boolean getL3ButtonPressed()Whether the L 3 button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getL3ButtonReleased
public boolean getL3ButtonReleased()Whether the L 3 button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
L3
Constructs an event instance around the L 3 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the L 3 button's digital signal attached to the given loop.
-
getR3Button
public boolean getR3Button()Read the value of the R 3 button on the controller.- Returns:
- The state of the button.
-
getR3ButtonPressed
public boolean getR3ButtonPressed()Whether the R 3 button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getR3ButtonReleased
public boolean getR3ButtonReleased()Whether the R 3 button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
R3
Constructs an event instance around the R 3 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the R 3 button's digital signal attached to the given loop.
-
getL1Button
public boolean getL1Button()Read the value of the L 1 button on the controller.- Returns:
- The state of the button.
-
getL1ButtonPressed
public boolean getL1ButtonPressed()Whether the L 1 button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getL1ButtonReleased
public boolean getL1ButtonReleased()Whether the L 1 button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
L1
Constructs an event instance around the L 1 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the L 1 button's digital signal attached to the given loop.
-
getR1Button
public boolean getR1Button()Read the value of the R 1 button on the controller.- Returns:
- The state of the button.
-
getR1ButtonPressed
public boolean getR1ButtonPressed()Whether the R 1 button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getR1ButtonReleased
public boolean getR1ButtonReleased()Whether the R 1 button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
R1
Constructs an event instance around the R 1 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the R 1 button's digital signal attached to the given loop.
-
getDpadUpButton
public boolean getDpadUpButton()Read the value of the Dpad Up button on the controller.- Returns:
- The state of the button.
-
getDpadUpButtonPressed
public boolean getDpadUpButtonPressed()Whether the Dpad Up button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getDpadUpButtonReleased
public boolean getDpadUpButtonReleased()Whether the Dpad Up button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
dpadUp
Constructs an event instance around the Dpad Up button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Dpad Up button's digital signal attached to the given loop.
-
getDpadDownButton
public boolean getDpadDownButton()Read the value of the Dpad Down button on the controller.- Returns:
- The state of the button.
-
getDpadDownButtonPressed
public boolean getDpadDownButtonPressed()Whether the Dpad Down button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getDpadDownButtonReleased
public boolean getDpadDownButtonReleased()Whether the Dpad Down button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
dpadDown
Constructs an event instance around the Dpad Down button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Dpad Down button's digital signal attached to the given loop.
-
getDpadLeftButton
public boolean getDpadLeftButton()Read the value of the Dpad Left button on the controller.- Returns:
- The state of the button.
-
getDpadLeftButtonPressed
public boolean getDpadLeftButtonPressed()Whether the Dpad Left button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getDpadLeftButtonReleased
public boolean getDpadLeftButtonReleased()Whether the Dpad Left button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
dpadLeft
Constructs an event instance around the Dpad Left button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Dpad Left button's digital signal attached to the given loop.
-
getDpadRightButton
public boolean getDpadRightButton()Read the value of the Dpad Right button on the controller.- Returns:
- The state of the button.
-
getDpadRightButtonPressed
public boolean getDpadRightButtonPressed()Whether the Dpad Right button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getDpadRightButtonReleased
public boolean getDpadRightButtonReleased()Whether the Dpad Right button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
dpadRight
Constructs an event instance around the Dpad Right button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Dpad Right button's digital signal attached to the given loop.
-
getMicrophoneButton
public boolean getMicrophoneButton()Read the value of the Microphone button on the controller.- Returns:
- The state of the button.
-
getMicrophoneButtonPressed
public boolean getMicrophoneButtonPressed()Whether the Microphone button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getMicrophoneButtonReleased
public boolean getMicrophoneButtonReleased()Whether the Microphone button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
microphone
Constructs an event instance around the Microphone button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Microphone button's digital signal attached to the given loop.
-
getRightPaddle1Button
public boolean getRightPaddle1Button()Read the value of the Right Paddle 1 button on the controller.- Returns:
- The state of the button.
-
getRightPaddle1ButtonPressed
public boolean getRightPaddle1ButtonPressed()Whether the Right Paddle 1 button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getRightPaddle1ButtonReleased
public boolean getRightPaddle1ButtonReleased()Whether the Right Paddle 1 button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
rightPaddle1
Constructs an event instance around the Right Paddle 1 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Right Paddle 1 button's digital signal attached to the given loop.
-
getLeftPaddle1Button
public boolean getLeftPaddle1Button()Read the value of the Left Paddle 1 button on the controller.- Returns:
- The state of the button.
-
getLeftPaddle1ButtonPressed
public boolean getLeftPaddle1ButtonPressed()Whether the Left Paddle 1 button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getLeftPaddle1ButtonReleased
public boolean getLeftPaddle1ButtonReleased()Whether the Left Paddle 1 button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
leftPaddle1
Constructs an event instance around the Left Paddle 1 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Left Paddle 1 button's digital signal attached to the given loop.
-
getTouchpadButton
public boolean getTouchpadButton()Read the value of the Touchpad button on the controller.- Returns:
- The state of the button.
-
getTouchpadButtonPressed
public boolean getTouchpadButtonPressed()Whether the Touchpad button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getTouchpadButtonReleased
public boolean getTouchpadButtonReleased()Whether the Touchpad button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
touchpad
Constructs an event instance around the Touchpad button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Touchpad button's digital signal attached to the given loop.
-
getLeftFunctionButton
public boolean getLeftFunctionButton()Read the value of the Left Function button on the controller.- Returns:
- The state of the button.
-
getLeftFunctionButtonPressed
public boolean getLeftFunctionButtonPressed()Whether the Left Function button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getLeftFunctionButtonReleased
public boolean getLeftFunctionButtonReleased()Whether the Left Function button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
leftFunction
Constructs an event instance around the Left Function button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Left Function button's digital signal attached to the given loop.
-
getRightFunctionButton
public boolean getRightFunctionButton()Read the value of the Right Function button on the controller.- Returns:
- The state of the button.
-
getRightFunctionButtonPressed
public boolean getRightFunctionButtonPressed()Whether the Right Function button was pressed since the last check.- Returns:
- Whether the button was pressed since the last check.
-
getRightFunctionButtonReleased
public boolean getRightFunctionButtonReleased()Whether the Right Function button was released since the last check.- Returns:
- Whether the button was released since the last check.
-
rightFunction
Constructs an event instance around the Right Function button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- an event instance representing the Right Function button's digital signal attached to the given loop.
-
getButton
Get the button value.- Parameters:
button- The button to read- Returns:
- The state of the button.
-
getButtonPressed
Whether the button was pressed since the last check.- Parameters:
button- The button to read- Returns:
- Whether the button was pressed since the last check.
-
getButtonReleased
Whether the button was released since the last check.- Parameters:
button- The button to read- Returns:
- Whether the button was released since the last check.
-
button
Constructs an event instance around this button's digital signal.- Parameters:
button- the buttonloop- the event loop instance to attach the event to.- Returns:
- an event instance representing the button's digital signal attached to the given loop.
-
setLeds
public void setLeds(int r, int g, int b) Set leds on the controller.- Parameters:
r- Red value from 0-255g- Green value from 0-255b- Blue value from 0-255
-
setRumble
Set the rumble output for the HID.- Parameters:
type- Which rumble value to setvalue- The normalized value (0 to 1) to set the rumble to
-
getTouchpadFingerAvailable
public boolean getTouchpadFingerAvailable(int finger) Check if a touchpad finger is available.- Parameters:
finger- The finger to check.- Returns:
- true if the touchpad finger is available.
-
getTouchpadFinger
Get the touchpad finger data.- Parameters:
finger- The finger to read.- Returns:
- The touchpad finger data.
-
getTelemetryType
Description copied from interface:TelemetryLoggableGets the telemetry table type. Default is no specified table type (null). A mismatch in type during logging results in a reported warning, so this should always return the same value.- Specified by:
getTelemetryTypein interfaceTelemetryLoggable- Returns:
- Table type
-
logTo
Description copied from interface:TelemetryLoggableLogs the object to aTelemetryTable.- Specified by:
logToin interfaceTelemetryLoggable- Parameters:
table- telemetry table
-