Ev3

Struct Ev3 

Source
pub struct Ev3 {
    pub sensors: [SensorData; 4],
    pub motors: [MotorData; 4],
    pub screen: Screen,
    pub leds: Leds,
    pub time: Time,
    pub keys: Keys,
    /* private fields */
}

Fields§

§sensors: [SensorData; 4]§motors: [MotorData; 4]§screen: Screen§leds: Leds§time: Time§keys: Keys

Implementations§

Source§

impl Ev3

Source

pub fn new() -> Ev3

Source

pub fn s1(&mut self) -> &mut SensorData

Source

pub fn s2(&mut self) -> &mut SensorData

Source

pub fn s3(&mut self) -> &mut SensorData

Source

pub fn s4(&mut self) -> &mut SensorData

Source

pub fn ma(&mut self) -> &mut MotorData

Source

pub fn mb(&mut self) -> &mut MotorData

Source

pub fn mc(&mut self) -> &mut MotorData

Source

pub fn md(&mut self) -> &mut MotorData

Source

pub fn lcd_clear(&self)

Source

pub fn reset(&self)

Source

pub fn apply_configuration(&mut self)

Source

pub fn stop(&mut self)

Source

pub fn read(&mut self)

Source

pub fn calibration(&mut self)

Source

pub fn apply(&mut self)

Trait Implementations§

Source§

impl Default for Ev3

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl MotorGetter for Ev3

Source§

fn motor(&self, port: MotorPort) -> &MotorData

Source§

impl MotorGetterMut for Ev3

Source§

fn motor(&mut self, port: MotorPort) -> &mut MotorData

Source§

impl SensorGetter for Ev3

Source§

fn sensor(&self, port: SensorPort) -> &SensorData

Source§

impl SensorGetterMut for Ev3

Source§

fn sensor(&mut self, port: SensorPort) -> &mut SensorData

Auto Trait Implementations§

§

impl Freeze for Ev3

§

impl RefUnwindSafe for Ev3

§

impl Send for Ev3

§

impl Sync for Ev3

§

impl Unpin for Ev3

§

impl UnwindSafe for Ev3

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.