From c9f0d1e645afcb17e710ec3c9262ec6d8621dca9 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 28 Oct 2016 17:19:42 +0200 Subject: [PATCH] rcS: move check for PWM input up pwm_input was not working correctly (only after a pwm_input reset) on Pixracer because fmu was started on all PWM output channels. This moves the check if PWM input is needed up before the fmu start. --- ROMFS/px4fmu_common/init.d/rcS | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 8e03c477e1..28ed13083b 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -367,6 +367,20 @@ then set OUTPUT_MODE uavcan_esc fi + # Sensors on the PWM interface bank + # clear pins 5 and 6 + if param compare SENS_EN_LL40LS 1 + then + set FMU_MODE pwm4 + set AUX_MODE pwm4 + fi + if param greater TRIG_MODE 0 + then + set FMU_MODE pwm4 + set AUX_MODE pwm4 + camera_trigger start + fi + # If OUTPUT_MODE == none then something is wrong with setup and we shouldn't try to enable output if [ $OUTPUT_MODE != none ] then @@ -567,21 +581,9 @@ then then mavlink start -d /dev/ttyS2 -b 921600 -r 20000 fi - # Sensors on the PWM interface bank - # clear pins 5 and 6 - if param compare SENS_EN_LL40LS 1 - then - set FMU_MODE pwm4 - set AUX_MODE pwm4 - fi - if param greater TRIG_MODE 0 - then - set FMU_MODE pwm4 - set AUX_MODE pwm4 - camera_trigger start - fi fi + # # Starting stuff according to UAVCAN_ENABLE value #