Start of trail End of trail navigation bar

Table of Contents

t_esc_protocol

Enumerated type for representing ESC protocols for the quanser.hardware.hil.esc_output method or hil_esc_output function.

Syntax

        enumeration t_esc_protocol
    

Description

The t_esc_protocol enumeration is used as an argument to the quanser.hardware.hil.esc_output to represent an ESC protocol.

The values of the enumeration are:

Name

Value

Description

ESC_PROTOCOL_STANDARD_PWM

1

1-2ms, 20ms period

ESC_PROTOCOL_ONESHOT125

2

OneShot125: 125-250us, 500us period

ESC_PROTOCOL_ONESHOT42

3

OneShot42: 42-84us, 168us period

ESC_PROTOCOL_MULTISHOT

4

5us-25us, 50us period

ESC_PROTOCOL_DSHOT

5

DShot150, DShot300, DShot600, DShot1200, DShot2400, DShot3600 where DShotn, n = bit rate in kHz

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_esc_protocol.ESC_PROTOCOL_DSHOT)

which yields 5.

char

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

char(t_esc_protocol.ESC_PROTOCOL_DSHOT)

which yields 'ESC_PROTOCOL_DSHOT'.

Examples

        quanser.hardware.hil.esc_output(t_esc_protocol.ESC_PROTOCOL_DSHOT, t_dshot_command.DSHOT_COMMAND_ARMED);
    

See Also

 

navigation bar