From 3f9f2c6fdf1282375fbb219a3982da63aa4a2c48 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 28 Oct 2020 20:18:33 -0400 Subject: [PATCH] ekf2: multi ekf supports up to 4 IMUs --- src/modules/ekf2/EKF2.cpp | 6 +++--- src/modules/ekf2/ekf2_multi_params.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index 6428dae8dc..ea4c6610ba 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -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; diff --git a/src/modules/ekf2/ekf2_multi_params.c b/src/modules/ekf2/ekf2_multi_params.c index 7e2db48baa..cd06198dc1 100644 --- a/src/modules/ekf2/ekf2_multi_params.c +++ b/src/modules/ekf2/ekf2_multi_params.c @@ -40,7 +40,7 @@ * @group EKF2 * @reboot_required true * @min 0 - * @max 3 + * @max 4 */ PARAM_DEFINE_INT32(EKF2_MULTI_IMU, 0);