def ChangeFrequency(self, tx_freq, vfo_freq, source='', band='', event=None):
   self.tx_freq = tx_freq
   try:
     rpt = self.repeaters[tx_freq]
   except KeyError:
     self.application.bottom_widgets.UpdateText('')
   else:
     self.application.bottom_widgets.UpdateText(rpt)
   if vfo_freq != self.vfo_frequency and vfo_freq >= 10000:
     self.vfo_frequency = vfo_freq
     # Calculate new AR8600 and hardware frequencies
     ar8600 = (vfo_freq + 50000) / 100000 * 100000 - 200000
     if self.ar8600_frequency != ar8600:
       self.ar8600_frequency = ar8600
       self.SendAR8600('RF%010d\r' % ar8600)
       if ar8600 < 1040000000:
         self.invert = 1
       else:
         self.invert = 0
       QS.invert_spectrum(self.invert)
     if self.invert:
       hware = self.offset - vfo_freq + self.ar8600_frequency
     else:
       hware = self.offset + vfo_freq - self.ar8600_frequency
     if self.hware_frequency != hware:
       self.hware_frequency = hware
       BaseHardware.ChangeFrequency(self, 0, hware)
     #print 'AR8600 Hware', self.ar8600_frequency, self.hware_frequency
   return tx_freq, vfo_freq
Example #2
0
 def ChangeFrequency(self,
                     tx_freq,
                     vfo_freq,
                     source='',
                     band='',
                     event=None):
     self.tx_freq = tx_freq
     try:
         rpt = self.repeaters[tx_freq]
     except KeyError:
         self.application.bottom_widgets.UpdateText('')
     else:
         self.application.bottom_widgets.UpdateText(rpt)
     if vfo_freq != self.vfo_frequency and vfo_freq >= 10000:
         self.vfo_frequency = vfo_freq
         # Calculate new AR8600 and hardware frequencies
         ar8600 = (vfo_freq + 50000) // 100000 * 100000 - 200000
         if self.ar8600_frequency != ar8600:
             self.ar8600_frequency = ar8600
             self.SendAR8600('RF%010d\r' % ar8600)
             if ar8600 < 1040000000:
                 self.invert = 1
             else:
                 self.invert = 0
             QS.invert_spectrum(self.invert)
         if self.invert:
             hware = self.offset - vfo_freq + self.ar8600_frequency
         else:
             hware = self.offset + vfo_freq - self.ar8600_frequency
         if self.hware_frequency != hware:
             self.hware_frequency = hware
             BaseHardware.ChangeFrequency(self, 0, hware)
         #print 'AR8600 Hware', self.ar8600_frequency, self.hware_frequency
     return tx_freq, vfo_freq
Example #3
0
 def open(self):
   self.serial = serial.Serial(port=self.tty_name, baudrate=9600,
         stopbits=serial.STOPBITS_TWO, xonxoff=1, timeout=0)
   self.SendAR8600('MD0\r')		# set WFM mode so the IF output is available
   # The AR8600 inverts the spectrum of the 2 meter and 70 cm bands.
   # Other bands may not be inverted, so we may need to test the frequency.
   # But this is not currently implemented.
   QS.invert_spectrum(1)
   t = BaseHardware.open(self)		# save the message
   BaseHardware.ChangeFrequency(10700000, 10700000)
   return t
 def open(self):
   self.serial = serial.Serial(port=self.tty_name, baudrate=9600,
         stopbits=serial.STOPBITS_TWO, xonxoff=1, timeout=0)
   self.SendAR8600('MD0\r')		# set WFM mode so the IF output is available
   # The AR8600 inverts the spectrum of the 2 meter and 70 cm bands.
   # Other bands may not be inverted, so we may need to test the frequency.
   # But this is not currently implemented.
   QS.invert_spectrum(1)
   t = BaseHardware.open(self)		# save the message
   sdriq.freq_sdriq(10700000)
   return t
Example #5
0
    def open(self, application):
        # find our device
        text = "XXX"
        usb_dev = usb.core.find(idVendor=self.conf.usb_vendor_id,
                                idProduct=self.conf.usb_product_id)
        if usb_dev is None:
            text = 'USB SSmicro not found VendorID 0x%X ProductID 0x%X' % (
                self.conf.usb_vendor_id, self.conf.usb_product_id)
            print(text)
            return text

        if DEBUG and usb_dev:
            if (self.HrdwrTalk):
                print('DeBug: Found SSmicro 0x%X; ProductID 0x%X' %
                      (self.conf.usb_vendor_id, self.conf.usb_product_id))
        if usb_dev:
            self.serial = serial.Serial(port=self.tty_name,
                                        baudrate=9600,
                                        stopbits=serial.STOPBITS_TWO,
                                        xonxoff=1,
                                        timeout=0)
            #self.SendSSmicro('MD0\r')		# set WFM mode so the IF output is available
            self.usb_dev = usb_dev  # success
            ver = 'unknown'
            sound = self.conf.name_of_sound_capt
            if len(sound) > 50:
                sound = sound[0:30] + '|||' + sound[-17:]
            text = 'Capture from SSmicro USB on %s, Firmware %s' % (sound, ver)
            if DEBUG: print("DeBug: %s" % text)
            ##if self.conf.name_of_mic_play and self.conf.key_poll_msec:
            if self.conf.key_poll_msec:
                #self.key_thread = KeyThread(usb_dev, self.conf.key_poll_msec / 1000.0, self.conf.key_hang_time)
                self.key_thread = KeyThread(self.serial,
                                            self.conf.key_poll_msec / 1000.0,
                                            self.conf.key_hang_time,
                                            self.HrdwrTalk)
                self.key_thread.start()
                if DEBUG: print("DeBug: Key_thread Started")

            QS.invert_spectrum(1)
            text = BaseHardware.open(self)  # save the message
            sdriq.freq_sdriq(10700000)
        return text
Example #6
0
 def open(self):
     self.OpenPort()
     QS.invert_spectrum(self.invert)
     t = BaseHardware.open(self)  # save the message
     return t
 def open(self):
   self.OpenPort()
   QS.invert_spectrum(self.invert)
   t = BaseHardware.open(self)		# save the message
   return t