pub fn system() -> Option<CompetitionSystem>
Expand description
Returns the type of system currently controlling the robot’s competition state, or None
if the robot
is not tethered to a competition controller.
§Example
match competition::system() {
None => println!("Not connected to a match controller"),
Some(CompetitionSystem::FieldControl) => println!("Connected to field controller"),
Some(CompetitionSystem::CompetitionSwitch) => println!("Connected to competition switch"),
}