Browse Source

WIP Add questionnaire

master
bci 4 years ago
parent
commit
0499dfc3b8
3 changed files with 30 additions and 16 deletions
  1. 3
    0
      .gitignore
  2. BIN
      __pycache__/questionnaire.cpython-38.pyc
  3. 27
    16
      app.py

+ 3
- 0
.gitignore View File

__pycache__\
questions
questionnaire.py

BIN
__pycache__/questionnaire.cpython-38.pyc View File


+ 27
- 16
app.py View File



from tkinter import * from tkinter import *
import tkinter.font as tkFont import tkinter.font as tkFont
import os
import subprocess import subprocess


# own code: # own code:
# from questionnaire import quest # from questionnaire import quest


# TODO Eventuell updatefunktion über git pull mit einbauen!

################################################## ##################################################
# Config Beginn # Config Beginn
# Folgende Strings bitte an jeweiligen PC anpassen # Folgende Strings bitte an jeweiligen PC anpassen
pathP300Classifier = r'C:\Users\bci\Desktop\Igor\PythonBCIgui_v0.2\bin' pathP300Classifier = r'C:\Users\bci\Desktop\Igor\PythonBCIgui_v0.2\bin'


# TODO Config in txt file verlagern oder sogar Config Einstellung!!! # TODO Config in txt file verlagern oder sogar Config Einstellung!!!
# tk_chooseDirectory
# tk_getOpenFile
# Config Ende # Config Ende
################################################## ##################################################


self.BtacCal = makeBtnSmall(self, "2. Kalibrierung", "lightgreen", self.btn_tacCal, TOP) self.BtacCal = makeBtnSmall(self, "2. Kalibrierung", "lightgreen", self.btn_tacCal, TOP)
self.Bp300 = makeBtnSmall(self, "3. P300 Klassifizierung", "orange", self.btn_p300, TOP) self.Bp300 = makeBtnSmall(self, "3. P300 Klassifizierung", "orange", self.btn_p300, TOP)
self.BtacCopy = makeBtnSmall(self, "4. Freies Buchstabieren", "lightblue", self.btn_tacCopy, TOP) self.BtacCopy = makeBtnSmall(self, "4. Freies Buchstabieren", "lightblue", self.btn_tacCopy, TOP)
# self.BtacQuest = makeBtnSmall(self, "5. Fragebogen", "pink", self.btn_tacQuest, TOP)
self.BtacSimul = makeBtnSmall(self, "5. Rollstuhlsimulator", "pink", self.btn_tacSimul, TOP)
# self.BtacQuest = makeBtnSmall(self, "6. Fragebogen", "green", self.btn_tacQuest, TOP)
self.BtacSettings = makeBtnSmall(self, "Einstellungen", "gray", self.btn_settings, TOP) self.BtacSettings = makeBtnSmall(self, "Einstellungen", "gray", self.btn_settings, TOP)


frame.rowconfigure((0,1), weight=1) # make buttons stretch when frame.rowconfigure((0,1), weight=1) # make buttons stretch when
print('Starte P300Classifier.exe') print('Starte P300Classifier.exe')
subprocess.Popen(pathP300Classifier + '\P300Classifier.exe') subprocess.Popen(pathP300Classifier + '\P300Classifier.exe')


# 3. COPYSPELL ###########################
# 4. COPYSPELL ###########################
def btn_tacCopy(self): def btn_tacCopy(self):
print('Starte taktilen Copyspeller') print('Starte taktilen Copyspeller')
# os.system('bin\WT-tacCopy.bat')
subprocess.Popen([pathBci2000 + '\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCopy.prm']) subprocess.Popen([pathBci2000 + '\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCopy.prm'])
subprocess.Popen([pathBci2000 + '\prog\gUSBampSource.exe', '127.0.0.1']) subprocess.Popen([pathBci2000 + '\prog\gUSBampSource.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3SignalProcessing.exe', '127.0.0.1']) subprocess.Popen([pathBci2000 + '\prog\P3SignalProcessing.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3Speller.exe', '127.0.0.1']) subprocess.Popen([pathBci2000 + '\prog\P3Speller.exe', '127.0.0.1'])
# 5. WHEELCHAIR SIMULATOR ###########################
def btn_tacSimul(self):
print('Starte Wheelchair Simulator')
# TODO Starte Wheelchair Simulator Programm
subprocess.Popen([pathBci2000 + '\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileDrive.prm'])
subprocess.Popen([pathBci2000 + '\prog\gUSBampSource.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3SignalProcessing.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3Speller.exe', '127.0.0.1'])


# QUESTIONNAIRE PROMPT ########################### # QUESTIONNAIRE PROMPT ###########################
# def btn_visQuest(self): # def btn_visQuest(self):
# root.destroy() # root.destroy()
# self.startQuestions("Visual") # self.startQuestions("Visual")
# def btn_tacQuest(self): # def btn_tacQuest(self):
# root.destroy()
# self.startQuestions("Tactile")
#root.destroy()
# self.startQuestions("Tactile")
# def btn_audQuest(self): # def btn_audQuest(self):
# root.destroy() # root.destroy()
# self.startQuestions("Auditory") # self.startQuestions("Auditory")


# def startQuestions(self, para): # def startQuestions(self, para):
# print('starte Fragebogen')
# # TODO
# # q = quest(para)
# # q.qSatisfaction()
# # q.qExhaustion()
# # q.qSubjControl()
# # q.qCtrlChange()
# # q.save()
# 3. P300 Classifier #########################
# print('Starte Fragebogen')
# q = quest(para)
# q.qSatisfaction()
# q.qExhaustion()
# q.qSubjControl()
# q.qCtrlChange()
# q.save()

# X. Settings #########################
def btn_settings(self): def btn_settings(self):
print('Einstellungen') print('Einstellungen')



Loading…
Cancel
Save