fix(dshot): set telemetry bit on DShot commands

Bluejay and BLHeli_S ignore commands unless the tlm bit is set, so EDT enable never latched. ESC_INFO keeps it clear: AM32 answers the bit with a KISS frame on the same UART as the EEPROM dump and aborts that frame when the dump starts, so the response would begin with a truncated frame.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
Jacob Dahl
2026-08-28 17:26:16 -06:00
committed by Jacob Dahl
parent 73a56a6a9b
commit bd048b6e3c
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -398,7 +398,11 @@ void DShot::update_motor_commands(int num_outputs)
command_sent = true;
}
up_dshot_motor_command(i, command, false);
// Bluejay/BLHeli_S discard commands unless the tlm bit is set. It stays clear on commands answered
// over the telemetry UART: AM32 reads it as a KISS request and starts that frame on the same wire,
// then aborts it a few loop iterations later to send the EEPROM dump.
const bool request_telemetry = command != DSHOT_CMD_MOTOR_STOP && !_current_command.expect_response;
up_dshot_motor_command(i, command, request_telemetry);
}
if (command_sent) {
+2
View File
@@ -278,6 +278,8 @@ TelemetryStatus DShotTelemetry::decodeTelemetryResponse(uint8_t *buffer, int len
void DShotTelemetry::setExpectCommandResponse(int motor_index, uint16_t command)
{
// Earlier commands sent with the tlm bit set leave KISS frames in the RX FIFO.
_uart.flush();
_command_response_motor_index = motor_index;
_command_response_command = command;
_command_response_start = hrt_absolute_time();