diff --git a/src/DShotRMT.cpp b/src/DShotRMT.cpp index bba62e1..48f369e 100644 --- a/src/DShotRMT.cpp +++ b/src/DShotRMT.cpp @@ -235,6 +235,13 @@ dshot_result_t DShotRMT::setMotorSpinDirection(bool reversed) return sendCommand(command, SETTINGS_COMMAND_REPEATS, SETTINGS_COMMAND_DELAY_US); } +// Sends a raw DShot command to the ESC. +dshot_result_t DShotRMT::sendRawCommand(uint16_t command_value) +{ + _packet = _buildDShotPacket(command_value); + return _sendDShotFrame(_packet); +} + // Use with caution dshot_result_t DShotRMT::saveESCSettings() { diff --git a/src/DShotRMT.h b/src/DShotRMT.h index 211cb26..b2a147d 100644 --- a/src/DShotRMT.h +++ b/src/DShotRMT.h @@ -56,6 +56,9 @@ public: // Sends a DShot command to the ESC with a specified repeat count and delay. dshot_result_t sendCommand(dshotCommands_e command, uint16_t repeat_count, uint16_t delay_us); + // Sends a raw DShot command to the ESC. + dshot_result_t sendRawCommand(uint16_t command_value); + // Retrieves telemetry data from the ESC. dshot_result_t getTelemetry();