P300Client.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:esys-pbi 作者: fsxfreak 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号