Command

Enum Command 

Source
pub enum Command {
Show 37 variants MotorStop = 0, Beep1 = 1, Beep2 = 2, Beep3 = 3, Beep4 = 4, Beep5 = 5, ESCInfo = 6, SpinDirection1 = 7, SpinDirection2 = 8, ThreeDModeOn = 9, ThreeDModeOff = 10, SettingsRequest = 11, SettingsSave = 12, ExtendedTelemetryEnable = 13, ExtendedTelemetryDisable = 14, SpinDirectionNormal = 20, SpinDirectonReversed = 21, Led0On = 22, Led1On = 23, Led2On = 24, Led3On = 25, Led0Off = 26, Led1Off = 27, Led2Off = 28, Led3Off = 29, AudioStreamModeToggle = 30, SilentModeToggle = 31, SignalLineTelemetryEnable = 32, SignalLineTelemetryDisable = 33, SignalLineContinuousERPMTelemetry = 34, SignalLineContinuousERPMPeriodTelemetry = 35, SignalLineTemperatureTelemetry = 42, SignalLineVoltageTelemetry = 43, SignalLineCurrentTelemetry = 44, SignalLineConsumptionTelemetry = 45, SignalLineERPMTelemetry = 46, SignalLineERPMPeriodTelemetry = 47,
}
Expand description

Fixed commands that occupy the lower 48 speed values.

Some commands need to be sent multiple times to be acted upon to prevent accidental bit-flips wreaking havoc.

Variants§

§

MotorStop = 0

§

Beep1 = 1

Wait at least 260ms before next command.

§

Beep2 = 2

Wait at least 260ms before next command.

§

Beep3 = 3

Wait at least 260ms before next command.

§

Beep4 = 4

Wait at least 260ms before next command.

§

Beep5 = 5

Wait at least 260ms before next command.

§

ESCInfo = 6

Wait at least 12ms before next command.

§

SpinDirection1 = 7

Needs 6 transmissions.

§

SpinDirection2 = 8

Needs 6 transmissions.

§

ThreeDModeOn = 9

Needs 6 transmissions.

§

ThreeDModeOff = 10

Needs 6 transmissions.

§

SettingsRequest = 11

§

SettingsSave = 12

Needs 6 transmissions. Wait at least 35ms before next command.

§

ExtendedTelemetryEnable = 13

Needs 6 transmissions.

§

ExtendedTelemetryDisable = 14

Needs 6 transmissions.

§

SpinDirectionNormal = 20

Needs 6 transmissions.

§

SpinDirectonReversed = 21

Needs 6 transmissions.

§

Led0On = 22

§

Led1On = 23

§

Led2On = 24

§

Led3On = 25

§

Led0Off = 26

§

Led1Off = 27

§

Led2Off = 28

§

Led3Off = 29

§

AudioStreamModeToggle = 30

§

SilentModeToggle = 31

§

SignalLineTelemetryEnable = 32

Needs 6 transmissions. Enables individual signal line commands.

§

SignalLineTelemetryDisable = 33

Needs 6 transmissions. Disables individual signal line commands.

§

SignalLineContinuousERPMTelemetry = 34

Needs 6 transmissions. Enables individual signal line commands.

§

SignalLineContinuousERPMPeriodTelemetry = 35

Needs 6 transmissions. Enables individual signal line commands.

§

SignalLineTemperatureTelemetry = 42

1ºC per LSB.

§

SignalLineVoltageTelemetry = 43

10mV per LSB, 40.95V max.

§

SignalLineCurrentTelemetry = 44

100mA per LSB, 409.5A max.

§

SignalLineConsumptionTelemetry = 45

10mAh per LSB, 40.95Ah max.

§

SignalLineERPMTelemetry = 46

100erpm per LSB, 409500erpm max.

§

SignalLineERPMPeriodTelemetry = 47

16us per LSB, 65520us max.

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for Command

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.