SystemFlags

Struct SystemFlags 

Source
pub struct SystemFlags {
    pub flags: u32,
    pub byte_1: u8,
    pub byte_2: u8,
    pub current_program: u8,
}

Fields§

§flags: u32

Bit mask. From left to right: no.1 to no.8 bit - Page index no.12 bit = Radio Data mode on no.14 bit = Brain button double clicked no.15 bit = Battery is charging no.17 bit = Brain button clicked no.18 bit = Is VexNet mode no.19 bit = Has partner controller no.22 bit = Radio connected no.23 bit = Radio available no.24 bit = Controller tethered no.30 bit = Page changed no.32 bit = Device added/removed (RESEARCH NEEDED)

§byte_1: u8

Battery percent = First four bits * 8 Controller battery percent = Last four bits * 8

§byte_2: u8

Radio quality = First four bits * 8 Partner controller battery percent = Last four bits * 8

§current_program: u8

The current program slot number, 0 means not in a program. 129 = ClawBot program 145 = Driver program

Trait Implementations§

Source§

impl Decode for SystemFlags

Source§

fn decode(data: &mut &[u8]) -> Result<Self, DecodeError>

Attempts to decode Self from the beginning of the provided byte slice. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.