improve test procedures for TeleMega
[fw/altos] / ao-bringup / cal-freq
index dc2f2212983c4508680bcf6d65bc48b6ff96bc6a..54f7a905b212b509c79531a03e92c9a16cd6f131 100755 (executable)
@@ -19,15 +19,17 @@ while true; do
 
        echo 'C 0' > $dev
 
+       calline=`./get-radio-cal $dev`
+       CURRENT_CAL=`echo $calline | awk '{print $2}'`
+       CURRENT_FREQ=`echo $calline | awk '{print $4}'`
+       CAL_VALUE=$CURRENT_CAL
+
        case "$FREQ" in
        "")
+               echo $SERIAL","$CAL_VALUE >> cal_values
                exit 0
                ;;
        *)
-               calline=`./get-radio-cal $dev`
-               CURRENT_CAL=`echo $calline | awk '{print $2}'`
-               CURRENT_FREQ=`echo $calline | awk '{print $4}'`
-
                echo "Current radio calibration "$CURRENT_CAL
                echo "Current radio frequency "$CURRENT_FREQ
 
@@ -44,3 +46,4 @@ EOF
                ;;
        esac
 done
+