diff options
Diffstat (limited to 'ao-bringup')
| -rwxr-xr-x | ao-bringup/test-easymega | 68 | ||||
| -rwxr-xr-x | ao-bringup/test-easymini | 6 | ||||
| -rwxr-xr-x | ao-bringup/test-gps | 1 | ||||
| -rwxr-xr-x | ao-bringup/test-telegps | 2 | ||||
| -rwxr-xr-x | ao-bringup/turnon_easymega | 61 | ||||
| -rwxr-xr-x | ao-bringup/turnon_telemega | 4 | ||||
| -rwxr-xr-x | ao-bringup/turnon_telemetrum | 22 |
7 files changed, 147 insertions, 17 deletions
diff --git a/ao-bringup/test-easymega b/ao-bringup/test-easymega new file mode 100755 index 00000000..eabe1ee5 --- /dev/null +++ b/ao-bringup/test-easymega @@ -0,0 +1,68 @@ +#!/bin/sh + +VERSION=1.0 +PRODUCT=EasyMega +BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'` + +echo "$PRODUCT-v$VERSION Test Program" +echo "Copyright 2014 by Keith Packard. Released under GPL v2" +echo +echo "Expectations:" +echo "\t$PRODUCT v$VERSION powered from USB" +echo + +ret=1 +ao-list | while read product serial dev; do + case "$product" in + "$PRODUCT-v$VERSION") + + echo "Testing $product $serial $dev" + + for igniter in drogue main 0 1 2 3; do + echo "Testing $igniter igniter." + echo -n "Press enter to continue..." + read foo < /dev/tty + ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" $igniter + + case $? in + 0) + ;; + *) + echo "failed" + exit 1 + ;; + esac + done + + echo "Testing baro sensor" + ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev" + + case $? in + 0) + ;; + *) + echo "failed" + exit 1 + esac + + FLASHSIZE=8388608 + + echo "Testing flash" + ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE" + + case $? in + 0) + ;; + *) + echo "failed" + exit 1 + esac + + echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship + ret=0 + ;; + *) + echo "Skipping $product $serial $dev" + ;; + esac +done diff --git a/ao-bringup/test-easymini b/ao-bringup/test-easymini index 29139385..17e00955 100755 --- a/ao-bringup/test-easymini +++ b/ao-bringup/test-easymini @@ -19,7 +19,7 @@ ao-list | while read product serial dev; do echo "Testing $product $serial $dev" echo "Testing igniters. Both should flash" - ./test-igniter "$dev" drogue main + ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" drogue main case $? in 0) @@ -30,7 +30,7 @@ ao-list | while read product serial dev; do esac echo "Testing baro sensor" - ./test-baro "$dev" + ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev" case $? in 0) @@ -43,7 +43,7 @@ ao-list | while read product serial dev; do FLASHSIZE=1048576 echo "Testing flash" - ./test-flash "$dev" "$FLASHSIZE" + ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE" case $? in 0) diff --git a/ao-bringup/test-gps b/ao-bringup/test-gps index a1e21626..04c467b5 100755 --- a/ao-bringup/test-gps +++ b/ao-bringup/test-gps @@ -70,6 +70,7 @@ do_gps(file f) { string[*] sats = find_gps(i, "Sats:"); int actual_flags = string_to_integer(flags[1]); + int actual_sats = string_to_integer(sats[1]); while ((actual_flags & (1 << 4)) == 0) { printf("Flags: %s\n", flags[1]); diff --git a/ao-bringup/test-telegps b/ao-bringup/test-telegps index f3174485..9295dd06 100755 --- a/ao-bringup/test-telegps +++ b/ao-bringup/test-telegps @@ -42,7 +42,7 @@ ao-list | while read product serial dev; do exit 1 esac - echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship + echo "$PRODUCT-v$VERSION" serial "$serial" passed functional tests ret=0 ;; *) diff --git a/ao-bringup/turnon_easymega b/ao-bringup/turnon_easymega new file mode 100755 index 00000000..b313e162 --- /dev/null +++ b/ao-bringup/turnon_easymega @@ -0,0 +1,61 @@ +#!/bin/sh + +if [ -x /usr/bin/ao-flash-stm ]; then + STMLOAD=/usr/bin/ao-flash-stm +else + echo "Can't find ao-flash-stm! Aborting." + exit 1 +fi + +if [ -x /usr/bin/ao-usbload ]; then + USBLOAD=/usr/bin/ao-usbload +else + echo "Can't find ao-usbload! Aborting." + exit 1 +fi + +VERSION=1.0 +REPO=~/altusmetrumllc/Binaries + +echo "EasyMega v$VERSION Turn-On and Calibration Program" +echo "Copyright 2014 by Bdale Garbee. Released under GPL v2" +echo +echo "Expectations:" +echo "\tEasyMega v$VERSION" +echo "\t\twith USB cable attached" +echo "\t\twith ST-Link-V2 cabled to debug header" +echo +echo -n "EasyMega-$VERSION serial number: " +read SERIAL + +echo $STMLOAD + +$STMLOAD $REPO/loaders/easymega-v$VERSION*.elf || exit 1 + +sleep 2 + +$USBLOAD --serial=$SERIAL $REPO/easymega-v$VERSION*.elf || exit 1 + +sleep 2 + +dev=`ao-list | awk '/EasyMega-v'"$VERSION"'/ { print $3; exit(0); }'` + +case "$dev" in +/dev/tty*) + echo "EasyMega found on $dev" + ;; +*) + echo 'No EasyMega-v'"$VERSION"' found' + exit 1 + ;; +esac + +echo 'E 0' > $dev + +../ao-tools/ao-cal-accel/ao-cal-accel $dev + +echo 'E 1' > $dev + +./test-easymega + +exit $? diff --git a/ao-bringup/turnon_telemega b/ao-bringup/turnon_telemega index 39a63642..7745a8e5 100755 --- a/ao-bringup/turnon_telemega +++ b/ao-bringup/turnon_telemega @@ -54,4 +54,6 @@ echo 'E 0' > $dev SERIAL=$SERIAL ./cal-freq $dev -./cal-accel $dev +../ao-tools/ao-cal-accel/ao-cal-accel $dev + +echo 'E 1' > $dev diff --git a/ao-bringup/turnon_telemetrum b/ao-bringup/turnon_telemetrum index 80193c4c..48ff1e27 100755 --- a/ao-bringup/turnon_telemetrum +++ b/ao-bringup/turnon_telemetrum @@ -1,17 +1,13 @@ #!/bin/sh -if [ -x ../ao-tools/ao-stmload/ao-stmload ]; then - STMLOAD=../ao-tools/ao-stmload/ao-stmload -elif [ -x /usr/bin/ao-stmload ]; then - STMLOAD=/usr/bin/ao-stmload +if [ -x /usr/bin/ao-flash-stm ]; then + FLASH_STM=/usr/bin/ao-flash-stm else - echo "Can't find ao-stmload! Aborting." + echo "Can't find ao-flash-stm! Aborting." exit 1 fi -if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then - USBLOAD=../ao-tools/ao-usbload/ao-usbload -elif [ -x /usr/bin/ao-usbload ]; then +if [ -x /usr/bin/ao-usbload ]; then USBLOAD=/usr/bin/ao-usbload else echo "Can't find ao-usbload! Aborting." @@ -24,16 +20,16 @@ echo "TeleMetrum v$VERSION Turn-On and Calibration Program" echo "Copyright 2014 by Bdale Garbee. Released under GPL v2" echo echo "Expectations:" -echo "\tTeleMetrum v$VERSIOn powered from USB" +echo "\tTeleMetrum v$VERSION powered from USB" echo "\t\twith ST-Link-V2 cabled to debug header" echo "\t\twith coax from UHF to frequency counter" echo echo -n "TeleMetrum-$VERSION serial number: " read SERIAL -echo $STMLOAD +echo $FLASH_STM -$STMLOAD --raw ../src/telemetrum-v$VERSION/flash-loader/*.elf || exit 1 +$FLASH_STM ~/altusmetrumllc/Binaries/loaders/telemetrum-v$VERSION-*.elf || exit 1 sleep 2 @@ -57,4 +53,6 @@ echo 'E 0' > $dev SERIAL=$SERIAL ./cal-freq $dev -./cal-accel $dev +../ao-tools/ao-cal-accel/ao-cal-accel $dev + +echo 'E 1' > $dev |
