SyncRobot

Trait SyncRobot 

Source
pub trait SyncRobot {
    // Provided methods
    fn opcontrol(&mut self) -> Result { ... }
    fn auto(&mut self) -> Result { ... }
    fn disabled(&mut self) -> Result { ... }
    fn comp_init(&mut self) -> Result { ... }
}
Expand description

A trait for robot code that runs without the async executor spun up. This trait isn’t recommended. See AsyncRobot in pros-async for the preferred trait to run robot code.

Provided Methods§

Source

fn opcontrol(&mut self) -> Result

Runs during the operator control period. This function may be called more than once. For that reason, do not use Peripherals::take in this function.

Source

fn auto(&mut self) -> Result

Runs during the autonomous period.

Source

fn disabled(&mut self) -> Result

Runs continuously during the disabled period.

Source

fn comp_init(&mut self) -> Result

Runs once when the competition system is initialized.

Implementors§