From ec1678db831ce94900be8555d444a852ad92e80d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 25 Apr 2013 20:00:20 +1000 Subject: [PATCH] HAL_PX4: setup for 12 output channels moved telemetry port to /dev/ttyS2 to free PWM outputs on FMU --- libraries/AP_HAL_PX4/scripts/rc.APM | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_PX4/scripts/rc.APM b/libraries/AP_HAL_PX4/scripts/rc.APM index f10fb1b360..61a808021c 100644 --- a/libraries/AP_HAL_PX4/scripts/rc.APM +++ b/libraries/AP_HAL_PX4/scripts/rc.APM @@ -5,7 +5,7 @@ # To disable APM startup add a /fs/microsd/APM/nostart file set deviceA /dev/ttyACM0 -set deviceC /dev/ttyS1 +set deviceC /dev/ttyS2 # check for an old file called APM, caused by # a bug in an earlier firmware release @@ -87,10 +87,15 @@ then then echo "PX4IO board OK" echo "PX4IO board OK" >> $logfile + echo "Setting FMU mode_pwm" + fmu mode_pwm echo "Loading FMU_pass mixer" mixer load /dev/pwm_output /etc/mixers/FMU_pass.mix - echo "Setting FMU mode_serial" - fmu mode_serial + if [ $deviceC == /dev/ttyS1 ] + then + # ttyS1 is used for PWM output for 4 extra channels + set deviceC /dev/ttyS2 + fi else echo "No PX4IO board found" echo "No PX4IO board found" >> $logfile