#!/bin/sh
-# serial number of the TeleDongle being used as the flash programmer
-DONGLE=612
-
if [ -x ../ao-tools/ao-load/ao-load ]; then
AOLOAD=../ao-tools/ao-load/ao-load
elif [ -x /usr/bin/ao-load ]; then
echo $RAWLOAD
+case $USER in
+ bdale)
+ DONGLE=100
+ ;;
+ keithp)
+ DONGLE=186
+ ;;
+ *)
+ echo "Unknow user"
+ exit 1
+ ;;
+esac
+
$RAWLOAD -D $DONGLE -r ao_led_blink.ihx
echo "LEDs should be blinking"
sleep 5
CAL_VALUE=`nickle -e "floor(434.55 / $FREQ * 1186611 + 0.5)"`
echo "Programming flash with cal value " $CAL_VALUE
-$AOLOAD -D $DONGLE --cal $CAL_VALUE /usr/share/altos/stable/telebt-v1.0*.ihx $SERIAL
+$AOLOAD -D $DONGLE --cal $CAL_VALUE ~/altusmetrumllc/Binaries/telebt-v1.0*.ihx $SERIAL
echo "Serial number "$SERIAL" programmed with RF cal value "$CAL_VALUE
+echo $SERIAL","$CAL_VALUE >> cal_values
echo "Unplug debug cable, power cycle, cu to the board, confirm freq and record power"