control_allocator: limit status publication rate to 200Hz

Reduces CPU load by ~3.5% on F4 @2khz.
And compute getAllocatedControl as needed (~1.5% CPU reduction)
This commit is contained in:
Beat Küng
2021-11-11 11:13:21 +01:00
committed by Daniel Agar
parent 93a54ee63d
commit b29d9db7f1
6 changed files with 10 additions and 25 deletions
@@ -155,6 +155,7 @@ private:
hrt_abstime _last_run{0};
hrt_abstime _timestamp_sample{0};
hrt_abstime _last_status_pub{0};
DEFINE_PARAMETERS(
(ParamInt<px4::params::CA_AIRFRAME>) _param_ca_airframe,