mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-27 02:58:31 -04:00
PX4: use RGBLED state to show startup state
solid white while booting, solid red on error
This commit is contained in:
parent
43cf3fc38f
commit
d3088b230a
@ -267,14 +267,6 @@ fi
|
||||
|
||||
echo "Trying PX4IO board"
|
||||
|
||||
# rgbled
|
||||
if rgbled start
|
||||
then
|
||||
echo "rgbled started OK"
|
||||
else
|
||||
echo "Failed to start rgbled driver" >> $logfile
|
||||
fi
|
||||
|
||||
if mtd start /fs/mtd
|
||||
then
|
||||
echo "started mtd driver OK"
|
||||
|
@ -1,5 +1,12 @@
|
||||
echo "Error in startup"
|
||||
|
||||
tone_alarm MNCC
|
||||
|
||||
if [ $HAVE_RGBLED == 1 ]
|
||||
then
|
||||
rgbled rgb 16 0 0
|
||||
fi
|
||||
|
||||
nshterm /dev/ttyACM0 &
|
||||
sleep 1
|
||||
nshterm /dev/ttyS0 &
|
||||
|
@ -25,6 +25,15 @@ set USB autoconnect
|
||||
#
|
||||
|
||||
|
||||
if rgbled start
|
||||
then
|
||||
set HAVE_RGBLED 1
|
||||
# show startup white
|
||||
rgbled rgb 16 16 16
|
||||
else
|
||||
set HAVE_RGBLED 0
|
||||
fi
|
||||
|
||||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
@ -40,6 +49,10 @@ else
|
||||
set HAVE_MICROSD 0
|
||||
# Play SOS
|
||||
tone_alarm 2
|
||||
if [ $HAVE_RGBLED == 1 ]
|
||||
then
|
||||
rgbled rgb 16 0 0
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user