control_allocator: add status publication rate limitation comment

This commit is contained in:
Beat Küng 2021-11-29 13:57:36 +01:00 committed by Daniel Agar
parent 70e46a194f
commit ed3a115c8f
1 changed files with 2 additions and 0 deletions

View File

@ -337,6 +337,8 @@ ControlAllocator::Run()
// Publish actuator setpoint and allocator status
publish_actuator_controls();
// Publish status at limited rate, as it's somewhat expensive and we use it for slower dynamics
// (i.e. anti-integrator windup)
if (now - _last_status_pub >= 5_ms) {
publish_control_allocator_status();
_last_status_pub = now;