[][src]Struct vesc_comm::VescConnection

pub struct VescConnection<R, W> { /* fields omitted */ }

Connection to a VESC

Methods

impl<R: Read<u8>, W: Write<u8>> VescConnection<R, W>[src]

pub fn new(r: R, w: W) -> Self[src]

Open a new connection with a VESC, currenly using embedded-hal Serial Read and Write traits

pub fn get_fw_version(&mut self) -> Result<FwVersion, Error>[src]

Send a command over a connection, might have a response (Need to improve this)

pub fn get_values(&mut self) -> Result<Values, Error>[src]

Gets various sensor data from the VESC

pub fn set_current(&mut self, val: u32) -> Result<(), Error>[src]

Sets the forward current of the VESC

pub fn set_duty(&mut self, val: u32) -> Result<(), Error>[src]

Sets the duty cycle in 100ths of a percent

Auto Trait Implementations

impl<R, W> Send for VescConnection<R, W> where
    R: Send,
    W: Send

impl<R, W> Sync for VescConnection<R, W> where
    R: Sync,
    W: Sync

Blanket Implementations

impl<T> From for T[src]

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

type Error = !

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

The type returned in the event of a conversion error.

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, U> Into for T where
    U: From<T>, 
[src]

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

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

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

impl<T> Same for T

type Output = T

Should always be Self