diff --git a/src/drivers/dshot/DShot.cpp b/src/drivers/dshot/DShot.cpp index ef34e2dc46e..ba7f4c1bf12 100644 --- a/src/drivers/dshot/DShot.cpp +++ b/src/drivers/dshot/DShot.cpp @@ -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) { diff --git a/src/drivers/dshot/DShotTelemetry.cpp b/src/drivers/dshot/DShotTelemetry.cpp index 17642d84e58..f8cd8f74f56 100644 --- a/src/drivers/dshot/DShotTelemetry.cpp +++ b/src/drivers/dshot/DShotTelemetry.cpp @@ -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();