]> git.gag.com Git - fw/altos/blob - ao-bringup/test-telemetrum-v2.0
altos: Add EasyMotor logging support
[fw/altos] / ao-bringup / test-telemetrum-v2.0
1 #!/bin/sh
2
3 VERSION=2.0
4 PRODUCT=TeleMetrum
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             echo ""
21
22             ./test-igniters "$dev" drogue main
23             echo ""
24
25             echo "Testing baro sensor"
26             ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
27
28             case $? in
29                 0)
30                     ;;
31                 *)
32                     echo "failed"
33                     exit 1
34             esac
35             echo""
36
37             FLASHSIZE=8388608
38
39             echo "Testing flash"
40             ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
41
42             case $? in
43                 0)
44                     ;;
45                 *)
46                     echo "failed"
47                     exit 1
48             esac
49             echo""
50
51             echo "Testing GPS"
52             ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
53
54             case $? in
55                 0)
56                     ;;
57                 *)
58                     echo "failed"
59                     exit 1
60             esac
61             echo""
62
63             echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
64             echo "\007"
65             ret=0
66             ;;
67     esac
68 done