Beispiel #1
0
def main():

	for c in range(1024):
		freq = band_plan_800.get_freq(c)
		chan = 0
		if freq is not None:
			chan = band_plan_800.get_chan(freq)
			if chan != c:
				print "%d -> %f -> %d" % (c, freq, chan)


	for i in range(1520):
		f = 851.0 + i * 0.0125
		chan = band_plan_800.get_chan(f)
		if chan is not None:
			freq = band_plan_800.get_freq(chan)
			if round(freq - f, 6) != 0:
				print "%f -> %d -> %f" % (f, chan, freq)


	return 0
Beispiel #2
0
def main():

	SERS_WEST_SIMULCAST = 868.3375	# XXX should have stored file with previous good values

	parser = OptionParser(option_class = eng_option, usage = "%prog: [options]")
	parser.add_option("-l", "--log-file", type = "string", default = None, help = "Log channel assignments to a file rather than stdout.")
	parser.add_option("-c", "--center", type = "float", default = 867.0, help = "Center of monitored frequencies in MHz.")
	parser.add_option("-b", "--bandwidth", type = "float", default = 5, help = "Monitoring bandwidth in MHz.")
	parser.add_option("-C", "--control-channel", type = "float", default = SERS_WEST_SIMULCAST, help = "Control channel in MHz. [default = %default]")
	parser.add_option("-A", "--antenna", type = "string", default = "RX2", help = "Select RX antenna where appropriate.")
	(options, args) = parser.parse_args()


	sz = smartzone(options)
	sz.control_channel_add(get_chan(options.control_channel))	# until we can scan for control channels
	sz.run()