pub struct Motor { /* private fields */ }Expand description
Identity + state-cache for one motor.
State mutators are pub(crate) so user code cannot directly mutate the
cache; updates happen exclusively from the bus-router dispatch path
inside crate::Robot::tick.
Implementations§
Source§impl Motor
impl Motor
Sourcepub fn motor_type(&self) -> MotorTypeId
pub fn motor_type(&self) -> MotorTypeId
Vendor type identifier (e.g. MotorTypeId::Damiao(<DM4340>)).
Sourcepub fn temperature_mos(&self) -> i16
pub fn temperature_mos(&self) -> i16
MOSFET temperature (degrees C).
Sourcepub fn temperature_rotor(&self) -> i16
pub fn temperature_rotor(&self) -> i16
Rotor temperature (degrees C).
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
True after a successful enable ACK; false after disable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Motor
impl RefUnwindSafe for Motor
impl Send for Motor
impl Sync for Motor
impl Unpin for Motor
impl UnsafeUnpin for Motor
impl UnwindSafe for Motor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more