Struct drs_0x01::Servo

source ·
pub struct Servo { /* private fields */ }
Expand description

This struct allows you to build messages for a servomotor.

Implementations

Create a new Servo with the given ID.

Notes
  • Valid ID are in the range 0..253.
  • 254 is the broadcast ID.

Change the servo ID.

Return the servo ID.

Create a reboot message requesting the servo to reboot. During the reboot all changes applied to the EEP memory will take effect.

Request the servo to go to a position. The value can be between 0 and 1023 but should be between 21 and 1002 if you don’t want the servomotor fo go in error mode.

Request the servo to have a certain speed. The value should be between 0 and 1023.

Request the servo to send it’s status.

Write to the volatile RAM of the servo. Ram is cleared on every reboot, and populated with data from the EEP memory.

Write to the permanent EEP memory. For the change to take effect you need to reboot the servo so that the values are loaded in RAM.

Request the servo to send back some data from RAM.

Request the servo to send back some data from EEP.

Request the servo to enable torque.

Request the servo to disable torque.

Clear the error register of the servo.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.