예제 #1
0
def main(argv):
    # if no arguments are provided, default to the stream parameters specified below
    if not argv:
        lsl = streamerlsl.StreamerLSL(GUI=False)
        '''
    # PyQt4 Gui ne dela, ker je pač PyQt4!
    import lib.gui as gui
    from PyQt4 import QtGui
    app = QtGui.QApplication(sys.argv)
    window = gui.GUI()
    sys.exit(app.exec_())
    '''
    # if user specifies CLI using the "--stream" argument, check if a port is also specified
    else:  # izklopljen GUI
        if argv[0] == '--stream':  # ni definiran port /dev/tty.*
            lsl = streamerlsl.StreamerLSL(GUI=False)
        else:  # definiran port /dev/tty.*
            try:
                if argv[1] != '--stream':
                    print("Command '%s' not recognized" % argv[1])
                    return
            except IndexError:
                print("Command '%s' not recognized" % argv[0])
                return
            port = argv[0]
            lsl = streamerlsl.StreamerLSL(port=port, GUI=False)
    lsl.create_lsl(stream1=stream1, stream2=stream2)
    lsl.begin()
예제 #2
0
def main(argv):

    # if no arguments are provided, default to the GUI application
    if not argv:
        import lib.gui as gui
        from PyQt4 import QtGui
        app = QtGui.QApplication(sys.argv)
        window = gui.GUI()
        sys.exit(app.exec_())

    # if user specifies CLI using the "--stream" argument, check if a port is also specified
    else:
        if argv[0] == '--stream':
            lsl = streamerlsl.StreamerLSL(GUI=False)
        else:
            try:
                if argv[1] != '--stream':
                    print("Command '%s' not recognized" % argv[1])
                    return
            except IndexError:
                print("Command '%s' not recognized" % argv[0])
                return
            port = argv[0]
            lsl = streamerlsl.StreamerLSL(port=port, GUI=False)

        lsl.create_lsl()
        #print("begin")
        lsl.begin()
예제 #3
0
 def run(self):
     port = self.config.get('openbci', 'port')
     if port == "None":
         port = self.options['--portnumber']
         if port == None:
             print "Please either set a portnumber in the options or the config file"
             return
     lsl = streamerlsl.StreamerLSL(port=port, GUI=False)
     lsl.create_lsl()
     lsl.begin()
예제 #4
0
def main(argv):
    # if no arguments are provided, default to streaming real data
    if not argv:
        lsl = streamerlsl.StreamerLSL()
        lsl.create_lsl()
        lsl.begin(autostart=True)
    else:
        if argv[0] == '--dummy':
            lsl = DummyLSL()
        elif argv[0] == '--port':
            port = argv[1]
            lsl = streamerlsl.StreamerLSL(port=port)
        elif argv[0] == '--channels':
            ch_names = []
            for ch in argv[1:]:
                ch_names.append(ch)
            lsl = streamerlsl.StreamerLSL(ch_names=ch_names)
        else:
            lsl = streamerlsl.StreamerLSL()

        lsl.create_lsl()
        lsl.begin(autostart=True)
예제 #5
0
 def __init__(self):
     super(GUI, self).__init__()
     self.gui_setup()
     self.lsl = streamerlsl.StreamerLSL(GUI=True)
     signal.signal(signal.SIGINT, signal.SIG_DFL)
예제 #6
0
 def _create_lsl(self):
     self.lsl = streamerlsl.StreamerLSL(GUI=False)
     self.lsl.create_lsl()