diff --git a/ROMFS/px4fmu_common/init.d/rc.interface b/ROMFS/px4fmu_common/init.d/rc.interface index b19ec75ff8..0c471808a8 100644 --- a/ROMFS/px4fmu_common/init.d/rc.interface +++ b/ROMFS/px4fmu_common/init.d/rc.interface @@ -103,7 +103,7 @@ then set MIXER_AUX none fi -if [ $MIXER_AUX != none ] +if [ $MIXER_AUX != none -a $AUX_MODE != none ] then # # Load aux mixer diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index dac23fe6b7..e532445531 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -490,10 +490,17 @@ then then mavlink start -d /dev/ttyS2 -b 57600 -m osd -r 1000 fi + # Sensors on the PWM interface bank + # clear pins 5 and 6 + if param compare SENS_EN_LL40LS 1 + then + set AUX_MODE pwm4 + fi if param greater TRIG_MODE 0 then # Get FMU driver out of the way set MIXER_AUX none + set AUX_MODE none camera_trigger start fi fi @@ -507,19 +514,6 @@ then # sh /etc/init.d/rc.logging - # Sensors on the PWM interface bank - if param compare SENS_EN_LL40LS 1 - then - if pwm_input start - then - if ll40ls start pwm - then - # Reserve the last two pins - set AUX_MODE pwm4 - fi - fi - fi - # # Start up ARDrone Motor interface # @@ -736,6 +730,17 @@ unset TUNE_ERR # Boot is complete, inform MAVLink app(s) that the system is now fully up and running mavlink boot_complete +# Sensors on the PWM interface bank +if param compare SENS_EN_LL40LS 1 +then + if pwm_input start + then + if ll40ls start pwm + then + fi + fi +fi + if ver hwcmp PX4FMU_V2 then # Check for flow sensor - as it is a background task, launch it last