3 if [ -x ../ao-tools/ao-flash/ao-flash-lpc ]; then
4 FLASH_LPC=../ao-tools/ao-flash/ao-flash-lpc
5 elif [ -x /usr/bin/ao-flash-lpc ]; then
6 FLASH_LPC=/usr/bin/ao-flash-lpc
8 echo "Can't find ao-flash-lpc! Aborting."
12 if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
13 USBLOAD=../ao-tools/ao-usbload/ao-usbload
14 elif [ -x /usr/bin/ao-usbload ]; then
15 USBLOAD=/usr/bin/ao-usbload
17 echo "Can't find ao-usbload! Aborting."
25 echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
26 echo "Copyright 2010 by Bdale Garbee. Released under GPL v2"
29 echo "\t$PRODUCT v$VERSION powered from USB"
30 echo "\t\twith ST-Link-V2 cabled to debug header"
32 echo -n "$PRODUCT-$VERSION serial number: "
37 $FLASH_LPC ../src/easymini-v$VERSION/flash-loader/*.elf || exit 1
41 $USBLOAD --serial=$SERIAL ../src/easymini-v$VERSION/*.ihx || exit 1
42 #$USBLOAD --serial=$SERIAL /usr/share/altos/telemega-v$VERSION*.ihx || exit 1
46 dev=`ao-list | awk '/$PRODUCT-v'"$VERSION"'/ { print $3; exit(0); }'`
50 echo "$PRODUCT found on $dev"
53 echo 'No $PRODUCT-v'"$VERSION"' found'
58 echo "Testing igniters. Both should flash"
59 ./test-igniter "$dev" drogue main
69 echo "Testing baro sensor"