aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/rcS
diff options
context:
space:
mode:
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/rcS')
-rw-r--r--ROMFS/px4fmu_common/init.d/rcS37
1 files changed, 24 insertions, 13 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index 88077c67f..76f021e33 100644
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -3,8 +3,7 @@
# PX4FMU startup script.
#
-# Default to auto-start mode. An init script on the microSD card
-# can change this to prevent automatic startup of the flight script.
+# Default to auto-start mode.
#
set MODE autostart
@@ -465,17 +464,25 @@ then
if [ $MIXER == none ]
then
- # Set default mixer for multicopter if not defined
- set MIXER quad_x
+ echo "Default mixer for multicopter not defined"
fi
if [ $MAV_TYPE == none ]
then
- # Use MAV_TYPE = 2 (quadcopter) if not defined
- set MAV_TYPE 2
-
# Use mixer to detect vehicle type
- if [ $MIXER == FMU_hex_x -o $MIXER == FMU_hex_+ ]
+ 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_+ ]
+ then
+ set MAV_TYPE 13
+ fi
+ if [ $MIXER == hexa_cox ]
then
set MAV_TYPE 13
fi
@@ -488,8 +495,14 @@ then
set MAV_TYPE 14
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
sh /etc/init.d/rc.interface
@@ -503,10 +516,8 @@ then
#
if [ $VEHICLE_TYPE == none ]
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
# Start any custom addons