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:
Daniel Agar
2020-12-07 21:37:24 -05:00
committed by GitHub
parent 3276916df9
commit 681590c510
3 changed files with 118 additions and 100 deletions
+3 -2
View File
@@ -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);