All pastes #545338 Raw Edit

Something

public text v1 · immutable
·published 2007-06-06 19:39 UTC
rendered paste body
proc getFrequency {rig vfo} {
	global VFO_B
	
	set vfo "A"
	if {$vfo == $VFO_B} {
		set vfo "B"
	}
	
	sendCommand $rig "?$vfo"
	set hexFreq [readResult $rig]
	puts [string length $hexFreq]
	#binary scan $hexFreq @1I freq
	#return $freq
	
	# Debugging
	binary scan $hexFreq c* data
	foreach byte $data {
   	puts [expr {$byte & 0xff}]
	}
	return "0"
}

getFrequency $rig $VFO_A

Output is:

5
65
0
165
111
24