ekf2: multi ekf supports up to 4 IMUs

This commit is contained in:
Daniel Agar
2020-10-28 20:18:33 -04:00
parent cf082d7f1c
commit 3f9f2c6fdf
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -1407,11 +1407,11 @@ int EKF2::task_spawn(int argc, char *argv[])
// ekf selector requires SENS_IMU_MODE = 0
multi_mode = true;
// IMUs (1 - 3 supported)
// IMUs (1 - 4 supported)
param_get(param_find("EKF2_MULTI_IMU"), &imu_instances);
if (imu_instances < 1 || imu_instances > 3) {
const int32_t imu_instances_limited = math::constrain(imu_instances, 1, 3);
if (imu_instances < 1 || imu_instances > 4) {
const int32_t imu_instances_limited = math::constrain(imu_instances, 1, 4);
PX4_WARN("EKF2_MULTI_IMU limited %d -> %d", imu_instances, imu_instances_limited);
param_set_no_notification(param_find("EKF2_MULTI_IMU"), &imu_instances_limited);
imu_instances = imu_instances_limited;
+1 -1
View File
@@ -40,7 +40,7 @@
* @group EKF2
* @reboot_required true
* @min 0
* @max 3
* @max 4
*/
PARAM_DEFINE_INT32(EKF2_MULTI_IMU, 0);