mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +08:00
Move additional logic block to rc.vehicle_setup, add rc.vehicle_setup to init.d/CMakeLists.txt, and relocate sd card logic block higher up in rcS. (#9896)
This commit is contained in:
@@ -114,6 +114,7 @@ px4_add_romfs_files(
|
|||||||
rc.thermal_cal
|
rc.thermal_cal
|
||||||
rc.ugv_apps
|
rc.ugv_apps
|
||||||
rc.ugv_defaults
|
rc.ugv_defaults
|
||||||
|
rc.vehicle_setup
|
||||||
rc.vtol_apps
|
rc.vtol_apps
|
||||||
rc.vtol_defaults
|
rc.vtol_defaults
|
||||||
rcS
|
rcS
|
||||||
|
|||||||
@@ -165,3 +165,12 @@ then
|
|||||||
# Start standard UGV apps
|
# Start standard UGV apps
|
||||||
sh /etc/init.d/rc.ugv_apps
|
sh /etc/init.d/rc.ugv_apps
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generic setup (autostart ID not found).
|
||||||
|
#
|
||||||
|
if [ $VEHICLE_TYPE == none ]
|
||||||
|
then
|
||||||
|
echo "No autostart ID found"
|
||||||
|
ekf2 start
|
||||||
|
fi
|
||||||
|
|||||||
@@ -100,6 +100,18 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ver hwcmp CRAZYFLIE -o ver hwcmp AEROCORE2
|
||||||
|
then
|
||||||
|
# AEROCORE2 and CF2 shouldn't have an sd card.
|
||||||
|
else
|
||||||
|
# Run no SD alarm.
|
||||||
|
if [ $LOG_FILE == /dev/null ]
|
||||||
|
then
|
||||||
|
# Play SOS.
|
||||||
|
tone_alarm error
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Look for an init script on the microSD card.
|
# Look for an init script on the microSD card.
|
||||||
# Disable autostart if the script found.
|
# Disable autostart if the script found.
|
||||||
@@ -561,15 +573,6 @@ then
|
|||||||
#
|
#
|
||||||
navigator start
|
navigator start
|
||||||
|
|
||||||
#
|
|
||||||
# Generic setup (autostart ID not found).
|
|
||||||
#
|
|
||||||
if [ $VEHICLE_TYPE == none ]
|
|
||||||
then
|
|
||||||
echo "No autostart ID found"
|
|
||||||
ekf2 start
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start any custom addons.
|
# Start any custom addons.
|
||||||
if [ -f $FEXTRAS ]
|
if [ -f $FEXTRAS ]
|
||||||
then
|
then
|
||||||
@@ -577,26 +580,6 @@ then
|
|||||||
sh $FEXTRAS
|
sh $FEXTRAS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ver hwcmp CRAZYFLIE
|
|
||||||
then
|
|
||||||
# CF2 shouldn't have an sd card.
|
|
||||||
else
|
|
||||||
|
|
||||||
if ver hwcmp AEROCORE2
|
|
||||||
then
|
|
||||||
# AEROCORE2 shouldn't have an sd card.
|
|
||||||
else
|
|
||||||
# Run no SD alarm.
|
|
||||||
if [ $LOG_FILE == /dev/null ]
|
|
||||||
then
|
|
||||||
# Play SOS.
|
|
||||||
tone_alarm error
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start a thermal calibration if required.
|
# Start a thermal calibration if required.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user