forked from Archive/PX4-Autopilot
Startup: don't configure anything if definitions are missing
This commit is contained in:
parent
aea135a9ce
commit
36d1ec80ef
|
@ -464,16 +464,20 @@ then
|
||||||
|
|
||||||
if [ $MIXER == none ]
|
if [ $MIXER == none ]
|
||||||
then
|
then
|
||||||
# Set default mixer for multicopter if not defined
|
echo "Default mixer for multicopter not defined"
|
||||||
set MIXER quad_x
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $MAV_TYPE == none ]
|
if [ $MAV_TYPE == none ]
|
||||||
then
|
then
|
||||||
# Use MAV_TYPE = 2 (quadcopter) if not defined
|
|
||||||
set MAV_TYPE 2
|
|
||||||
|
|
||||||
# Use mixer to detect vehicle type
|
# Use mixer to detect vehicle type
|
||||||
|
if [ $MIXER == FMU_quad_x -o $MIXER == FMU_quad_+ ]
|
||||||
|
then
|
||||||
|
set MAV_TYPE 2
|
||||||
|
fi
|
||||||
|
if [ $MIXER == FMU_quad_w ]
|
||||||
|
then
|
||||||
|
set MAV_TYPE 2
|
||||||
|
fi
|
||||||
if [ $MIXER == FMU_hexa_x -o $MIXER == FMU_hexa_+ ]
|
if [ $MIXER == FMU_hexa_x -o $MIXER == FMU_hexa_+ ]
|
||||||
then
|
then
|
||||||
set MAV_TYPE 13
|
set MAV_TYPE 13
|
||||||
|
@ -487,8 +491,14 @@ then
|
||||||
set MAV_TYPE 14
|
set MAV_TYPE 14
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
param set MAV_TYPE $MAV_TYPE
|
# Still no MAV_TYPE found
|
||||||
|
if [ $MAV_TYPE == none ]
|
||||||
|
then
|
||||||
|
echo "Unknown MAV_TYPE"
|
||||||
|
else
|
||||||
|
param set MAV_TYPE $MAV_TYPE
|
||||||
|
fi
|
||||||
|
|
||||||
# Load mixer and configure outputs
|
# Load mixer and configure outputs
|
||||||
sh /etc/init.d/rc.interface
|
sh /etc/init.d/rc.interface
|
||||||
|
@ -502,10 +512,8 @@ then
|
||||||
#
|
#
|
||||||
if [ $VEHICLE_TYPE == none ]
|
if [ $VEHICLE_TYPE == none ]
|
||||||
then
|
then
|
||||||
echo "[init] Vehicle type: GENERIC"
|
echo "[init] Vehicle type: No autostart ID found"
|
||||||
|
|
||||||
# Load mixer and configure outputs
|
|
||||||
sh /etc/init.d/rc.interface
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start any custom addons
|
# Start any custom addons
|
||||||
|
|
Loading…
Reference in New Issue