mirror of https://github.com/ArduPilot/ardupilot
mk: updated to new tonealarm system
This commit is contained in:
parent
ac7d3e0366
commit
ac5ec09f35
|
@ -18,20 +18,6 @@ then
|
|||
sh /etc/init.d/rc.error
|
||||
fi
|
||||
|
||||
# mount binfs so we can find the built-in apps
|
||||
if [ -f /bin/reboot ]
|
||||
then
|
||||
echo "binfs already mounted"
|
||||
else
|
||||
echo "Mounting binfs"
|
||||
if mount -t binfs /dev/null /bin
|
||||
then
|
||||
echo "binfs mounted OK"
|
||||
else
|
||||
sh /etc/init.d/rc.error
|
||||
fi
|
||||
fi
|
||||
|
||||
set sketch NONE
|
||||
if rm /fs/microsd/APM/boot.log
|
||||
then
|
||||
|
@ -39,12 +25,6 @@ then
|
|||
fi
|
||||
set logfile /fs/microsd/APM/BOOT.LOG
|
||||
|
||||
if [ ! -f /bin/ArduPilot ]
|
||||
then
|
||||
echo "/bin/ardupilot not found"
|
||||
sh /etc/init.d/rc.error
|
||||
fi
|
||||
|
||||
if mkdir /fs/microsd/APM > /dev/null
|
||||
then
|
||||
echo "Created APM directory"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
echo "Error in startup"
|
||||
|
||||
tone_alarm MNCC
|
||||
|
||||
if [ $HAVE_RGBLED == 1 ]
|
||||
then
|
||||
rgbled rgb 16 0 0
|
||||
|
|
|
@ -24,17 +24,6 @@ echo "[init] looking for microSD..."
|
|||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "[init] card mounted at /fs/microsd"
|
||||
set HAVE_MICROSD 1
|
||||
# Start playing the startup tune
|
||||
if [ -f /etc/tones/startup ]
|
||||
then
|
||||
tone_alarm /etc/tones/startup
|
||||
else
|
||||
tone_alarm 1
|
||||
fi
|
||||
else
|
||||
set HAVE_MICROSD 0
|
||||
tone_alarm MNBGG
|
||||
fi
|
||||
|
||||
# Look for an additional init script that allows changing the default
|
||||
|
@ -75,24 +64,14 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ $HAVE_MICROSD == 0 ]
|
||||
then
|
||||
if usb_connected
|
||||
then
|
||||
echo "Opening USB nsh"
|
||||
else
|
||||
echo "booting with no microSD"
|
||||
set HAVE_MICROSD 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# if this is an APM build then there will be a rc.APM script
|
||||
# from an EXTERNAL_SCRIPTS build option
|
||||
if [ -f /etc/init.d/rc.APM -a $HAVE_MICROSD == 1 -a ! -f /fs/microsd/APM/nostart ]
|
||||
if [ -f /etc/init.d/rc.APM -a ! -f /fs/microsd/APM/nostart ]
|
||||
then
|
||||
echo Running rc.APM
|
||||
# if APM startup is successful then nsh will exit
|
||||
sh /etc/init.d/rc.APM
|
||||
else
|
||||
echo "Opening USB nsh"
|
||||
nshterm /dev/ttyACM0 &
|
||||
fi
|
||||
|
|
|
@ -3,8 +3,6 @@ set USB autoconnect
|
|||
set NSH_ERROR_UART1 /dev/ttyACM0
|
||||
set NSH_ERROR_UART2 /dev/ttyS0
|
||||
|
||||
tone_alarm /etc/tones/startup
|
||||
|
||||
if sercon
|
||||
then
|
||||
echo "[init] USB interface connected"
|
||||
|
|
Loading…
Reference in New Issue