update turnon_telebt to use new approach for saving cal value on TeleBT
authorBdale Garbee <bdale@gag.com>
Tue, 9 Oct 2018 17:46:09 +0000 (11:46 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 9 Oct 2018 17:46:09 +0000 (11:46 -0600)
ao-bringup/turnon_telebt

index 8bf9bcb..3e9fdda 100755 (executable)
@@ -64,11 +64,18 @@ case "$dev" in
        ;;
 esac
 
+CALFILE=cal-$SERIAL.txt
+
 echo 'E 0' > $dev
 
-SERIAL=$SERIAL ./cal-freq $dev
+../ao-tools/ao-cal-freq/ao-cal-freq --nosave --output=$CALFILE --tty=$dev
+
+# echo 'E 1' > $dev
 
-echo 'E 1' > $dev
+CAL_VALUE=`cat $CALFILE`
+echo $SERIAL","$CAL_VALUE >> cal_values
+echo "Reflashing with calibration: $CAL_VALUE"
+$USBLOAD --cal=$CAL_VALUE --tty=$dev $ALTOS_FILE || exit 1
 
 echo -n "checking BlueTooth functionality... "
 btdev=`hcitool scan | awk -F \- '/TeleBT/ { print $2 }'`