Browse Source

Remove TactileMode

master
Igor Beloschapkin 4 years ago
parent
commit
aef99eb1f7
2 changed files with 9 additions and 35 deletions
  1. 6
    32
      app.py
  2. 3
    3
      config.ini

+ 6
- 32
app.py View File

@@ -58,10 +58,7 @@ class PythonBCIgui:

# KALIBRIERUNGEN ###########################
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
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'])
@@ -79,10 +76,7 @@ class PythonBCIgui:

# FREESPELL ###############################
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
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'])
@@ -144,20 +138,6 @@ def setTactile():
app.unpack_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
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.')
@@ -180,13 +160,12 @@ def setPathTactileBCIFilter():

# This Function resets the config
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']['hardware'] = r'gUSBamp' # TODO Add gNautilus parameters
config['SETTINGS']['tactilemode'] = r'Motors'
config.write(open(configPath,'w'))
app.Lparadigm.config(text = config['SETTINGS']['paradigm'] + ' BCI')
app.unpack_layout()
@@ -221,11 +200,6 @@ pathMenu.add_command(label="BCI2000", command=setPathBci2000)
pathMenu.add_separator()
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)

app = PythonBCIgui(root)

+ 3
- 3
config.ini View File

@@ -1,9 +1,9 @@
[SETTINGS]
paradigm = Visual
paradigm = Tactile
hardware = gUSBamp
tactilemode = Motors

[PATH]
bci2000 = C:\Users\EEG-Gruppe\Desktop\BCI Paket\Paradigmen\Tactile\BCI2000\BCI2000-06-13\BCI2000src
tactilebcifilter = C:\Users\EEG-Gruppe\Desktop\Arduino\Qt Tactile BCI Filter App\Executable
bci2000 = C:/BCI2000/BCI2000 v3.6.beta.R5570/BCI2000.x64
tactilebcifilter = C:/Users/bci/Desktop/tactilebcifilter32bit


Loading…
Cancel
Save