X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-bringup%2Fturnon_teledongle;h=0cdbde7a5973e37830e775ed677da6a0a66b503b;hb=e3b30d4bd6faf68c885791fb87229558cc1157a6;hp=e6750c453a0e72ca11c197e2ad18f8ed4f3607ca;hpb=4af4e36cda96d053458eeb040e35886890917385;p=fw%2Faltos diff --git a/ao-bringup/turnon_teledongle b/ao-bringup/turnon_teledongle index e6750c45..0cdbde7a 100755 --- a/ao-bringup/turnon_teledongle +++ b/ao-bringup/turnon_teledongle @@ -28,8 +28,21 @@ echo "\t$PRODUCT_NAME 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 "$PRODUCT_NAME-$VERSION serial number: " -read SERIAL + +case $# in + 1) + SERIAL="$1" + echo "$PRODUCT-$VERSION serial number: $SERIAL" + ;; + 0) + echo -n "$PRODUCT-$VERSION serial number: " + read SERIAL + ;; + *) + echo "Usage: $0 " 1>&2 + exit 1; + ;; +esac BINARIES=$HOME/altusmetrumllc/Binaries @@ -58,7 +71,7 @@ esac echo 'E 0' > $dev -./cal-freq-file $dev $SERIAL +SERIAL=$SERIAL ./cal-freq $dev case $? in 0)