From 7ab58a8bc136da2e8a9166bd3fee7ed801c2adb0 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 6 Jan 2015 16:30:47 +0100 Subject: allow to specify secondary mixer which drives fmu PWM outputs --- ROMFS/px4fmu_common/init.d/rc.interface | 14 ++++++++++++++ ROMFS/px4fmu_common/init.d/rcS | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'ROMFS/px4fmu_common') diff --git a/ROMFS/px4fmu_common/init.d/rc.interface b/ROMFS/px4fmu_common/init.d/rc.interface index bab71be93..87c9e3045 100644 --- a/ROMFS/px4fmu_common/init.d/rc.interface +++ b/ROMFS/px4fmu_common/init.d/rc.interface @@ -80,3 +80,17 @@ then pwm failsafe -d $OUTPUT_DEV $FAILSAFE fi fi + +# check if should load secondary mixer +if [ $MIXER_SEC != none ] +then + if fmu mode_pwm + then + echo "[i] FMU mode_pwm started to handle secondary mixer" + # load the specified mixer + mixer load /dev/pwm_output1 /etc/mixers/$MIXER_SEC.mix + else + echo "[i] ERROR: FMU mode_pwm start failed" + tone_alarm $TUNE_ERR + fi +fi diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 10c5e0947..924f6ebc0 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -116,6 +116,7 @@ then set HIL no set VEHICLE_TYPE none set MIXER none + set MIXER_SEC none set OUTPUT_MODE none set PWM_OUT none set PWM_RATE none @@ -580,7 +581,7 @@ then then set MAV_TYPE 19 fi - if [ $MIXER == FMU_firefly6 ] + if [ $MIXER == FMU_firefly6_rotors ] then set MAV_TYPE 21 fi -- cgit v1.2.3