diff --git a/datalogger-gui.py b/datalogger-gui.py index 7dbdcfb..1ab903d 100644 --- a/datalogger-gui.py +++ b/datalogger-gui.py @@ -104,7 +104,7 @@ class mainGui(): self.startButton = QtGui.QPushButton() self.startButton.setText('Start log') self.layout.addWidget(self.startButton, 99, 1) - self.startButton.setEnabled(True) + self.startButton.setEnabled(False) self.stopButton = QtGui.QPushButton() self.stopButton.setText('Stop log') @@ -183,6 +183,14 @@ class mainGui(): else: self.chListVtypes[i].setEnabled(False) + allChannelsUnchecked = False + for i in self.checkBoxChannels: + allChannelsUnchecked = allChannelsUnchecked or i.isChecked() + if allChannelsUnchecked == False: + self.startButton.setEnabled(False) + else: + self.startButton.setEnabled(True) + self.textDisplay.setText('>> %s@%s - %s - %s'%(self.instToLog, self.adressToLog, self.chToLog, self.vTypeToLog)) self.myLog = acq_routine(self.instToLog, self.chToLog, self.vTypeToLog, self.adressToLog)