3 if [ -x /usr/bin/ao-flash-stm ]; then
4 FLASH_STM=/usr/bin/ao-flash-stm
6 echo "Can't find ao-flash-stm! Aborting."
10 if [ -x /usr/bin/ao-usbload ]; then
11 USBLOAD=/usr/bin/ao-usbload
13 echo "Can't find ao-usbload! Aborting."
19 echo "TeleMetrum v$VERSION Turn-On and Calibration Program"
20 echo "Copyright 2014 by Bdale Garbee. Released under GPL v2"
23 echo "\tTeleMetrum v$VERSION powered from USB"
24 echo "\t\twith ST-Link-V2 cabled to debug header"
25 echo "\t\twith coax from UHF to frequency counter"
27 echo -n "TeleMetrum-$VERSION serial number: "
32 $FLASH_STM ~/altusmetrumllc/Binaries/loaders/telemetrum-v$VERSION-*.elf || exit 1
36 $USBLOAD --serial=$SERIAL /usr/share/altos/telemetrum-v$VERSION*.ihx || exit 1
40 dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'`
44 echo "TeleMetrum found on $dev"
47 echo 'No TeleMetrum-v'"$VERSION"' found'
54 SERIAL=$SERIAL ./cal-freq $dev
56 ../ao-tools/ao-cal-accel/ao-cal-accel $dev