mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Handle SYS_AUTOSTART 0 the same as no valid airframe being available (#25645)
* ROMFS: do not exit airframe loading if SYS_AUTOSTART is 0 Do not treat 0 as a magic value that skips the aiframe loading. Instead leave it tot he rc.autostart to load an airframe that if finds appropriate (can be defined in external aiframe). Signed-off-by: Silvan <silvan@auterion.com> * ROMFS: adjust airframe load spacing and message/comment wording --------- Signed-off-by: Silvan <silvan@auterion.com> Co-authored-by: Silvan <silvan@auterion.com>
This commit is contained in:
parent
aa0668663a
commit
33301764e4
@ -228,30 +228,26 @@ else
|
||||
fi
|
||||
unset BOARD_RC_ADDITIONAL_INIT
|
||||
|
||||
# Load airframe configuration based on SYS_AUTOSTART parameter
|
||||
if ! param compare SYS_AUTOSTART 0
|
||||
# Load airframe configuration based on SYS_AUTOSTART parameter if successful VEHICLE_TYPE gets set
|
||||
# Run autogenerated ROMFS airframe script
|
||||
. ${R}etc/init.d/rc.autostart
|
||||
|
||||
if [ ${VEHICLE_TYPE} = none ]
|
||||
then
|
||||
# rc.autostart directly run the right airframe script which sets the VEHICLE_TYPE
|
||||
# Look for airframe in ROMFS
|
||||
. ${R}etc/init.d/rc.autostart
|
||||
|
||||
if [ ${VEHICLE_TYPE} = none ]
|
||||
# Run external airframe script on SD card
|
||||
if [ $STORAGE_AVAILABLE = yes ]
|
||||
then
|
||||
# Use external startup file
|
||||
if [ $STORAGE_AVAILABLE = yes ]
|
||||
then
|
||||
. ${R}etc/init.d/rc.autostart_ext
|
||||
else
|
||||
echo "ERROR [init] SD card not mounted - can't load external airframe"
|
||||
fi
|
||||
. ${R}etc/init.d/rc.autostart_ext
|
||||
else
|
||||
echo "ERROR [init] SD not mounted, skipping external airframe"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${VEHICLE_TYPE} = none ]
|
||||
then
|
||||
echo "ERROR [init] No airframe file found for SYS_AUTOSTART value"
|
||||
param set SYS_AUTOSTART 0
|
||||
tune_control play error
|
||||
fi
|
||||
if [ ${VEHICLE_TYPE} = none ]
|
||||
then
|
||||
echo "ERROR [init] No airframe file found for SYS_AUTOSTART value"
|
||||
param set SYS_AUTOSTART 0
|
||||
tune_control play error
|
||||
fi
|
||||
|
||||
# Check parameter version and reset upon airframe configuration version mismatch.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user