From 713745ed28d7a32c65b691c80f201ae9f413f075 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Nov 2023 06:49:24 +1100 Subject: [PATCH] AP_DroneCAN: don't update hobbywing ESC table while armed some hobbywing ESCs have a bug where requesting the ID table can cause the ESC to stutter --- libraries/AP_DroneCAN/AP_DroneCAN.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_DroneCAN/AP_DroneCAN.cpp b/libraries/AP_DroneCAN/AP_DroneCAN.cpp index c980c413cc..7853319cc8 100644 --- a/libraries/AP_DroneCAN/AP_DroneCAN.cpp +++ b/libraries/AP_DroneCAN/AP_DroneCAN.cpp @@ -427,6 +427,11 @@ void AP_DroneCAN::loop(void) #if AP_DRONECAN_HOBBYWING_ESC_SUPPORT void AP_DroneCAN::hobbywing_ESC_update(void) { + if (hal.util->get_soft_armed()) { + // don't update ID database while disarmed, as it can cause + // some hobbywing ESCs to stutter + return; + } uint32_t now = AP_HAL::millis(); if (now - hobbywing.last_GetId_send_ms >= 1000U) { hobbywing.last_GetId_send_ms = now;