Enum drs_0x01::JogMode

source ·
pub enum JogMode {
    Normal {
        position: u16,
    },
    Continuous {
        speed: u16,
    },
}
Expand description

This represent the servomotor control mode. The servomotor is either controlled in Position or Speed.

Variants

Normal

Fields

position: u16

The calibrated position. The value must be in the 0..1023 range

Control the servomotor by position. Make sure that the position is in range for your servomotor.

Continuous

Fields

speed: u16

The desired PWM value. The value must be in the 0..1023 range

Control the servomotor by speed. Make sur that you respect the maximum speed. The 14th bit represent the sign, if it set the servomotor will rotate the other way.

Trait Implementations

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 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.