예제 #1
0
    def OnButtonRecordButton(self, event):
        if self.grblk != None:
            self.mainStatusBar.SetStatusText(
                'Playing in progress. Please stop first!')
            return

        dlg = wx.FileDialog(self, 'Choose a file', '.', '', '*.aac',
                            wx.SAVE | wx.OVERWRITE_PROMPT)
        try:
            if dlg.ShowModal() == wx.ID_OK:
                self.recordFile = dlg.GetPath()

        finally:
            dlg.Destroy()

        if os.path.isfile(self.confFile):
            idx = self.progListView.GetFirstSelected()
            subchid = int(self.progListView.GetItemText(idx))
            self.grblk = dabp_msc.dabp_msc(self.dabMode, self.dabFreq * 1e6,
                                           self.dabGain, self.confFile,
                                           subchid, self.recordFile,
                                           self.rbUsrp.GetValue())
            self.mainStatusBar.SetStatusText('Recording the program to ' +
                                             self.recordFile + ' ...')
            self.grblk.start()

        else:
            self.mainStatusBar.SetStatusText(
                'Configuration File does not exist!')
예제 #2
0
파일: MainFrame.py 프로젝트: croisez/sdr
 def OnButtonPlayButton(self, event):
     if os.path.isfile(self.confFile):
         idx = self.progListView.GetFirstSelected()
         subchid = int(self.progListView.GetItemText(idx))
         self.grblk = dabp_msc.dabp_msc(self.dabMode, self.dabFreq*1e6, self.dabGain, self.confFile, subchid, None, self.rbUsrp.GetValue())
         self.mainStatusBar.SetStatusText('Playing...')
         self.grblk.start()
         
     else:
         self.mainStatusBar.SetStatusText('Configuration File does not exist!')
예제 #3
0
    def OnButtonPlayButton(self, event):
        if os.path.isfile(self.confFile):
            idx = self.progListView.GetFirstSelected()
            subchid = int(self.progListView.GetItemText(idx))
            self.grblk = dabp_msc.dabp_msc(self.dabMode, self.dabFreq * 1e6,
                                           self.dabGain,
                                           self.confFile, subchid, None,
                                           self.rbUsrp.GetValue())
            self.mainStatusBar.SetStatusText('Playing...')
            self.grblk.start()

        else:
            self.mainStatusBar.SetStatusText(
                'Configuration File does not exist!')
예제 #4
0
파일: MainFrame.py 프로젝트: croisez/sdr
 def OnButtonRecordButton(self, event):
     if self.grblk != None:
         self.mainStatusBar.SetStatusText('Playing in progress. Please stop first!')
         return
     
     dlg = wx.FileDialog(self, 'Choose a file', '.', '', '*.aac', wx.SAVE|wx.OVERWRITE_PROMPT)
     try:
         if dlg.ShowModal() == wx.ID_OK:
             self.recordFile = dlg.GetPath()
             
     finally:
         dlg.Destroy()
     
     if os.path.isfile(self.confFile):
         idx = self.progListView.GetFirstSelected()
         subchid = int(self.progListView.GetItemText(idx))
         self.grblk = dabp_msc.dabp_msc(self.dabMode, self.dabFreq*1e6, self.dabGain, self.confFile, subchid, self.recordFile, self.rbUsrp.GetValue())
         self.mainStatusBar.SetStatusText('Recording the program to '+self.recordFile+' ...')
         self.grblk.start()
         
     else:
         self.mainStatusBar.SetStatusText('Configuration File does not exist!')