VEX V5 C++ API
|
Use the controller class to get values from the remote controller as well as write to the controller's screen. More...
Classes | |
class | axis |
Use the axis class to get values from one of the controller's joysticks. More... | |
class | button |
Use the button class to get values from the controller's buttons. More... | |
class | lcd |
Use this class to write to the controller's LCD screen. More... | |
Public Member Functions | |
controller () | |
Creates a new controller object. More... | |
controller (controllerType id) | |
Creates a new controller object. More... | |
~controller () | |
bool | installed () |
void | rumble (const char *str) |
Rumbles the controller by a pattern defined by the parameter. Dots equal short, dashes equal long and space equals pause. More... | |
void | setDeadband (int32_t deadband, percentUnits units) |
set the value of the controller axis deadband (minimum absolute threshold at which position is reported as non-zero) More... | |
int32_t | deadband (percentUnits units) |
get the value of the controller axis deadband More... | |
Static Public Member Functions | |
static controller * | _getDevice (controllerType type) |
Public Attributes | |
button & | ButtonL1 = button5Up |
A button that represents the L1 button on the controller. More... | |
button & | ButtonL2 = button5Down |
A button that represents the L2 button on the controller. More... | |
button & | ButtonR1 = button6Up |
A button that represents the R1 button on the controller. More... | |
button & | ButtonR2 = button6Down |
A button that represents the R2 button on the controller. More... | |
button & | ButtonUp = button7Up |
A button that represents the up button on the controller. More... | |
button & | ButtonDown = button7Down |
A button that represents the down button on the controller. More... | |
button & | ButtonLeft = button7Left |
A button that represents the left button on the controller. More... | |
button & | ButtonRight = button7Right |
A button that represents the right button on the controller. More... | |
button & | ButtonX = button8Up |
A button that represents the X button on the controller. More... | |
button & | ButtonB = button8Down |
A button that represents the B button on the controller. More... | |
button & | ButtonY = button8Left |
A button that represents the Y button on the controller. More... | |
button & | ButtonA = button8Right |
A button that represents the A button on the controller. More... | |
axis & | Axis1 = AxisC |
An axis of a joystick that represents axis 1 on the controller. More... | |
axis & | Axis2 = AxisD |
An axis of a joystick that represents axis 2 on the controller. More... | |
axis & | Axis3 = AxisA |
An axis of a joystick that represents axis 3 on the controller. More... | |
axis & | Axis4 = AxisB |
An axis of a joystick that represents axis 4 on the controller. More... | |
lcd | Screen = lcd(this) |
Controller's instance of LCD. More... | |
Use the controller class to get values from the remote controller as well as write to the controller's screen.
vex::controller::controller | ( | ) |
Creates a new controller object.
vex::controller::controller | ( | controllerType | id | ) |
Creates a new controller object.
id | The type of controller that is being created. This can be set to primary or partner. |
vex::controller::~controller | ( | ) |
bool vex::controller::installed | ( | ) |
void vex::controller::rumble | ( | const char * | str | ) |
Rumbles the controller by a pattern defined by the parameter. Dots equal short, dashes equal long and space equals pause.
str | A string that consists of dots and dashes that represent the rumble pattern. |
|
static |
void vex::controller::setDeadband | ( | int32_t | deadband, |
percentUnits | units | ||
) |
set the value of the controller axis deadband (minimum absolute threshold at which position is reported as non-zero)
int32_t vex::controller::deadband | ( | percentUnits | units | ) |
get the value of the controller axis deadband
button& vex::controller::ButtonL1 = button5Up |
A button that represents the L1 button on the controller.
button& vex::controller::ButtonL2 = button5Down |
A button that represents the L2 button on the controller.
button& vex::controller::ButtonR1 = button6Up |
A button that represents the R1 button on the controller.
button& vex::controller::ButtonR2 = button6Down |
A button that represents the R2 button on the controller.
button& vex::controller::ButtonUp = button7Up |
A button that represents the up button on the controller.
button& vex::controller::ButtonDown = button7Down |
A button that represents the down button on the controller.
button& vex::controller::ButtonLeft = button7Left |
A button that represents the left button on the controller.
button& vex::controller::ButtonRight = button7Right |
A button that represents the right button on the controller.
button& vex::controller::ButtonX = button8Up |
A button that represents the X button on the controller.
button& vex::controller::ButtonB = button8Down |
A button that represents the B button on the controller.
button& vex::controller::ButtonY = button8Left |
A button that represents the Y button on the controller.
button& vex::controller::ButtonA = button8Right |
A button that represents the A button on the controller.
axis& vex::controller::Axis1 = AxisC |
An axis of a joystick that represents axis 1 on the controller.
axis& vex::controller::Axis2 = AxisD |
An axis of a joystick that represents axis 2 on the controller.
axis& vex::controller::Axis3 = AxisA |
An axis of a joystick that represents axis 3 on the controller.
axis& vex::controller::Axis4 = AxisB |
An axis of a joystick that represents axis 4 on the controller.