mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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
This commit is contained in:
parent
d625a1b13b
commit
713745ed28
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user