Skip to main content

Motor

Trait Motor 

Source
pub trait Motor {
    // Required methods
    fn get_position(&mut self) -> Result<f32>;
    fn start_rotation(&mut self, velocity: f32) -> Result<()>;
    fn stop(&mut self) -> Result<()>;
}
Expand description

Trait for a rotation stage motor.

Required Methods§

Source

fn get_position(&mut self) -> Result<f32>

Returns the current position in degrees (0.0 to 360.0).

Source

fn start_rotation(&mut self, velocity: f32) -> Result<()>

Starts rotation at a given velocity (deg/sec).

Source

fn stop(&mut self) -> Result<()>

Stops rotation immediately.

Implementors§