From b0ee5256d5ea0f40fe4e3dded9be27bbc3ffa871 Mon Sep 17 00:00:00 2001 From: Michael Schaeuble Date: Fri, 9 Dec 2016 12:46:59 +0100 Subject: [PATCH] Disable LPE in px4fmu-v2_default With GCC 4.9 the binary is to large for the flash memory. This is why we disabled LPE on that platform. --- ROMFS/px4fmu_common/init.d/rc.mc_apps | 10 ++++++++-- ROMFS/px4fmu_common/init.d/rc.vtol_apps | 10 ++++++++-- cmake/configs/nuttx_px4fmu-v2_default.cmake | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.mc_apps b/ROMFS/px4fmu_common/init.d/rc.mc_apps index d8baf4b866..fa03629267 100644 --- a/ROMFS/px4fmu_common/init.d/rc.mc_apps +++ b/ROMFS/px4fmu_common/init.d/rc.mc_apps @@ -19,8 +19,14 @@ fi # LPE if param compare SYS_MC_EST_GROUP 1 then - attitude_estimator_q start - local_position_estimator start + # Try to start LPE. If it fails, start EKF2 as a default + # Unfortunately we do not build it on px4fmu-v2 duo to a limited flash. + if attitude_estimator_q start + then + local_position_estimator start + else + ekf2 start + fi fi # EKF diff --git a/ROMFS/px4fmu_common/init.d/rc.vtol_apps b/ROMFS/px4fmu_common/init.d/rc.vtol_apps index 51cfb90b44..3af68c798a 100644 --- a/ROMFS/px4fmu_common/init.d/rc.vtol_apps +++ b/ROMFS/px4fmu_common/init.d/rc.vtol_apps @@ -20,8 +20,14 @@ fi # LPE if param compare SYS_MC_EST_GROUP 1 then - attitude_estimator_q start - local_position_estimator start + # Try to start LPE. If it fails, start EKF2 as a default + # Unfortunately we do not build it on px4fmu-v2 duo to a limited flash. + if attitude_estimator_q start + then + local_position_estimator start + else + ekf2 start + fi fi # EKF diff --git a/cmake/configs/nuttx_px4fmu-v2_default.cmake b/cmake/configs/nuttx_px4fmu-v2_default.cmake index 2d0a4a8d0d..e9e20a50d9 100644 --- a/cmake/configs/nuttx_px4fmu-v2_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v2_default.cmake @@ -96,9 +96,9 @@ set(config_module_list # # Estimation modules # - modules/attitude_estimator_q + #modules/attitude_estimator_q #modules/position_estimator_inav - modules/local_position_estimator + #modules/local_position_estimator modules/ekf2 #