3 if [ -x ../ao-tools/ao-stmload/ao-stmload ]; then
4 STMLOAD=../ao-tools/ao-stmload/ao-stmload
5 elif [ -x /usr/bin/ao-stmload ]; then
6 STMLOAD=/usr/bin/ao-stmload
8 echo "Can't find ao-stmload! Aborting."
12 if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
13 USBLOAD=../ao-tools/ao-usbload/ao-usbload
14 elif [ -x /usr/bin/ao-usbload ]; then
15 USBLOAD=/usr/bin/ao-usbload
17 echo "Can't find ao-usbload! Aborting."
23 echo "TeleMetrum v$VERSION Turn-On and Calibration Program"
24 echo "Copyright 2014 by Bdale Garbee. Released under GPL v2"
27 echo "\tTeleMetrum v$VERSIOn powered from USB"
28 echo "\t\twith ST-Link-V2 cabled to debug header"
29 echo "\t\twith coax from UHF to frequency counter"
31 echo -n "TeleMetrum-$VERSION serial number: "
36 $STMLOAD --raw ../src/telemetrum-v$VERSION/flash-loader/*.elf || exit 1
40 $USBLOAD --serial=$SERIAL /usr/share/altos/telemetrum-v$VERSION*.ihx || exit 1
44 dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'`
48 echo "TeleMetrum found on $dev"
51 echo 'No TeleMetrum-v'"$VERSION"' found'
58 SERIAL=$SERIAL ./cal-freq $dev