Skip to content

Commit

Permalink
AP_DroneCAN: prevent saturation of CPU with DroneCAN thread
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Sep 26, 2024
1 parent a83505e commit 59e387a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_DroneCAN/AP_DroneCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,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();
Expand Down

0 comments on commit 59e387a

Please sign in to comment.