little Changes
This commit is contained in:
parent
b018c0ccf2
commit
d57c712016
@ -181,7 +181,7 @@ class MainWindow2( MainWindow):
|
|||||||
self.ui.checkBox_3.setEnabled(True)
|
self.ui.checkBox_3.setEnabled(True)
|
||||||
self.ui.checkBox_3.setCheckState(False)
|
self.ui.checkBox_3.setCheckState(False)
|
||||||
self.ui.pushButton_3.setEnabled(True)
|
self.ui.pushButton_3.setEnabled(True)
|
||||||
self.ui.pushButton_4.setEnabled(True)
|
self.ui.pushButton_4.setEnabled(False)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.statusBar().showMessage("Successfully connected to Rheo board.")
|
self.statusBar().showMessage("Successfully connected to Rheo board.")
|
||||||
self.getFromRheo()
|
self.getFromRheo()
|
||||||
@ -217,7 +217,6 @@ class MainWindow2( MainWindow):
|
|||||||
s = self.ui.label_26.text()[5:-2]
|
s = self.ui.label_26.text()[5:-2]
|
||||||
x1 = int(s)
|
x1 = int(s)
|
||||||
left = x1 - xx
|
left = x1 - xx
|
||||||
|
|
||||||
if ( left < 10):
|
if ( left < 10):
|
||||||
self.statusBar().showMessage(f"Inject {xx} left {left} is to small !!")
|
self.statusBar().showMessage(f"Inject {xx} left {left} is to small !!")
|
||||||
return
|
return
|
||||||
@ -256,6 +255,7 @@ class MainWindow2( MainWindow):
|
|||||||
self.ui.pushButton_4.setEnabled(True)
|
self.ui.pushButton_4.setEnabled(True)
|
||||||
|
|
||||||
def sendRheo(self, sendStr):
|
def sendRheo(self, sendStr):
|
||||||
|
#time.sleep(1) ## functioniert leider nicht
|
||||||
self.rheo_serial.flushInput()
|
self.rheo_serial.flushInput()
|
||||||
self.rheo_serial.write(sendStr.encode('utf-8'))
|
self.rheo_serial.write(sendStr.encode('utf-8'))
|
||||||
|
|
||||||
@ -267,12 +267,12 @@ class MainWindow2( MainWindow):
|
|||||||
self.threadpool.start(thread)
|
self.threadpool.start(thread)
|
||||||
|
|
||||||
def getRheoVolume(self,cmd):
|
def getRheoVolume(self,cmd):
|
||||||
time.sleep(1)
|
time.sleep(0.1)
|
||||||
self.rheo_serial.flushOutput()
|
self.rheo_serial.flushOutput()
|
||||||
self.rheo_serial.flushInput()
|
self.rheo_serial.flushInput()
|
||||||
cmd = str(5)+'\r\n'
|
cmd = str(5)+'\r\n'
|
||||||
self.rheo_serial.write(cmd.encode('utf-8'))
|
self.rheo_serial.write(cmd.encode('utf-8'))
|
||||||
time.sleep(1)
|
time.sleep(0.1)
|
||||||
cnt=0
|
cnt=0
|
||||||
while True:
|
while True:
|
||||||
cnt+=1
|
cnt+=1
|
||||||
@ -286,11 +286,7 @@ class MainWindow2( MainWindow):
|
|||||||
pass
|
pass
|
||||||
if cnt > 100: #warten bis der Motor steht und der Arduino antwortet
|
if cnt > 100: #warten bis der Motor steht und der Arduino antwortet
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def checkForStopFlow(self):
|
def checkForStopFlow(self):
|
||||||
if self.checkForStopFlow :
|
if self.checkForStopFlow :
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user