diff options
| author | Keith Packard <keithp@keithp.com> | 2015-02-16 20:49:39 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2015-02-16 20:49:39 -0800 | 
| commit | b13a78e4f457f67605fc6dafc7f9733746a4f70c (patch) | |
| tree | 2a307d395162e2a3a0e8e786574b61c4f4ea0743 | |
| parent | 2ebb4dff758058ae9512cf36518416eb69b928f0 (diff) | |
ao-bringup: Changes for telebt for keith's hacking
Make the programming device auto-detect by username.
Load binary from ~/altusmetrumllc
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rwxr-xr-x | ao-bringup/turnon_telebt | 18 | 
1 files changed, 14 insertions, 4 deletions
| diff --git a/ao-bringup/turnon_telebt b/ao-bringup/turnon_telebt index c4902f31..f4100ae2 100755 --- a/ao-bringup/turnon_telebt +++ b/ao-bringup/turnon_telebt @@ -1,8 +1,5 @@  #!/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 @@ -34,6 +31,19 @@ read SERIAL  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 @@ -45,7 +55,7 @@ read FREQ  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/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 | 
