Trait robot_traits::Motor[][src]

pub trait Motor {
    fn start(&mut self, speed: f32);
fn stop(&mut self); }

Represents a single motor. All commands are assumed to supercede the previous one, i.e. they are not additive.

All speed fields are in arbitrary units of "power" between 0.0 and 1.0

Required Methods

Drives the motor at the required speed. A negative speed will cause the motor to turn backwards.

speed should be in the range [-1.0, 1.0]

Stop the motor.

Implementors