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:
Matthias Grob
2025-10-14 06:56:27 +02:00
committed by GitHub
parent aa0668663a
commit 33301764e4
+4 -8
View File
@@ -228,21 +228,18 @@ else
fi fi
unset BOARD_RC_ADDITIONAL_INIT unset BOARD_RC_ADDITIONAL_INIT
# Load airframe configuration based on SYS_AUTOSTART parameter # Load airframe configuration based on SYS_AUTOSTART parameter if successful VEHICLE_TYPE gets set
if ! param compare SYS_AUTOSTART 0 # Run autogenerated ROMFS airframe script
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 . ${R}etc/init.d/rc.autostart
if [ ${VEHICLE_TYPE} = none ] if [ ${VEHICLE_TYPE} = none ]
then then
# Use external startup file # Run external airframe script on SD card
if [ $STORAGE_AVAILABLE = yes ] if [ $STORAGE_AVAILABLE = yes ]
then then
. ${R}etc/init.d/rc.autostart_ext . ${R}etc/init.d/rc.autostart_ext
else else
echo "ERROR [init] SD card not mounted - can't load external airframe" echo "ERROR [init] SD not mounted, skipping external airframe"
fi fi
fi fi
@@ -252,7 +249,6 @@ else
param set SYS_AUTOSTART 0 param set SYS_AUTOSTART 0
tune_control play error tune_control play error
fi fi
fi
# Check parameter version and reset upon airframe configuration version mismatch. # Check parameter version and reset upon airframe configuration version mismatch.
# Reboot required because "param reset_all" would reset all "param set" lines from airframe. # Reboot required because "param reset_all" would reset all "param set" lines from airframe.