Ejemplo n.º 1
0
 def __init__(self, app, conf):
     BaseHw.__init__(self, app, conf)
     self.GUI = None
     self.vfo_frequency = 0  # current vfo frequency
     self.v2filter = None
     # Other hardware
     self.anttuner = station_hardware.AntennaTuner(
         app, conf)  # Control the antenna tuner
     self.controlbox = station_hardware.ControlBox(
         app, conf)  # Control my Station Control Box
Ejemplo n.º 2
0
 def ChangeBand(self, band):
     # band is a string: "60", "40", "WWV", etc.
     ret = BaseHw.ChangeBand(self, band)
     self.anttuner.ChangeBand(band)
     #self.lpfilter.ChangeBand(band)
     #self.hpfilter.ChangeBand(band)
     self.CorrectSmeter()
     return ret
Ejemplo n.º 3
0
 def open(self):
     if False:
         from n2adr.station_hardware import StationControlGUI
         self.GUI = StationControlGUI(self.application.main_frame, self,
                                      self.application, self.conf)
         self.GUI.Show()
     self.anttuner.open()
     return BaseHw.open(self)
Ejemplo n.º 4
0
 def ChangeBand(self, band):
   # band is a string: "60", "40", "WWV", etc.
   # The call to BaseHardware will set C2 according to the Hermes_BandDict{}
   ret = BaseHardware.ChangeBand(self, band)
   if self.usingSpot:
     byte = self.GetControlByte(0, 2)		# C0 index == 0, C2: user output
     byte |= 0b10000000
     self.SetControlByte(0, 2, byte)
   return ret
Ejemplo n.º 5
0
 def ChangeFrequency(self,
                     tx_freq,
                     vfo_freq,
                     source='',
                     band='',
                     event=None):
     self.ChangeFilterFrequency(tx_freq)
     return BaseHw.ChangeFrequency(self, tx_freq, vfo_freq, source, band,
                                   event)
Ejemplo n.º 6
0
 def OnSpot(self, level):
   # level is -1 for Spot button Off; else the Spot level 0 to 1000.
   ret = BaseHardware.OnSpot(self, level)
   if level >= 0 and not self.usingSpot:		# Spot was turned on
     byte = self.GetControlByte(0, 2)
     byte |= 0b10000000
     self.SetControlByte(0, 2, byte)
     self.usingSpot = True
   elif level < 0 and self.usingSpot:			# Spot was turned off
     byte = self.GetControlByte(0, 2)
     byte &= 0b01111111
     self.SetControlByte(0, 2, byte)
     self.usingSpot = False
   return ret
Ejemplo n.º 7
0
 def __init__(self, app, conf):
   BaseHardware.__init__(self, app, conf)
   self.usingSpot = False		# Use bit C2[7] as the Spot indicator
Ejemplo n.º 8
0
 def OnButtonPTT(self, event):
     self.controlbox.OnButtonPTT(event)
     return BaseHw.OnButtonPTT(self, event)
Ejemplo n.º 9
0
 def OnSpot(self, level):
     # level is -1 for Spot button Off; else the Spot level 0 to 1000.
     self.anttuner.OnSpot(level)
     return BaseHw.OnSpot(self, level)
Ejemplo n.º 10
0
 def HeartBeat(self):  # Called at about 10 Hz by the main
     self.anttuner.HeartBeat()
     self.controlbox.HeartBeat()
     return BaseHw.HeartBeat(self)
Ejemplo n.º 11
0
 def close(self):
     self.anttuner.close()
     self.controlbox.close()
     return BaseHw.close(self)