From cc9d492b7257f485f7d2f3fe3dcb77d5f2dd3c97 Mon Sep 17 00:00:00 2001 From: Wastl Kraus Date: Sat, 1 Nov 2025 20:12:02 +0100 Subject: [PATCH] need raw values --- src/DShotRMT.cpp | 7 +++++++ src/DShotRMT.h | 3 +++ 2 files changed, 10 insertions(+) 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();