Commit 3d916a85 authored by Martin Drechsler's avatar Martin Drechsler

added the spinbox for choosing the blinking period

parent ff6e770d
......@@ -182,6 +182,7 @@ class GuiMainWindow(QMainWindow):
self.layout866.addWidget(QtGui.QLabel(self.shutter866.name), 3, 0), self.layout866.addWidget(self.shutter866.cb, 3, 1)
self.layout866.addWidget(QtGui.QLabel("866 WM"), 3, 2), self.layout866.addWidget(self.shutterLED.cb, 3, 3)
self.layout866.addWidget(QtGui.QLabel("Blink"), 4, 0), self.layout866.addWidget(self.shutter866.blink_cb, 4, 1)
self.layout866.addWidget(self.layout866.addWidget(self.shutter866.blink_time_sb, 4, 2))
self.layout866_scan.addWidget(QtGui.QLabel('866 Scan piezo B'), 0, 0)
self.layout866_scan.addWidget(QtGui.QLabel('start'), 1, 0), self.layout866_scan.addWidget(self.piezoB866.scan_sb_start, 1, 1)
......
......@@ -228,6 +228,9 @@ class digital_control_signal(QWidget):
self.cb.stateChanged.connect(self.whenChangeDigital)
self.blink_cb = QtGui.QCheckBox()
self.blink_time_sb = pg.SpinBox(value = 1, bounds=[0.2, 5], step = 0.2, siPrefix = True, suffix = 's')
self.blink_time_sb.setMinimumHeight(22)
self.blink_cb.stateChanged.connect(self.blink)
self.blink_timer = QTimer()
......@@ -247,7 +250,8 @@ class digital_control_signal(QWidget):
if self.blink_cb.isChecked():
self.blink_variable = self.cb.isChecked()
self.blink_timer.start(500)
blink_period = float(self.blink_time_sb.val) * 1e3
self.blink_timer.start(blink_period)
print("starting blinkin")
else:
self.blink_timer.stop()
......
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