Commit ac9284f1 authored by Ed Rogers's avatar Ed Rogers
Browse files

Fix font of label and color of background

parent d1563291
......@@ -141,7 +141,9 @@ class TestWindow(QMainWindow):
grid_layout = QGridLayout(self)
central_widget.setLayout(grid_layout)
self.title = QLabel("Press any key to start...", self)
self.setStyleSheet("QMainWindow { background-color: black }")
self.title = QLabel("Press space bar to start...", self)
self.title.setStyleSheet("QLabel { background-color: black; color: white; font: 24pt}")
self.title.setAlignment(QtCore.Qt.AlignCenter)
self.log = QTextEdit()
......@@ -165,6 +167,7 @@ class TestWindow(QMainWindow):
if event.key() == Qt.Qt.Key_F:
HearingTest.max_response_time = 0.01
return
# TODO add slow mode
if not self.test_running:
if event.key() == Qt.Qt.Key_Escape:
self.close()
......@@ -208,14 +211,12 @@ class TestWindow(QMainWindow):
thresholds = thresholds.reshape(thresholds.shape[0], -1) # convert to 2d
with open('data.csv', 'ba') as file:
np.savetxt(file, thresholds.T, fmt='%.2f', delimiter=',')
# TODO store test
# TODO calculate score
# TODO display test
# TODO display score
self.test = None
def main():
print(sd.default.device['output'])
device = sd.query_devices(sd.default.device['output'])
fs = device['default_samplerate']
length = 0.5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment