Update DShotRMT.h
This commit is contained in:
parent
1449f0d06d
commit
a8c2ccaaea
30
DShotRMT.h
30
DShotRMT.h
|
|
@ -85,6 +85,34 @@ typedef struct dshot_config_s
|
|||
uint16_t ticks_one_low;
|
||||
} dshot_config_t;
|
||||
|
||||
// The official DShot Commands
|
||||
typedef enum dshot_cmd_e {
|
||||
DSHOT_CMD_MOTOR_STOP = 0, // Currently not implemented - STOP Motors
|
||||
DSHOT_CMD_BEEP1, // Wait at least length of beep (380ms) before next command
|
||||
DSHOT_CMD_BEEP2, // Wait at least length of beep (380ms) before next command
|
||||
DSHOT_CMD_BEEP3, // Wait at least length of beep (400ms) before next command
|
||||
DSHOT_CMD_BEEP4, // Wait at least length of beep (400ms) before next command
|
||||
DSHOT_CMD_BEEP5, // Wait at least length of beep (400ms) before next command
|
||||
DSHOT_CMD_ESC_INFO, // Currently not implemented
|
||||
DSHOT_CMD_SPIN_DIRECTION_1, // Need 6x, no wait required
|
||||
DSHOT_CMD_SPIN_DIRECTION_2, // Need 6x, no wait required
|
||||
DSHOT_CMD_3D_MODE_OFF, // Need 6x, no wait required
|
||||
DSHOT_CMD_3D_MODE_ON, // Need 6x, no wait required
|
||||
DSHOT_CMD_SETTINGS_REQUEST, // Currently not implemented
|
||||
DSHOT_CMD_SAVE_SETTINGS, // Need 6x, wait at least 12ms before next command
|
||||
DSHOT_CMD_SPIN_DIRECTION_NORMAL, // Need 6x, no wait required
|
||||
DSHOT_CMD_SPIN_DIRECTION_REVERSED, // Need 6x, no wait required
|
||||
DSHOT_CMD_LED0_ON, // Currently not implemented
|
||||
DSHOT_CMD_LED1_ON, // Currently not implemented
|
||||
DSHOT_CMD_LED2_ON, // Currently not implemented
|
||||
DSHOT_CMD_LED3_ON, // Currently not implemented
|
||||
DSHOT_CMD_LED0_OFF, // Currently not implemented
|
||||
DSHOT_CMD_LED1_OFF, // Currently not implemented
|
||||
DSHOT_CMD_LED2_OFF, // Currently not implemented
|
||||
DSHOT_CMD_LED3_OFF, // Currently not implemented
|
||||
DSHOT_CMD_MAX = 47
|
||||
} dshot_cmd_t;
|
||||
|
||||
// The main DShotRMT class
|
||||
class DShotRMT
|
||||
{
|
||||
|
|
@ -106,7 +134,7 @@ public:
|
|||
bool begin(dshot_mode_t dshot_mode = DSHOT_OFF, bool is_bidirectional = false);
|
||||
|
||||
// The sendThrottleValue() function sends a DShot packet with a given
|
||||
// throttle value (between 0 and 2047) and an optional telemetry
|
||||
// throttle value (between 49 and 2047) and an optional telemetry
|
||||
// request flag.
|
||||
// void sendThrottleValue(uint16_t throttle_value, telemetric_request_t telemetric_request = NO_TELEMETRIC);
|
||||
void sendThrottleValue(uint16_t throttle_value);
|
||||
|
|
|
|||
Loading…
Reference in New Issue