|
|
|
|
|
|
|
|
|
|
|
|
|
|
# KALIBRIERUNGEN ########################### |
|
|
# KALIBRIERUNGEN ########################### |
|
|
def btn_tacCal(self): |
|
|
def btn_tacCal(self): |
|
|
if config['SETTINGS']['tactilemode'] == 'Motors': |
|
|
|
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCalibration.prm']) |
|
|
|
|
|
elif config['SETTINGS']['tactilemode'] == 'Nested': |
|
|
|
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCalibrationNested.prm']) |
|
|
|
|
|
|
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCalibration.prm']) |
|
|
# TODO Throw error if else |
|
|
# TODO Throw error if else |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\gUSBampSource.exe', '127.0.0.1']) |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\gUSBampSource.exe', '127.0.0.1']) |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\P3SignalProcessing.exe', '127.0.0.1']) |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\P3SignalProcessing.exe', '127.0.0.1']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# FREESPELL ############################### |
|
|
# FREESPELL ############################### |
|
|
def btn_tacFree(self): |
|
|
def btn_tacFree(self): |
|
|
if config['SETTINGS']['tactilemode'] == 'Motors': |
|
|
|
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileFree.prm']) |
|
|
|
|
|
elif config['SETTINGS']['tactilemode'] == 'Nested': |
|
|
|
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileFreeNested.prm']) |
|
|
|
|
|
|
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileFree.prm']) |
|
|
# TODO throw error if else |
|
|
# TODO throw error if else |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\gUSBampSource.exe', '127.0.0.1']) |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\gUSBampSource.exe', '127.0.0.1']) |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\P3SignalProcessing.exe', '127.0.0.1']) |
|
|
subprocess.Popen([config['PATH']['bci2000'] + r'\prog\P3SignalProcessing.exe', '127.0.0.1']) |
|
|
|
|
|
|
|
|
app.unpack_layout() |
|
|
app.unpack_layout() |
|
|
app.pack_layout() |
|
|
app.pack_layout() |
|
|
|
|
|
|
|
|
def setTactileModeMotors(): |
|
|
|
|
|
if config['SETTINGS']['tactilemode'] == 'Motors': |
|
|
|
|
|
return |
|
|
|
|
|
else: |
|
|
|
|
|
config['SETTINGS']['tactilemode'] = 'Motors' |
|
|
|
|
|
config.write(open(configPath,'w')) |
|
|
|
|
|
|
|
|
|
|
|
def setTactileModeNested(): |
|
|
|
|
|
if config['SETTINGS']['tactilemode'] == 'Nested': |
|
|
|
|
|
return |
|
|
|
|
|
else: |
|
|
|
|
|
config['SETTINGS']['tactilemode'] = 'Nested' |
|
|
|
|
|
config.write(open(configPath,'w')) |
|
|
|
|
|
|
|
|
|
|
|
# This Function sets the BCI2000 Path |
|
|
# This Function sets the BCI2000 Path |
|
|
def setPathBci2000(): |
|
|
def setPathBci2000(): |
|
|
tkinter.messagebox.showinfo('Konfiguration', 'Bitte wählen Sie nun den BCI2000 Ordner aus, in dem sich die Ordner "batch", "data", "parms", "prog" und "tools" befinden.') |
|
|
tkinter.messagebox.showinfo('Konfiguration', 'Bitte wählen Sie nun den BCI2000 Ordner aus, in dem sich die Ordner "batch", "data", "parms", "prog" und "tools" befinden.') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This Function resets the config |
|
|
# This Function resets the config |
|
|
def setConfigDefault(): |
|
|
def setConfigDefault(): |
|
|
# config['PATH']['tactilebcifilter'] = r'C:/Users/bci/Desktop/Qt Filter Program/build-TactileBCIFilter-Desktop_Qt_5_15_0_MinGW_32_bit-Release/release' |
|
|
|
|
|
# config['PATH']['bci2000'] = r'C:/BCI2000/BCI2000 v3.6.beta.R5570/BCI2000.x64' |
|
|
|
|
|
config['PATH']['tactilebcifilter'] = r'C:\Users\EEG-Gruppe\Desktop\Arduino\Qt Tactile BCI Filter App\Executable' |
|
|
|
|
|
config['PATH']['bci2000'] = r'C:\Users\EEG-Gruppe\Desktop\BCI Paket\Paradigmen\Tactile\BCI2000\BCI2000-06-13\BCI2000src' |
|
|
|
|
|
|
|
|
config['PATH']['tactilebcifilter'] = r'C:/Users/bci/Desktop/tactilebcifilter/release' |
|
|
|
|
|
config['PATH']['bci2000'] = r'C:/BCI2000/BCI2000 v3.6.beta.R5570/BCI2000.x64' |
|
|
|
|
|
# config['PATH']['tactilebcifilter'] = r'C:\Users\EEG-Gruppe\Desktop\Arduino\Qt Tactile BCI Filter App\Executable' |
|
|
|
|
|
# config['PATH']['bci2000'] = r'C:\Users\EEG-Gruppe\Desktop\BCI Paket\Paradigmen\Tactile\BCI2000\BCI2000-06-13\BCI2000src' |
|
|
config['SETTINGS']['paradigm'] = r'Visual' |
|
|
config['SETTINGS']['paradigm'] = r'Visual' |
|
|
config['SETTINGS']['hardware'] = r'gUSBamp' # TODO Add gNautilus parameters |
|
|
config['SETTINGS']['hardware'] = r'gUSBamp' # TODO Add gNautilus parameters |
|
|
config['SETTINGS']['tactilemode'] = r'Motors' |
|
|
|
|
|
config.write(open(configPath,'w')) |
|
|
config.write(open(configPath,'w')) |
|
|
app.Lparadigm.config(text = config['SETTINGS']['paradigm'] + ' BCI') |
|
|
app.Lparadigm.config(text = config['SETTINGS']['paradigm'] + ' BCI') |
|
|
app.unpack_layout() |
|
|
app.unpack_layout() |
|
|
|
|
|
|
|
|
pathMenu.add_separator() |
|
|
pathMenu.add_separator() |
|
|
pathMenu.add_command(label="TactileBCIFilter", command=setPathTactileBCIFilter) |
|
|
pathMenu.add_command(label="TactileBCIFilter", command=setPathTactileBCIFilter) |
|
|
|
|
|
|
|
|
tactileModeMenu = tkinter.Menu(leistenMenu) |
|
|
|
|
|
leistenMenu.add_cascade(label="Taktiler Modus", menu=tactileModeMenu) |
|
|
|
|
|
tactileModeMenu.add_command(label="Motoren", command=setTactileModeMotors) |
|
|
|
|
|
tactileModeMenu.add_command(label="Kategorien", command=setTactileModeNested) |
|
|
|
|
|
|
|
|
|
|
|
root.config(menu = leistenMenu) |
|
|
root.config(menu = leistenMenu) |
|
|
|
|
|
|
|
|
app = PythonBCIgui(root) |
|
|
app = PythonBCIgui(root) |