mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 11:13:34 +08:00
ekf2: multi-ekf force initial selection (and sensor_selection publication)
- depending on the particular sensor configuration and startup timing we were getting an initial sensor_selection publication without valid accel & gyro device ids (only applies to Multi-EKF) - fix faulty accel and gyro device ids - initialize unused test ratio fields to NAN for logging clarity
This commit is contained in:
@@ -1557,10 +1557,10 @@ int EKF2::task_spawn(int argc, char *argv[])
|
||||
|
||||
if (inst) {
|
||||
_ekf2_selector.store(inst);
|
||||
inst->Start();
|
||||
|
||||
} else {
|
||||
PX4_ERR("Failed to start EKF2 selector");
|
||||
PX4_ERR("Failed to create EKF2 selector");
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1604,6 +1604,7 @@ int EKF2::task_spawn(int argc, char *argv[])
|
||||
ekf2_inst->ScheduleNow();
|
||||
success = true;
|
||||
multi_instances_allocated++;
|
||||
_ekf2_selector.load()->ScheduleNow();
|
||||
|
||||
} else {
|
||||
PX4_ERR("instance %d alloc failed", instance);
|
||||
|
||||
Reference in New Issue
Block a user