def stopRecording(self):
if self.recordingTime is not None:
secsToSave = time.time() - self.recordingTime
wx.LogMessage('Page %s saving %f secs of EEG' % (self.name, secsToSave))
cap = self.src.getEEGSecs(secsToSave, filter=False)
saveDialog = wx.FileDialog(self, message='Save EEG data.',
wildcard='Pickle (*.pkl)|*.pkl|All Files|*',
style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
try:
if saveDialog.ShowModal() != wx.ID_CANCEL:
cap.saveFile(saveDialog.GetPath())
except Exception as e:
wx.LogError('Save failed!')
raise
finally:
saveDialog.Destroy()
self.recordButton.SetLabel('Start Recording')
self.recordingTime = None
评论列表
文章目录