namespace
#include <pros/misc.hpp>
competition
Contents
- Reference
Functions
-
std::uint8_t pros::
competition:: get_status(void) - Get the current status of the competition control.
-
std::uint8_t pros::
competition:: is_autonomous(void) -
std::uint8_t pros::
competition:: is_connected(void) -
std::uint8_t pros::
competition:: is_disabled(void) -
std::uint8_t pros::
competition:: is_field_control(void) -
std::uint8_t pros::
competition:: is_competition_switch(void)
Function documentation
std::uint8_t pros::competition:: get_status(void)
Get the current status of the competition control.
Returns | The competition control status as a mask of bits with COMPETITION_{ENABLED,AUTONOMOUS,CONNECTED}. |
---|
Example
void status_display_task(){ if(!is_connected()) { pros::lcd::print(0, "V5 Brain is not connected!"); } if(is_autonomous()) { pros::lcd::print(0, "V5 Brain is in autonomous mode!"); } if(!is_disabled()) { pros::lcd::print(0, "V5 Brain is disabled!"); }