PX4: use RGBLED state to show startup state

solid white while booting, solid red on error
This commit is contained in:
Andrew Tridgell 2014-02-03 11:37:01 +11:00
parent 43cf3fc38f
commit d3088b230a
3 changed files with 20 additions and 8 deletions

View File

@ -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"

View File

@ -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 &

View File

@ -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
#