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!')
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!')
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!')
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!')