altos: Interrupt radio receive when changing data rate
[fw/altos] / ao-bringup / test-easymini
1 #!/bin/sh
2
3 VERSION=1.0
4 PRODUCT=EasyMini
5 BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
6
7 echo "$PRODUCT-v$VERSION Test Program"
8 echo "Copyright 2014 by Keith Packard.  Released under GPL v2"
9 echo
10 echo "Expectations:"
11 echo "\t$PRODUCT v$VERSION powered from USB"
12 echo
13
14 ret=1
15 ao-list | while read product serial dev; do
16     case "$product" in
17         "$PRODUCT-v$VERSION")
18
19             echo "Testing $product $serial $dev"
20
21             echo "Testing igniters. Both should flash"
22             ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" drogue main
23
24             case $? in
25                 0)
26                     ;;
27                 *)
28                     echo "failed"
29                     exit 1
30             esac
31
32             echo "Testing baro sensor"
33             ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
34
35             case $? in
36                 0)
37                     ;;
38                 *)
39                     echo "failed"
40                     exit 1
41             esac
42
43             FLASHSIZE=1048576
44
45             echo "Testing flash"
46             ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
47
48             case $? in
49                 0)
50                     ;;
51                 *)
52                     echo "failed"
53                     exit 1
54             esac
55
56             echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
57             ret=0
58             ;;
59         *)
60             echo "Skipping $product $serial $dev"
61             ;;
62     esac
63 done