mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 06:51:37 +08:00
ROMFS: Reset the estimator param to EKF2 if LPE fails to start
This commit is contained in:
@@ -3,6 +3,15 @@
|
|||||||
# Standard apps for fixed wing
|
# Standard apps for fixed wing
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# LPE
|
||||||
|
if param compare SYS_MC_EST_GROUP 1
|
||||||
|
then
|
||||||
|
echo "ERROR [init] Estimator LPE not supported on fixed wing. Using EKF2"
|
||||||
|
param set SYS_MC_EST_GROUP 2
|
||||||
|
param save
|
||||||
|
ekf2 start
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start the attitude and position estimator
|
# Start the attitude and position estimator
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
# INAV (deprecated)
|
# INAV (deprecated)
|
||||||
if param compare SYS_MC_EST_GROUP 0
|
if param compare SYS_MC_EST_GROUP 0
|
||||||
then
|
then
|
||||||
echo "ERROR [init] Estimator INAV deprecated. Using LPE"
|
echo "ERROR [init] Estimator INAV deprecated. Using EKF2"
|
||||||
param set SYS_MC_EST_GROUP 1
|
param set SYS_MC_EST_GROUP 2
|
||||||
param save
|
param save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -25,6 +25,9 @@ then
|
|||||||
then
|
then
|
||||||
local_position_estimator start
|
local_position_estimator start
|
||||||
else
|
else
|
||||||
|
echo "ERROR [init] Estimator LPE not available. Using EKF2"
|
||||||
|
param set SYS_MC_EST_GROUP 2
|
||||||
|
param save
|
||||||
ekf2 start
|
ekf2 start
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
# INAV (deprecated)
|
# INAV (deprecated)
|
||||||
if param compare SYS_MC_EST_GROUP 0
|
if param compare SYS_MC_EST_GROUP 0
|
||||||
then
|
then
|
||||||
echo "ERROR [init] Estimator INAV deprecated. Using LPE"
|
echo "ERROR [init] Estimator INAV deprecated. Using EKF2"
|
||||||
param set SYS_MC_EST_GROUP 1
|
param set SYS_MC_EST_GROUP 2
|
||||||
param save
|
param save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -21,11 +21,14 @@ fi
|
|||||||
if param compare SYS_MC_EST_GROUP 1
|
if param compare SYS_MC_EST_GROUP 1
|
||||||
then
|
then
|
||||||
# Try to start LPE. If it fails, start EKF2 as a default
|
# 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.
|
# Unfortunately we do not build it on px4fmu-v2 due to a limited flash.
|
||||||
if attitude_estimator_q start
|
if attitude_estimator_q start
|
||||||
then
|
then
|
||||||
local_position_estimator start
|
local_position_estimator start
|
||||||
else
|
else
|
||||||
|
echo "ERROR [init] Estimator LPE not available. Using EKF2"
|
||||||
|
param set SYS_MC_EST_GROUP 2
|
||||||
|
param save
|
||||||
ekf2 start
|
ekf2 start
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user