pub struct GripperStatus { /* private fields */ }Expand description
夹爪状态位域(Byte 6: 8 位)
协议定义(Motorola MSB 高位在前):
- Bit 0: 电源电压是否过低(0:正常 1:过低)
- Bit 1: 电机是否过温(0:正常 1:过温)
- Bit 2: 驱动器是否过流(0:正常 1:过流)
- Bit 3: 驱动器是否过温(0:正常 1:过温)
- Bit 4: 传感器状态(0:正常 1:异常)
- Bit 5: 驱动器错误状态(0:正常 1:错误)
- Bit 6: 驱动器使能状态(1:使能 0:失能,注意:反向逻辑)
- Bit 7: 回零状态(0:没有回零 1:已经回零)
Implementations§
Source§impl GripperStatus
impl GripperStatus
pub fn new( arg_voltage_low: bool, arg_motor_over_temp: bool, arg_driver_over_current: bool, arg_driver_over_temp: bool, arg_sensor_error: bool, arg_driver_error: bool, arg_enabled: bool, arg_homed: bool, ) -> Self
pub fn voltage_low(&self) -> bool
pub fn set_voltage_low(&mut self, value: bool)
pub fn motor_over_temp(&self) -> bool
pub fn set_motor_over_temp(&mut self, value: bool)
pub fn driver_over_current(&self) -> bool
pub fn set_driver_over_current(&mut self, value: bool)
pub fn driver_over_temp(&self) -> bool
pub fn set_driver_over_temp(&mut self, value: bool)
pub fn sensor_error(&self) -> bool
pub fn set_sensor_error(&mut self, value: bool)
pub fn driver_error(&self) -> bool
pub fn set_driver_error(&mut self, value: bool)
pub fn enabled(&self) -> bool
pub fn set_enabled(&mut self, value: bool)
pub fn homed(&self) -> bool
pub fn set_homed(&mut self, value: bool)
Trait Implementations§
Source§impl Bitsized for GripperStatus
impl Bitsized for GripperStatus
Source§impl Clone for GripperStatus
impl Clone for GripperStatus
Source§fn clone(&self) -> GripperStatus
fn clone(&self) -> GripperStatus
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 GripperStatus
impl Debug for GripperStatus
Source§impl Default for GripperStatus
impl Default for GripperStatus
Source§impl From<GripperStatus> for u8
impl From<GripperStatus> for u8
Source§fn from(value: GripperStatus) -> Self
fn from(value: GripperStatus) -> Self
Converts to this type from the input type.
Source§impl From<u8> for GripperStatus
impl From<u8> for GripperStatus
impl Copy for GripperStatus
Auto Trait Implementations§
impl Freeze for GripperStatus
impl RefUnwindSafe for GripperStatus
impl Send for GripperStatus
impl Sync for GripperStatus
impl Unpin for GripperStatus
impl UnwindSafe for GripperStatus
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