pub struct SetMotorDirection {
pub code: u8,
}
Expand description
§e1/e9 Request/Command
- byte code Bit field to specify a direction and up to three motors.
Set the direction of the motors according to code. The bits of code have the following meanings:
Bit Description
0x01 Modify direction of motor A
0x02 Modify direction of motor B
0x04 Modify direction of motor C
0x40 Flip the directions of the specified motors
0x80 Set the directions of the specified motors to forward
If both bit 0x40 and bit 0x80 are 0, the directions of the specified motors are set to reverse. If both bit 0x40 and bit 0x80 are 1, the directions of the specified motors are flipped.
§16/1e Reply
- void
Reply indicates success.
Fields§
§code: u8
Trait Implementations§
Source§impl Clone for SetMotorDirection
impl Clone for SetMotorDirection
Source§fn clone(&self) -> SetMotorDirection
fn clone(&self) -> SetMotorDirection
Returns a copy 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 SetMotorDirection
impl Debug for SetMotorDirection
Source§impl Display for SetMotorDirection
impl Display for SetMotorDirection
Source§impl Opcode for SetMotorDirection
impl Opcode for SetMotorDirection
Source§impl PartialEq for SetMotorDirection
impl PartialEq for SetMotorDirection
impl Eq for SetMotorDirection
impl StructuralPartialEq for SetMotorDirection
Auto Trait Implementations§
impl Freeze for SetMotorDirection
impl RefUnwindSafe for SetMotorDirection
impl Send for SetMotorDirection
impl Sync for SetMotorDirection
impl Unpin for SetMotorDirection
impl UnwindSafe for SetMotorDirection
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