3 if [ -x ../ao-tools/ao-load/ao-load ]; then
4 AOLOAD=../ao-tools/ao-load/ao-load
5 elif [ -x /usr/bin/ao-load ]; then
6 AOLOAD=/usr/bin/ao-load
8 echo "Can't find ao-load! Aborting."
12 if [ -x ../ao-tools/ao-rawload/ao-rawload ]; then
13 RAWLOAD=../ao-tools/ao-rawload/ao-rawload
14 elif [ -x /usr/bin/ao-rawload ]; then
15 RAWLOAD=/usr/bin/ao-rawload
17 echo "Can't find ao-rawload! Aborting."
23 echo "TeleMini v$VERSION Turn-On and Calibration Program"
24 echo "Copyright 2011 by Bdale Garbee. Released under GPL v2"
27 echo "\tTeleMini v$VERSION powered from LiPo"
28 echo "\t\twith TeleDongle (on /dev/ttyACM0) cabled to debug header"
29 echo "\t\twith frequency counter able to sample RF output"
31 echo -n "TeleMini serial number: "
45 $RAWLOAD -D $programmer -r ao_led_blink.ihx
46 echo "LEDs should be blinking"
49 $RAWLOAD -D $programmer -r ao_radio_xmit.ihx
50 echo -n "Generating RF carrier. Please enter measured frequency: "
53 CAL_VALUE=`nickle -e "floor(434.55 / $FREQ * 1186611 + 0.5)"`
55 echo "Programming flash with cal value " $CAL_VALUE
56 $AOLOAD -D $programmer --cal $CAL_VALUE ~/altusmetrumllc/Binaries/telemini-v$VERSION-*.ihx $SERIAL
58 echo "Serial number "$SERIAL" programmed with RF cal value "$CAL_VALUE
59 echo "Unplug and replug USB, cu to the board, confirm freq and record power"