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.
This commit is contained in:
Julian Oes 2016-10-28 17:19:42 +02:00 committed by Lorenz Meier
parent b9cf679118
commit c9f0d1e645
1 changed files with 15 additions and 13 deletions

View File

@ -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
#