def __init__(self, app, conf): BaseHw.__init__(self, app, conf) self.use_sidetone = 1 self.vfo_frequency = 0 # current vfo frequency self.rf_gain_labels = ('RF 0 dB', 'RF +16', 'RF -20', 'RF -10') # Other hardware self.anttuner = station_hardware.AntennaTuner(app, conf) # Control the antenna tuner self.lpfilter = station_hardware.LowPassFilter(app, conf) # Control LP filter box self.hpfilter = station_hardware.HighPassFilter(app, conf) # Control HP filter box
def __init__(self, app, conf): BaseHw.__init__(self, app, conf) self.vfo_frequency = 0 # current vfo frequency self.rf_gain_labels = ('RF 0 dB', 'RF +16', 'RF -20', 'RF -10') self.rf_gain = 0 # Preamp or attenuation in dB; changed via app.Hardware # Other hardware self.anttuner = station_hardware.AntennaTuner(app, conf) # Control the antenna tuner self.lpfilter = station_hardware.LowPassFilter(app, conf) # Control LP filter box self.hpfilter = station_hardware.HighPassFilter(app, conf) # Control HP filter box self.controlbox = station_hardware.ControlBox(app, conf) # Control my Station Control Box
def __init__(self, app, conf): BaseHw.__init__(self, app, conf) self.GUI = None self.vfo_frequency = 0 # current vfo frequency self.rf_gain_labels = ('RF 0 dB', 'RF +16') self.rf_gain = 0 # Preamp or attenuation in dB; changed via app.Hardware # Other hardware self.anttuner = station_hardware.AntennaTuner(app, conf) # Control the antenna tuner #self.lpfilter = station_hardware.LowPassFilter(app, conf) # Control LP filter box #self.hpfilter = station_hardware.HighPassFilter(app, conf) # Control HP filter box self.controlbox = station_hardware.ControlBox(app, conf) # Control my Station Control Box self.v2filter = station_hardware.FilterBoxV2(app, conf) # Control V2 filter box
def __init__(self, app, conf): BaseHw.__init__(self, app, conf) self.use_sidetone = 1 self.vfo_frequency = 0 # current vfo frequency self.rf_gain_labels = ('RF 0 dB', 'RF +16', 'RF -20', 'RF -10') # Other hardware self.anttuner = station_hardware.AntennaTuner( app, conf) # Control the antenna tuner self.lpfilter = station_hardware.LowPassFilter( app, conf) # Control LP filter box self.hpfilter = station_hardware.HighPassFilter( app, conf) # Control HP filter box
def __init__(self, app, conf): BaseHw.__init__(self, app, conf) if hasattr(app, 'is_vna_program'): self.is_vna = True else: self.is_vna = False self.vfo_frequency = 0 # current vfo frequency self.rf_gain_labels = ('RF 0 dB', 'RF +16', 'RF -20', 'RF -10') self.rf_gain = 0 # Preamp or attenuation in dB; changed via app.Hardware # Other hardware self.anttuner = station_hardware.AntennaTuner( app, conf) # Control the antenna tuner self.lpfilter = station_hardware.LowPassFilter( app, conf) # Control LP filter box self.hpfilter = station_hardware.HighPassFilter( app, conf) # Control HP filter box self.controlbox = station_hardware.ControlBox( app, conf) # Control my Station Control Box self.v2filter = station_hardware.FilterBoxV2( app, conf) # Control V2 filter box
def __init__(self, app, conf): BaseHardware.__init__(self, app, conf) self.ar8600_frequency = 0 # current AR8600 tuning frequency self.hware_frequency = 0 # current hardware VFO frequency self.vfo_frequency = 0 # current Quisk VFO frequency self.invert = 1 # The frequency spectrum is backwards self.serial = None # the open serial port self.timer = 0.02 # time between AR8600 commands in seconds self.time0 = 0 # time of last AR8600 command self.serial_out = [] # send commands slowly self.offset = 10700000 # frequency offset from AR8600 tuning freq to IF output self.tx_freq = 0 # current frequency conf.BandEdge['220'] = (222000000, 225000000) conf.BandEdge['440'] = (420000000, 450000000) conf.BandEdge['900'] = (902000000, 928000000) conf.BandEdge['1240'] = (1240000000, 1300000000) rpt_file = os.path.normpath(os.path.join(os.getcwd(), '..')) rpt_file = os.path.join(rpt_file, 'MetroCor.txt') fp = open(rpt_file, 'r') self.repeaters = {} for line in fp: line = line.strip() if line and line[0] != '#': line = line.split('\t') fout = int(float(line[0]) * 1000000 + 0.1) text = "%s %s, %s" % (line[2], line[3], line[5]) if fout in self.repeaters: self.repeaters[fout] = "%s ; %s" % (self.repeaters[fout], text) else: self.repeaters[fout] = text fp.close() rpt_file = os.path.normpath(os.path.join(os.getcwd(), '..')) rpt_file = os.path.join(rpt_file, 'ARCC.csv') fp = open(rpt_file, 'r') for line in fp: line = line.strip() if line and line[0] != '#': line = line.split(',') fout = float(line[3]) if fout >= 2000.0: continue fout = int(fout * 1000000 + 0.1) text = "%s %s, %s" % (line[5], line[2], line[0]) if fout in self.repeaters: self.repeaters[fout] = "%s ; %s" % (self.repeaters[fout], text) else: self.repeaters[fout] = text fp.close() rpt_file = os.path.normpath(os.path.join(os.getcwd(), '..')) rpt_file = os.path.join(rpt_file, 'Repeaters.csv') fp = open(rpt_file, 'r') for line in fp: line = line.strip() if line and line[0] != '#': line = line.split(',') fout = float(line[3]) if fout >= 2000.0: continue fout = int(fout * 1000000 + 0.1) if line[0]: text = "%s %s, %s" % (line[5], line[2], line[0]) else: text = line[5] if fout in self.repeaters: self.repeaters[fout] = "%s ; %s" % (self.repeaters[fout], text) else: self.repeaters[fout] = text fp.close() for freq, text in list(self.repeaters.items()): if len(text) > 80: t = '' stations = text.split(';') for s in stations: s = s.strip() t = t + s.split()[0] + ' ' + s.split(',')[1] + '; ' self.repeaters[freq] = t self.rpt_freq_list = list(self.repeaters) self.rpt_freq_list.sort()
def __init__(self, app, conf): BaseHardware.__init__(self, app, conf) self.ar8600_frequency = 0 # current AR8600 tuning frequency self.hware_frequency = 0 # current hardware VFO frequency self.vfo_frequency = 0 # current Quisk VFO frequency self.invert = 1 # The frequency spectrum is backwards self.serial = None # the open serial port self.timer = 0.02 # time between AR8600 commands in seconds self.time0 = 0 # time of last AR8600 command self.serial_out = [] # send commands slowly self.offset = 10700000 # frequency offset from AR8600 tuning freq to IF output self.tx_freq = 0 # current frequency conf.BandEdge['220'] = (222000000, 225000000) conf.BandEdge['440'] = (420000000, 450000000) conf.BandEdge['900'] = (902000000, 928000000) conf.BandEdge['1240'] = (1240000000, 1300000000) rpt_file = os.path.normpath(os.path.join(os.getcwd(), '..')) rpt_file = os.path.join(rpt_file, 'MetroCor.txt') fp = open(rpt_file, 'r') self.repeaters = {} for line in fp: line = line.strip() if line and line[0] != '#': line = line.split('\t') fout = int(float(line[0]) * 1000000 + 0.1) text = "%s %s, %s" % (line[2], line[3], line[5]) if fout in self.repeaters: self.repeaters[fout] = "%s ; %s" % (self.repeaters[fout], text) else: self.repeaters[fout] = text fp.close() rpt_file = os.path.normpath(os.path.join(os.getcwd(), '..')) rpt_file = os.path.join(rpt_file, 'ARCC.csv') fp = open(rpt_file, 'r') for line in fp: line = line.strip() if line and line[0] != '#': line = line.split(',') fout = float(line[3]) if fout >= 2000.0: continue fout = int(fout * 1000000 + 0.1) text = "%s %s, %s" % (line[5], line[2], line[0]) if fout in self.repeaters: self.repeaters[fout] = "%s ; %s" % (self.repeaters[fout], text) else: self.repeaters[fout] = text fp.close() rpt_file = os.path.normpath(os.path.join(os.getcwd(), '..')) rpt_file = os.path.join(rpt_file, 'Repeaters.csv') fp = open(rpt_file, 'r') for line in fp: line = line.strip() if line and line[0] != '#': line = line.split(',') fout = float(line[3]) if fout >= 2000.0: continue fout = int(fout * 1000000 + 0.1) if line[0]: text = "%s %s, %s" % (line[5], line[2], line[0]) else: text = line[5] if fout in self.repeaters: self.repeaters[fout] = "%s ; %s" % (self.repeaters[fout], text) else: self.repeaters[fout] = text fp.close() for freq, text in self.repeaters.items(): if len(text) > 80: t ='' stations = text.split(';') for s in stations: s = s.strip() t = t + s.split()[0] + ' ' + s.split(',')[1] + '; ' self.repeaters[freq] = t self.rpt_freq_list = self.repeaters.keys() self.rpt_freq_list.sort()