[][src]Struct odrive_rs::ascii::ODrive

pub struct ODrive<T> where
    T: Read + Write
{ /* fields omitted */ }

Represents a connection with an ODrive motor controller.

Methods

impl<T> ODrive<T> where
    T: Read + Write
[src]

pub fn new(serial: T) -> Self[src]

Constructs a new ODrive connection using the ReadWriteCloningDecorator. This method of construction will have consequences in overhead. It should only be used when it is not possible to clone the type T.

impl<T> ODrive<T> where
    T: Read + Write
[src]

pub fn set_position(
    &mut self,
    motor_number: u8,
    position: f32,
    velocity_feed_forward: Option<f32>,
    current_feed_forward: Option<f32>
) -> Result<()>
[src]

pub fn set_velocity(
    &mut self,
    motor_number: u8,
    position: f32,
    current_feed_forward: Option<f32>
) -> Result<()>
[src]

pub fn set_current(&mut self, motor_number: u8, current: f32) -> Result<()>[src]

pub fn trapezoidal_move(
    &mut self,
    motor_number: u8,
    position: f32
) -> Result<()>
[src]

pub fn get_velocity(&mut self, motor_number: u8) -> Result<f32>[src]

pub fn read_float(&mut self) -> Result<f32>[src]

pub fn read_int(&mut self) -> Result<i32>[src]

pub fn run_state(
    &mut self,
    axis: u8,
    requested_state: AxisState,
    wait: bool
) -> Result<bool>
[src]

pub fn read_string(&mut self) -> Result<String>[src]

Trait Implementations

impl<T> Read for ODrive<T> where
    T: Read + Write
[src]

impl<T> Write for ODrive<T> where
    T: Write + Read
[src]

Auto Trait Implementations

impl<T> Send for ODrive<T> where
    T: Send

impl<T> Sync for ODrive<T> where
    T: Sync

impl<T> Unpin for ODrive<T> where
    T: Unpin

impl<T> UnwindSafe for ODrive<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for ODrive<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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> 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]