ao-bringup: Don't wait for user when testing EasyMini igniters
authorKeith Packard <keithp@keithp.com>
Fri, 16 Mar 2018 21:49:04 +0000 (14:49 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 16 Mar 2018 21:49:04 +0000 (14:49 -0700)
I always have the LEDs ready to go before starting the turnon process.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-bringup/test-easymini
ao-bringup/test-igniters-nowait [new file with mode: 0755]

index 7850b5502edad62fe6ff443acf8e8488592cd0e9..ddcfcd5457d18b6ea703937687c0c59fbc9d18b8 100755 (executable)
@@ -21,7 +21,7 @@ while [ $found -eq 0 ]; do
                echo -e '\e[34m'Testing $product $serial $dev'\e[39m'
                echo ""
                
-               ./test-igniters "$dev" drogue main
+               ./test-igniters-nowait "$dev" drogue main
                echo ""
 
                echo "Testing baro sensor"
diff --git a/ao-bringup/test-igniters-nowait b/ao-bringup/test-igniters-nowait
new file mode 100755 (executable)
index 0000000..849f91d
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+dev="$1"
+shift
+
+for igniter in "$@"; do
+       pass="n"
+       while [ $pass != "y" ]; do
+
+               echo "Testing $igniter igniter."
+               ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" $igniter
+
+               case $? in
+                   0)
+                       echo "pass"
+                       pass="y"
+                       ;;
+                   *)
+                       echo -n "Failed. Try again. Press enter to continue..."
+                       read foo < /dev/tty
+                       ;;
+               esac
+       done
+done
+
+exit 0