VEX V5 C++ API
|
Use this class to set up your program for competitions. More...
Public Member Functions | |
competition () | |
Creates a competition object that has access to competition methods. More... | |
~competition () | |
void | autonomous (void(*callback)(void)) |
Calls a function on a new thread when the autonomous period starts. That thread is interrupted when the autonomous period ends. More... | |
void | drivercontrol (void(*callback)(void)) |
Calls back a function on a new thread when the driver control period starts. That thread is interrupted when the driver control period ends. More... | |
bool | isEnabled () |
Gets the status of your robot when under competition control. More... | |
bool | isDriverControl () |
Gets the status of the Driver Control period. More... | |
bool | isAutonomous () |
Gets the status of the Autonomous period. More... | |
bool | isCompetitionSwitch () |
Gets the status of the Competition Control Switch being plugged into the robot. More... | |
bool | isFieldControl () |
Gets the status of the Field Control System being plugged into the robot. More... | |
Use this class to set up your program for competitions.
vex::competition::competition | ( | ) |
Creates a competition object that has access to competition methods.
vex::competition::~competition | ( | ) |
void vex::competition::autonomous | ( | void(*)(void) | callback | ) |
Calls a function on a new thread when the autonomous period starts. That thread is interrupted when the autonomous period ends.
callback | A reference to a function. Only one reference is stored, subsequent calls override any previous callbacks. |
void vex::competition::drivercontrol | ( | void(*)(void) | callback | ) |
Calls back a function on a new thread when the driver control period starts. That thread is interrupted when the driver control period ends.
callback | A reference to a function. Only one reference is stored, subsequent calls override any previous callbacks. |
bool vex::competition::isEnabled | ( | ) |
Gets the status of your robot when under competition control.
bool vex::competition::isDriverControl | ( | ) |
Gets the status of the Driver Control period.
bool vex::competition::isAutonomous | ( | ) |
Gets the status of the Autonomous period.
bool vex::competition::isCompetitionSwitch | ( | ) |
Gets the status of the Competition Control Switch being plugged into the robot.
bool vex::competition::isFieldControl | ( | ) |
Gets the status of the Field Control System being plugged into the robot.