pub struct MotorEnableCommand {
pub joint_index: u8,
pub enable: bool,
}Expand description
电机使能/失能设置指令 (0x471)
用于使能或失能指定的关节电机。
Fields§
§joint_index: u8§enable: boolImplementations§
Source§impl MotorEnableCommand
impl MotorEnableCommand
Sourcepub fn enable(joint_index: u8) -> MotorEnableCommand
pub fn enable(joint_index: u8) -> MotorEnableCommand
创建使能指令
Sourcepub fn disable(joint_index: u8) -> MotorEnableCommand
pub fn disable(joint_index: u8) -> MotorEnableCommand
创建失能指令
Sourcepub fn enable_all() -> MotorEnableCommand
pub fn enable_all() -> MotorEnableCommand
使能全部关节电机
Sourcepub fn disable_all() -> MotorEnableCommand
pub fn disable_all() -> MotorEnableCommand
失能全部关节电机
Sourcepub fn to_frame(self) -> PiperFrame
pub fn to_frame(self) -> PiperFrame
转换为 CAN 帧
Trait Implementations§
Source§impl Clone for MotorEnableCommand
impl Clone for MotorEnableCommand
Source§fn clone(&self) -> MotorEnableCommand
fn clone(&self) -> MotorEnableCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MotorEnableCommand
impl Debug for MotorEnableCommand
impl Copy for MotorEnableCommand
Auto Trait Implementations§
impl Freeze for MotorEnableCommand
impl RefUnwindSafe for MotorEnableCommand
impl Send for MotorEnableCommand
impl Sync for MotorEnableCommand
impl Unpin for MotorEnableCommand
impl UnwindSafe for MotorEnableCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more