mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 14:08:45 -04:00
HAL_PX4: create APM/boot.log on SD card
useful for debugging
This commit is contained in:
parent
cc932973d6
commit
6ddb99a50b
@ -30,6 +30,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
set sketch NONE
|
set sketch NONE
|
||||||
|
set logfile /fs/microsd/APM/boot.log
|
||||||
|
|
||||||
if [ -f /bin/ArduPlane ]
|
if [ -f /bin/ArduPlane ]
|
||||||
then
|
then
|
||||||
@ -73,6 +74,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting APM sensors"
|
echo "Starting APM sensors"
|
||||||
|
echo "Starting APM sensors" > $logfile
|
||||||
uorb start
|
uorb start
|
||||||
mpu6000 start
|
mpu6000 start
|
||||||
ms5611 start
|
ms5611 start
|
||||||
@ -80,15 +82,18 @@ then
|
|||||||
adc start
|
adc start
|
||||||
|
|
||||||
echo "Trying PX4IO board"
|
echo "Trying PX4IO board"
|
||||||
|
echo "Trying PX4IO board" >> $logfile
|
||||||
if px4io start
|
if px4io start
|
||||||
then
|
then
|
||||||
echo "PX4IO board OK"
|
echo "PX4IO board OK"
|
||||||
|
echo "PX4IO board OK" >> $logfile
|
||||||
echo "Loading FMU_pass mixer"
|
echo "Loading FMU_pass mixer"
|
||||||
mixer load /dev/pwm_output /etc/mixers/FMU_pass.mix
|
mixer load /dev/pwm_output /etc/mixers/FMU_pass.mix
|
||||||
echo "Setting FMU mode_serial"
|
echo "Setting FMU mode_serial"
|
||||||
fmu mode_serial
|
fmu mode_serial
|
||||||
else
|
else
|
||||||
echo "No PX4IO board found"
|
echo "No PX4IO board found"
|
||||||
|
echo "No PX4IO board found" >> $logfile
|
||||||
echo "Setting up PX4FMU direct mode"
|
echo "Setting up PX4FMU direct mode"
|
||||||
fmu mode_pwm
|
fmu mode_pwm
|
||||||
if [ $deviceC == /dev/ttyS1 ]
|
if [ $deviceC == /dev/ttyS1 ]
|
||||||
@ -100,6 +105,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo Starting $sketch
|
echo Starting $sketch
|
||||||
|
echo Starting $sketch >> $logfile
|
||||||
$sketch -d $deviceA -d2 $deviceC start
|
$sketch -d $deviceA -d2 $deviceC start
|
||||||
|
|
||||||
# if starting on the console, tell nsh to exit
|
# if starting on the console, tell nsh to exit
|
||||||
@ -115,3 +121,5 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "rc.APM finished"
|
echo "rc.APM finished"
|
||||||
|
echo "rc.APM finished" >> $logfile
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user