mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Sensors: Do not update calibration when armed. Run at lower priority than attitude control and estimator
This ensures that the massive (several hundred params if temperature compensation is enabled) param load is not done in flight. We also lower the priority to ensure that attitude controllers and estimators which might consume sensor data directly execute immediately, which should reduce their latency.
This commit is contained in:
parent
3bdd0e95dd
commit
df173d4d8a
@ -311,6 +311,10 @@ Sensors::~Sensors()
|
||||
int
|
||||
Sensors::parameters_update()
|
||||
{
|
||||
if (_armed) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* read the parameter values into _parameters */
|
||||
int ret = update_parameters(_parameter_handles, _parameters);
|
||||
|
||||
@ -709,7 +713,7 @@ Sensors::start()
|
||||
/* start the task */
|
||||
_sensors_task = px4_task_spawn_cmd("sensors",
|
||||
SCHED_DEFAULT,
|
||||
SCHED_PRIORITY_MAX - 5,
|
||||
SCHED_PRIORITY_MAX - 6,
|
||||
2000,
|
||||
(px4_main_t)&Sensors::task_main_trampoline,
|
||||
nullptr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user