AP_DroneCAN: prevent saturation of CPU with DroneCAN thread

This commit is contained in:
Andrew Tridgell 2024-09-24 20:51:11 +10:00 committed by Peter Barker
parent 070363e453
commit 9dc7dc32c8
1 changed files with 4 additions and 0 deletions

View File

@ -521,6 +521,10 @@ void AP_DroneCAN::loop(void)
continue;
}
// ensure that the DroneCAN thread cannot completely saturate
// the CPU, preventing low priority threads from running
hal.scheduler->delay_microseconds(100);
canard_iface.process(1);
safety_state_send();