WPILibC++ 2024.3.2
|
Class to control a simulated PS5 controller. More...
#include <frc/simulation/PS5ControllerSim.h>
Public Member Functions | |
PS5ControllerSim (const PS5Controller &joystick) | |
Constructs from a PS5Controller object. More... | |
PS5ControllerSim (int port) | |
Constructs from a joystick port number. More... | |
void | SetLeftX (double value) |
Change the X axis value of the controller's left stick. More... | |
void | SetRightX (double value) |
Change the X axis value of the controller's right stick. More... | |
void | SetLeftY (double value) |
Change the Y axis value of the controller's left stick. More... | |
void | SetRightY (double value) |
Change the Y axis value of the controller's right stick. More... | |
void | SetL2Axis (double value) |
Change the L2 axis axis value of the controller. More... | |
void | SetR2Axis (double value) |
Change the R2 axis value of the controller. More... | |
void | SetSquareButton (bool value) |
Change the value of the Square button on the controller. More... | |
void | SetCrossButton (bool value) |
Change the value of the Cross button on the controller. More... | |
void | SetCircleButton (bool value) |
Change the value of the Circle button on the controller. More... | |
void | SetTriangleButton (bool value) |
Change the value of the Triangle button on the controller. More... | |
void | SetL1Button (bool value) |
Change the value of the L1 button on the controller. More... | |
void | SetR1Button (bool value) |
Change the value of the R1 button on the controller. More... | |
void | SetL2Button (bool value) |
Change the value of the L2 button on the controller. More... | |
void | SetR2Button (bool value) |
Change the value of the R2 button on the controller. More... | |
void | SetCreateButton (bool value) |
Change the value of the Create button on the controller. More... | |
void | SetOptionsButton (bool value) |
Change the value of the Options button on the controller. More... | |
void | SetL3Button (bool value) |
Change the value of the L3 (left stick) button on the controller. More... | |
void | SetR3Button (bool value) |
Change the value of the R3 (right stick) button on the controller. More... | |
void | SetPSButton (bool value) |
Change the value of the PS button on the controller. More... | |
void | SetTouchpad (bool value) |
Change the value of the touchpad button on the controller. More... | |
Public Member Functions inherited from frc::sim::GenericHIDSim | |
GenericHIDSim (const GenericHID &joystick) | |
Constructs from a GenericHID object. More... | |
GenericHIDSim (int port) | |
Constructs from a joystick port number. More... | |
void | NotifyNewData () |
Updates joystick data so that new values are visible to the user program. More... | |
void | SetRawButton (int button, bool value) |
Set the value of a given button. More... | |
void | SetRawAxis (int axis, double value) |
Set the value of a given axis. More... | |
void | SetPOV (int pov, int value) |
Set the value of a given POV. More... | |
void | SetPOV (int value) |
Set the value of the default POV (port 0). More... | |
void | SetAxisCount (int count) |
Set the axis count of this device. More... | |
void | SetPOVCount (int count) |
Set the POV count of this device. More... | |
void | SetButtonCount (int count) |
Set the button count of this device. More... | |
void | SetType (GenericHID::HIDType type) |
Set the type of this device. More... | |
void | SetName (const char *name) |
Set the name of this device. More... | |
void | SetAxisType (int axis, int type) |
Set the type of an axis. More... | |
bool | GetOutput (int outputNumber) |
Read the output of a button. More... | |
int64_t | GetOutputs () |
Get the encoded 16-bit integer that passes button values. More... | |
double | GetRumble (GenericHID::RumbleType type) |
Get the joystick rumble. More... | |
Additional Inherited Members | |
Protected Attributes inherited from frc::sim::GenericHIDSim | |
int | m_port |
GenericHID port. More... | |
Class to control a simulated PS5 controller.
|
explicit |
Constructs from a PS5Controller object.
joystick | controller to simulate |
|
explicit |
Constructs from a joystick port number.
port | port number |
void frc::sim::PS5ControllerSim::SetCircleButton | ( | bool | value | ) |
Change the value of the Circle button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetCreateButton | ( | bool | value | ) |
Change the value of the Create button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetCrossButton | ( | bool | value | ) |
Change the value of the Cross button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetL1Button | ( | bool | value | ) |
Change the value of the L1 button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetL2Axis | ( | double | value | ) |
Change the L2 axis axis value of the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetL2Button | ( | bool | value | ) |
Change the value of the L2 button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetL3Button | ( | bool | value | ) |
Change the value of the L3 (left stick) button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetLeftX | ( | double | value | ) |
Change the X axis value of the controller's left stick.
value | the new value |
void frc::sim::PS5ControllerSim::SetLeftY | ( | double | value | ) |
Change the Y axis value of the controller's left stick.
value | the new value |
void frc::sim::PS5ControllerSim::SetOptionsButton | ( | bool | value | ) |
Change the value of the Options button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetPSButton | ( | bool | value | ) |
Change the value of the PS button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetR1Button | ( | bool | value | ) |
Change the value of the R1 button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetR2Axis | ( | double | value | ) |
Change the R2 axis value of the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetR2Button | ( | bool | value | ) |
Change the value of the R2 button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetR3Button | ( | bool | value | ) |
Change the value of the R3 (right stick) button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetRightX | ( | double | value | ) |
Change the X axis value of the controller's right stick.
value | the new value |
void frc::sim::PS5ControllerSim::SetRightY | ( | double | value | ) |
Change the Y axis value of the controller's right stick.
value | the new value |
void frc::sim::PS5ControllerSim::SetSquareButton | ( | bool | value | ) |
Change the value of the Square button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetTouchpad | ( | bool | value | ) |
Change the value of the touchpad button on the controller.
value | the new value |
void frc::sim::PS5ControllerSim::SetTriangleButton | ( | bool | value | ) |
Change the value of the Triangle button on the controller.
value | the new value |