MotorDevice
vectorlib::MotorDevice — fields, methods, parameters and return types.
pub trait MotorDeviceA smart motor, as seen by LemLib through PROS.
Methods
Prop
Type
move_voltage
fn move_voltage(&mut self, millivolts: i32)motor_move_voltage: drive with a raw voltage in millivolts. Brake mode is not applied.
Parameters
Prop
Type
Returns
()brake
fn brake(&mut self, mode: BrakeMode)motor_brake: stop using mode.
Parameters
Prop
Type
Returns
()position
fn position(&self) -> f64motor_get_position with encoder units set to rotations. PROS_ERR_F on error.
Returns
f64tare_position
fn tare_position(&mut self)motor_tare_position.
Returns
()gearing
fn gearing(&self) -> Option<Gearset>motor_get_gearing. None is E_MOTOR_GEARSET_INVALID.
Returns
Option<Gearset>is_reversed
fn is_reversed(&self) -> boolWhether the motor is reversed. PROS expresses this as a negative port number.
Returns
bool