calibrated leak image
This commit is contained in:
parent
b0c101d54c
commit
09db085651
BIN
src/ui/imgs/calibrated-leak-remove.png
Normal file
BIN
src/ui/imgs/calibrated-leak-remove.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 786 KiB |
BIN
src/ui/imgs/calibrated-leak.png
Normal file
BIN
src/ui/imgs/calibrated-leak.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 813 KiB |
@ -2,8 +2,9 @@ import sys
|
|||||||
import time
|
import time
|
||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
|
from PyQt5.QtGui import QPixmap
|
||||||
from PyQt5.QtWidgets import QMessageBox, QDialog, QApplication
|
from PyQt5.QtWidgets import QMessageBox, QDialog, QApplication
|
||||||
|
from PyQt5.QtCore import Qt
|
||||||
from ui import Dialog
|
from ui import Dialog
|
||||||
from ui.test_instructions_reminder import Test_Instructions_Reminder
|
from ui.test_instructions_reminder import Test_Instructions_Reminder
|
||||||
from ui.test_test import Test_Test
|
from ui.test_test import Test_Test
|
||||||
@ -20,7 +21,7 @@ class Test_Leak(Test_Test):
|
|||||||
self.step=step
|
self.step=step
|
||||||
self.recipe_written = False
|
self.recipe_written = False
|
||||||
self.start_b.clicked.connect(self.start_test)
|
self.start_b.clicked.connect(self.start_test)
|
||||||
self.stop_b.clicked.connect(lambda checked, self=weakref.ref(self): self().components["tecna_t3"].stop_test())
|
self.stop_b.clicked.connect(self.stop_test)
|
||||||
self.show_instruction_b.setVisible("show_instructions" in self.parent.config["hardware_config"].keys())
|
self.show_instruction_b.setVisible("show_instructions" in self.parent.config["hardware_config"].keys())
|
||||||
self.show_instruction_b.clicked.connect(self.show_instruction)
|
self.show_instruction_b.clicked.connect(self.show_instruction)
|
||||||
|
|
||||||
@ -29,6 +30,13 @@ class Test_Leak(Test_Test):
|
|||||||
dialog.setCentralWidget(Test_Instructions_Reminder(recipe=self.parent.recipe,bench_name=self.parent.config.machine_id))
|
dialog.setCentralWidget(Test_Instructions_Reminder(recipe=self.parent.recipe,bench_name=self.parent.config.machine_id))
|
||||||
dialog.show()
|
dialog.show()
|
||||||
|
|
||||||
|
def stop_test(self):
|
||||||
|
self.components["tecna_t3"].stop_test()
|
||||||
|
self.display_text(text="PROVA INTERROTTA", bg_color="yellow")
|
||||||
|
time.sleep(1)
|
||||||
|
self.start_b.setEnabled(True)
|
||||||
|
self.stop_b.setEnabled(False)
|
||||||
|
|
||||||
def start_test(self):
|
def start_test(self):
|
||||||
# print extra labels
|
# print extra labels
|
||||||
if self.step.type == "leak_1":
|
if self.step.type == "leak_1":
|
||||||
@ -105,12 +113,16 @@ class Test_Leak(Test_Test):
|
|||||||
if self.step.spec.get("autotest", False) == "ok_check":
|
if self.step.spec.get("autotest", False) == "ok_check":
|
||||||
self.display_text(text="AUTOTEST: RIMUOVERE FUGA CALIBRATA E PREMERE START PER INIZIARE LA PROVA TENUTA",
|
self.display_text(text="AUTOTEST: RIMUOVERE FUGA CALIBRATA E PREMERE START PER INIZIARE LA PROVA TENUTA",
|
||||||
bg_color="blue", text_color="white")
|
bg_color="blue", text_color="white")
|
||||||
|
super().visualize(None, img=self.status_imgs_full["calibrated-leak-remove"])
|
||||||
elif self.step.spec.get("autotest", False) == "ko_check":
|
elif self.step.spec.get("autotest", False) == "ko_check":
|
||||||
self.display_text(
|
self.display_text(
|
||||||
text="AUTOTEST: COLLEGARE TUBO-TUBO + FUGA CALIBRATA E PREMERE START PER INIZIARE LA PROVA TENUTA DI PROVA",
|
text="AUTOTEST: COLLEGARE TUBO-TUBO + FUGA CALIBRATA E PREMERE START PER INIZIARE LA PROVA TENUTA DI PROVA",
|
||||||
bg_color="blue", text_color="white")
|
bg_color="blue", text_color="white")
|
||||||
|
super().visualize(None, img=self.status_imgs_full["calibrated-leak"])
|
||||||
else:
|
else:
|
||||||
self.display_text(text="COLLEGARE GLI ATTACCHI PNEUMATICI E PREMERE START PER INIZIARE LA PROVA TENUTA")
|
self.display_text(text="COLLEGARE GLI ATTACCHI PNEUMATICI E PREMERE START PER INIZIARE LA PROVA TENUTA")
|
||||||
|
self.display_image(img="wait")
|
||||||
|
|
||||||
if self.simulate:
|
if self.simulate:
|
||||||
QApplication.processEvents()
|
QApplication.processEvents()
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
@ -236,8 +248,9 @@ class Test_Leak(Test_Test):
|
|||||||
self.display_text(text="AUTOTEST: PROVA TENUTA IN CORSO")
|
self.display_text(text="AUTOTEST: PROVA TENUTA IN CORSO")
|
||||||
self.start_b.setEnabled(False)
|
self.start_b.setEnabled(False)
|
||||||
self.stop_b.setEnabled(True)
|
self.stop_b.setEnabled(True)
|
||||||
ok = data.get("results", {}).get("ok", None)
|
ok = data.get("results", {}).get("ok", None)
|
||||||
super().visualize(data, img=self.status_imgs_full[ok])
|
|
||||||
|
super().visualize(data, img=self.status_imgs_full[ok])
|
||||||
|
|
||||||
def display_text(self,text="", bg_color=None,text_color=None):
|
def display_text(self,text="", bg_color=None,text_color=None):
|
||||||
if self.parent_assembly_widget is not None:
|
if self.parent_assembly_widget is not None:
|
||||||
@ -245,6 +258,7 @@ class Test_Leak(Test_Test):
|
|||||||
QApplication.processEvents()
|
QApplication.processEvents()
|
||||||
time.sleep(0.3)
|
time.sleep(0.3)
|
||||||
QApplication.processEvents()
|
QApplication.processEvents()
|
||||||
|
|
||||||
def set_digital_out(self,name=None,state=1):
|
def set_digital_out(self,name=None,state=1):
|
||||||
if self.io_ok:
|
if self.io_ok:
|
||||||
bit=int(self.parent.config["digital_io"][name])
|
bit=int(self.parent.config["digital_io"][name])
|
||||||
|
|||||||
@ -60,6 +60,8 @@ class Test_Test(Widget):
|
|||||||
"": QPixmap("src/ui/imgs/neo.ico"),
|
"": QPixmap("src/ui/imgs/neo.ico"),
|
||||||
"warning": QPixmap("src/ui/imgs/warning.png"),
|
"warning": QPixmap("src/ui/imgs/warning.png"),
|
||||||
"wait": QPixmap("src/ui/imgs/wait.png"),
|
"wait": QPixmap("src/ui/imgs/wait.png"),
|
||||||
|
"calibrated-leak": QPixmap("src/ui/imgs/calibrated-leak.png"),
|
||||||
|
"calibrated-leak-remove": QPixmap("src/ui/imgs/calibrated-leak-remove.png"),
|
||||||
False: QPixmap("src/ui/imgs/fail.png"),
|
False: QPixmap("src/ui/imgs/fail.png"),
|
||||||
None: QPixmap("src/ui/imgs/wait.png"),
|
None: QPixmap("src/ui/imgs/wait.png"),
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user