9 echo "Usage: $0 <device> <serial>"
18 dd if=$dev iflag=nonblock of=/dev/null > /dev/null 2>&1
22 echo -n "Generating RF carrier. Please enter measured frequency [enter for done]: "
28 calline=`./get-radio-cal $dev`
29 CURRENT_CAL=`echo $calline | awk '{print $2}'`
30 CURRENT_FREQ=`echo $calline | awk '{print $4}'`
31 CAL_VALUE=$CURRENT_CAL
35 echo $serial","$CAL_VALUE >> cal_values
39 echo "Current radio calibration "$CURRENT_CAL
40 echo "Current radio frequency "$CURRENT_FREQ
42 CAL_VALUE=`nickle -e "floor($CURRENT_FREQ / $FREQ * $CURRENT_CAL + 0.5)"`
44 echo "Setting cal value" $CAL_VALUE
46 dd if=$dev iflag=nonblock of=/dev/null > /dev/null 2>&1