From 384ecd4a5be90bdf72f2df0a6a5fa283ca1544ba Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 3 May 2021 17:53:19 +0100 Subject: [PATCH] AP_HAL_ChibiOS: check command queue is empty before arming --- libraries/AP_HAL_ChibiOS/RCOutput.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/RCOutput.cpp b/libraries/AP_HAL_ChibiOS/RCOutput.cpp index 2f9b60296b1..49ebe65c696 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -485,7 +485,11 @@ bool RCOutput::prepare_for_arming() // force all the ESCs to be active, in the future consider returning false // if ESCs are not active that we require _active_escs_mask = (en_mask << chan_offset); +#ifdef DISABLE_DSHOT return true; +#else + return _dshot_command_queue.is_empty(); +#endif } void RCOutput::write(uint8_t chan, uint16_t period_us)