[][src]Enum librobot::navigation::Command

pub enum Command {
    Front(u16),
    Back(u16),
}

Une commande pour un moteur : une direction et une vitesse sur 16 bits (0 : vitesse nulle).

Variants

Front(u16)

Le moteur doit avancer à la vitesse fournie

Back(u16)

Le moteur doit reculer à la vitesse fournie

Methods

impl Command[src]

pub fn truncate(val: f32, max: u16) -> Command[src]

Crée une commande à partir de la valeur val sans dépasser max

pub fn get_value(&self) -> u16[src]

Renvoie l'intensité de la commande

pub fn invert(&self) -> Command[src]

Retourne une commande de la même valeur mais de sens opposé

Trait Implementations

impl PartialEq<Command> for Command[src]

impl Eq for Command[src]

impl Debug for Command[src]

impl Display for Command[src]

impl Copy for Command[src]

impl Clone for Command[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Command

impl Sync for Command

Blanket Implementations

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> From<T> for T[src]

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Same<T> for T[src]

type Output = T

Should always be Self