#[non_exhaustive]#[repr(u8)]pub enum Mode {
Show 16 variants
Stopped = 0,
Fault = 1,
Enabling = 2,
Calibrating = 3,
CalibrationComplete = 4,
Pwm = 5,
Voltage = 6,
VoltageFoc = 7,
VoltageDq = 8,
Current = 9,
Position = 10,
Timeout = 11,
ZeroVelocity = 12,
StayWithin = 13,
MeasureInd = 14,
Brake = 15,
}Expand description
The operating mode of a moteus controller.
This corresponds to the value in the Register::Mode register.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stopped = 0
Motor is stopped and unpowered
Fault = 1
Controller is in a fault state
Enabling = 2
Controller is enabling (transitioning to active)
Calibrating = 3
Controller is calibrating
CalibrationComplete = 4
Calibration is complete
Pwm = 5
Raw PWM mode
Voltage = 6
Voltage mode
VoltageFoc = 7
Voltage FOC mode
VoltageDq = 8
Voltage DQ mode
Current = 9
Current (torque) mode
Position = 10
Position mode (primary operating mode)
Timeout = 11
Position timeout (watchdog expired)
ZeroVelocity = 12
Zero velocity mode (hold position with damping)
StayWithin = 13
Stay within bounds mode
MeasureInd = 14
Measure inductance mode (calibration)
Brake = 15
Brake mode (short motor windings)
Implementations§
Source§impl Mode
impl Mode
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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