mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user