Start of trail End of trail navigation bar

Table of Contents

t_dshot_command

Enumerated type for representing DSHOT commands for the quanser.hardware.hil.esc_output method or hil_esc_output function.

Syntax

        enumeration t_dshot_command
    

Description

The t_dshot_command enumeration is used as an argument to the quanser.hardware.hil.esc_output to represent a DSHOT ESC command.

The values of the enumeration are:

Name

Value

Description

DSHOT_COMMAND_DISARM

0

Disarm. The motor will stop.

DSHOT_COMMAND_BEEP_LOW

1

Make a low frequency beep.

DSHOT_COMMAND_BEEP_MEDIUM_LOW

2

Make a medium-low frequency beep.

DSHOT_COMMAND_BEEP_MEDIUM

3

Make a medium frequency beep.

DSHOT_COMMAND_BEEP_MEDIUM_HIGH

4

Make a medium-high frequency beep.

DSHOT_COMMAND_BEEP_HIGH

5

Make a high frequency beep.

DSHOT_COMMAND_ESC_INFORMATION

6

Request information about the ESC (firmware version, serial number and settings over telemetry wire).

DSHOT_COMMAND_ROTATE

7

Rotate in one direction.

DSHOT_COMMAND_ROTATE_OTHER

8

Rotate in the other direction.

DSHOT_COMMAND_3D_MODE_OFF

9

3D mode off.

DSHOT_COMMAND_3D_MODE_ON

10

3D mode on.

DSHOT_COMMAND_ESC_SETTINGS

11

ESC settings request (saved over telemetry wire).

DSHOT_COMMAND_SAVE_SETTINGS

12

Save settings.

DSHOT_COMMAND_ROTATE_NORMAL

20

Rotate in the normal direction (determined by ROTATE or ROTATE_OTHER command).

DSHOT_COMMAND_ROTATE_REVERSE

21

Rotate in the reverse direction (normal direction determined by ROTATE or ROTATE_OTHER command).

DSHOT_COMMAND_LED0_ON

22

LED 0 on.

DSHOT_COMMAND_LED1_ON

23

LED 1 on.

DSHOT_COMMAND_LED2_ON

24

LED 2 on.

DSHOT_COMMAND_LED3_ON

25

LED 3 on.

DSHOT_COMMAND_LED0_OFF

26

LED 0 off.

DSHOT_COMMAND_LED1_OFF

27

LED 1 off.

DSHOT_COMMAND_LED2_OFF

28

LED 2 off.

DSHOT_COMMAND_LED3_OFF

29

LED 3 off.

DSHOT_COMMAND_AUDIO_ON_OFF

30

Audio stream on/off.

DSHOT_COMMAND_SILENT_MODE

31

Silent mode on/off.

DSHOT_COMMAND_ARMED

48

Armed (normal operation)

Parameters

This function has no parameters.

Outputs

int32

Get the numeric value of an enumeration element by casting it to an int32. For example:

int32(t_dshot_command.DSHOT_COMMAND_ARMED)

which yields 48.

char

Get the name of an enumeration element by casting it to a char. For example:

char(t_dshot_command.DSHOT_COMMAND_ARMED)

which yields 'DSHOT_COMMAND_ARMED'.

Examples

        quanser.hardware.hil.esc_output('dshot', t_dshot_command.DSHOT_COMMAND_ARMED);
    

See Also

 

navigation bar