diff --git a/libraries/AP_HAL_PX4/scripts/rc.APM b/libraries/AP_HAL_PX4/scripts/rc.APM index 2c8938b40f..f10fb1b360 100644 --- a/libraries/AP_HAL_PX4/scripts/rc.APM +++ b/libraries/AP_HAL_PX4/scripts/rc.APM @@ -30,6 +30,7 @@ else fi set sketch NONE +set logfile /fs/microsd/APM/boot.log if [ -f /bin/ArduPlane ] then @@ -73,6 +74,7 @@ then fi echo "Starting APM sensors" + echo "Starting APM sensors" > $logfile uorb start mpu6000 start ms5611 start @@ -80,15 +82,18 @@ then adc start echo "Trying PX4IO board" + echo "Trying PX4IO board" >> $logfile if px4io start then echo "PX4IO board OK" + echo "PX4IO board OK" >> $logfile echo "Loading FMU_pass mixer" mixer load /dev/pwm_output /etc/mixers/FMU_pass.mix echo "Setting FMU mode_serial" fmu mode_serial else echo "No PX4IO board found" + echo "No PX4IO board found" >> $logfile echo "Setting up PX4FMU direct mode" fmu mode_pwm if [ $deviceC == /dev/ttyS1 ] @@ -100,6 +105,7 @@ then fi echo Starting $sketch + echo Starting $sketch >> $logfile $sketch -d $deviceA -d2 $deviceC start # if starting on the console, tell nsh to exit @@ -115,3 +121,5 @@ fi fi echo "rc.APM finished" +echo "rc.APM finished" >> $logfile +