diff --git a/jfs_main01.py b/jfs_main01.py index 00a493a..4725da6 100644 --- a/jfs_main01.py +++ b/jfs_main01.py @@ -181,7 +181,7 @@ class MainWindow2( MainWindow): self.ui.checkBox_3.setEnabled(True) self.ui.checkBox_3.setCheckState(False) self.ui.pushButton_3.setEnabled(True) - self.ui.pushButton_4.setEnabled(True) + self.ui.pushButton_4.setEnabled(False) time.sleep(1) self.statusBar().showMessage("Successfully connected to Rheo board.") self.getFromRheo() @@ -217,7 +217,6 @@ class MainWindow2( MainWindow): s = self.ui.label_26.text()[5:-2] x1 = int(s) left = x1 - xx - if ( left < 10): self.statusBar().showMessage(f"Inject {xx} left {left} is to small !!") return @@ -256,6 +255,7 @@ class MainWindow2( MainWindow): self.ui.pushButton_4.setEnabled(True) def sendRheo(self, sendStr): + #time.sleep(1) ## functioniert leider nicht self.rheo_serial.flushInput() self.rheo_serial.write(sendStr.encode('utf-8')) @@ -267,12 +267,12 @@ class MainWindow2( MainWindow): self.threadpool.start(thread) def getRheoVolume(self,cmd): - time.sleep(1) + time.sleep(0.1) self.rheo_serial.flushOutput() self.rheo_serial.flushInput() cmd = str(5)+'\r\n' self.rheo_serial.write(cmd.encode('utf-8')) - time.sleep(1) + time.sleep(0.1) cnt=0 while True: cnt+=1 @@ -286,11 +286,7 @@ class MainWindow2( MainWindow): pass if cnt > 100: #warten bis der Motor steht und der Arduino antwortet return 0 - - - - - + def checkForStopFlow(self): if self.checkForStopFlow :