[][src]Struct wpilib::RobotBase

pub struct RobotBase {}

Methods

impl RobotBase
[src]

Though many methods are static for convenience, they will error if a a RobotBase has not already been constructed.

pub fn new() -> Result<RobotBase, RobotBaseInitError>
[src]

Create a new robot, initializing hardware in the process. Call before initializing any other wpilib stuff.

pub fn start_competition()
[src]

Call when your robot is ready to be enabled. Make sure your hardware and threads have been created, etc.

pub fn make_ds(&self) -> DriverStation
[src]

pub fn fpga_version() -> HalResult<i32>
[src]

Return the FPGA Version number.

For now, expect this to be competition year.

pub fn fpga_revision() -> HalResult<i64>
[src]

Return the FPGA Revision number.

The format of the revision is 3 numbers. The 12 most significant bits are the Major Revision. The next 8 bits are the Minor Revision. The 12 least significant bits are the Build Number.

pub fn fpga_time() -> HalResult<u64>
[src]

Read the microsecond-resolution timer on the FPGA.

Returns The current time in microseconds according to the FPGA (since FPGA reset).

pub fn fpga_time_duration() -> HalResult<Duration>
[src]

Read the microsecond-resolution timer on the FPGA as a std::time::Duration.

pub fn user_button() -> HalResult<bool>
[src]

Get the state of the "USER" button on the roboRIO.

True if the button is currently pressed.

pub fn is_browned_out() -> HalResult<bool>
[src]

Reuturns true if the robot is browned out.

pub fn is_system_active() -> HalResult<bool>
[src]

Returns true if outputs are enabled. A false result could be caused by a disabled robot or a brownout.

pub fn battery_voltage() -> HalResult<f64>
[src]

Get the robot's current battery voltage.

Trait Implementations

impl Drop for RobotBase
[src]

impl Debug for RobotBase
[src]

Auto Trait Implementations

impl Send for RobotBase

impl Sync for RobotBase

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]