From: Bdale Garbee Date: Mon, 31 Dec 2018 19:37:45 +0000 (-0700) Subject: ao-bringup: get turnon_easymega working for v2.0 X-Git-Tag: 1.9~9 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=60b46436f9f642d43be4e00df08eccadb57214e8 ao-bringup: get turnon_easymega working for v2.0 --- diff --git a/ao-bringup/test-easymega b/ao-bringup/test-easymega index 2f0a7822..1e419b44 100755 --- a/ao-bringup/test-easymega +++ b/ao-bringup/test-easymega @@ -1,25 +1,25 @@ #!/bin/sh -VERSION=1.0 +VERSION=2.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 "Copyright 2018 by Bdale Garbee. Released under GPL v2" echo echo "Expectations:" echo "\t$PRODUCT v$VERSION powered from USB" echo ret=1 -../ao-tools/ao-list/ao-list | while read product serial dev; do +ao-list | while read product serial dev; do case "$product" in "$PRODUCT-v$VERSION") echo "Testing $product $serial $dev" echo "" - ./test-igniters $dev drogue main 0 1 2 3 + ./test-igniters $dev main drogue 3 0 1 2 echo"" echo "Testing baro sensor" diff --git a/ao-bringup/test-easymega-v1.0 b/ao-bringup/test-easymega-v1.0 new file mode 100755 index 00000000..2f0a7822 --- /dev/null +++ b/ao-bringup/test-easymega-v1.0 @@ -0,0 +1,55 @@ +#!/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-tools/ao-list/ao-list | while read product serial dev; do + case "$product" in + "$PRODUCT-v$VERSION") + + echo "Testing $product $serial $dev" + echo "" + + ./test-igniters $dev drogue main 0 1 2 3 + echo"" + + echo "Testing baro sensor" + ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev" + + case $? in + 0) + ;; + *) + echo "failed" + exit 1 + esac + echo"" + + 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"" + + echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship + ret=0 + ;; + esac +done diff --git a/ao-bringup/turnon_easymega b/ao-bringup/turnon_easymega index 9de8d985..64180bd3 100755 --- a/ao-bringup/turnon_easymega +++ b/ao-bringup/turnon_easymega @@ -4,15 +4,15 @@ PRODUCT=EasyMega VERSION=2.0 REPO=~/altusmetrumllc/Binaries -if [ -x ../ao-tools/ao-flash/ao-flash-stm ]; then - STMLOAD=../ao-tools/ao-flash/ao-flash-stm +if [ -x /usr/bin/ao-flash-stm ]; then + FLASH_STM=/usr/bin/ao-flash-stm else 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 +if [ -x /usr/bin/ao-usbload ]; then + USBLOAD=/usr/bin/ao-usbload else echo "Can't find ao-usbload! Aborting." exit 1 @@ -42,17 +42,17 @@ case $# in ;; esac -echo $STMLOAD +echo $FLASH_STM -$STMLOAD $REPO/loaders/easymega-v$VERSION*.elf || exit 1 +$FLASH_STM $REPO/loaders/easymega-v$VERSION*.elf -sleep 2 +sleep 3 $USBLOAD --serial=$SERIAL $REPO/easymega-v$VERSION*.elf || exit 1 -sleep 2 +sleep 5 -dev=`../ao-tools/ao-list/ao-list | awk '/'"$PRODUCT"'-v'"$VERSION"'/ { print $3; exit(0); }'` +dev=`ao-list | awk '/'"$PRODUCT"'-v'"$VERSION"'/ { print $3; exit(0); }'` case "$dev" in /dev/tty*) @@ -66,7 +66,11 @@ esac echo 'E 0' > $dev -../ao-tools/ao-cal-accel/ao-cal-accel $dev || exit 1 +failed=1 +while [ $failed = 1 ]; do + ../ao-tools/ao-cal-accel/ao-cal-accel $dev + failed=$? +done echo 'E 1' > $dev