def timerFunc(self):
if self.imageIndex < len(self.filenames):
if self.showFixation == False:
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale('./P300Photos/' + self.filenames[self.imageIndex], width=700, height=700, preserve_aspect_ratio=False)
self.image.set_from_pixbuf(pixbuf)
self.imageIndex += 1
gobject.timeout_add(self.testImageDuration, self.timerFunc)
self.timestamps.append(self.dataThread.samplesRead)
else:
self.image.set_from_pixbuf(self.fixation)
gobject.timeout_add(self.fixationDuration, self.timerFunc)
self.showFixation = ~self.showFixation
else:
self.image.set_from_pixbuf(self.fixation)
#gather an extra ~2 seconds of data at the end for window completion reasons
sleep(2)
self.dataThread.stop()
return False
评论列表
文章目录