diff --git a/config/machine_settings/st-ten-5.ini b/config/machine_settings/st-ten-5.ini
index 58b56e5..1ddd713 100644
--- a/config/machine_settings/st-ten-5.ini
+++ b/config/machine_settings/st-ten-5.ini
@@ -10,6 +10,7 @@ remote_api: absent
tecna_t3: present
digital_io: present
barcode_recipe_selection: present
+show_instructions: yes
[tecna_t3]
port: COM4
diff --git a/src/ui/test/test.py b/src/ui/test/test.py
index e3cded2..75e492f 100755
--- a/src/ui/test/test.py
+++ b/src/ui/test/test.py
@@ -93,7 +93,7 @@ class Test(Widget):
"emergency": Test_Assembly(img_path=self.select_step_img("reset_emergency"), text=u"EMERGENZA INTERVENUTA - RIPRISTINARE PULSANTE E SELEZIONARE \"RESET EMERGENZA\" DAL MEN\u00d9 \"STRUMENTI\"", widget=None),
"fail": Test_Assembly(img_path=self.select_step_img("fail"), text=u"CICLO INTERROTTO, PREMERE CONTINUA PER COMINCIARE UN NUOVO CICLO", widget=Test_Fail()),
"leak_1": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces,parent=self)),
- "leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
+ "leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces,parent=self)),
"instruction": Test_Assembly(img_path=None, text=u"ESEGUIRE LE OPERAZIONI DI MONTAGGIO INDICATE IN FIGURA", widget=Test_Instructions(components=self.components, recipe=self.recipe,bench_name=self.config.machine_id, step=self.step)),
"print": Test_Assembly(img_path=self.select_step_img("print"), text=u"STAMPA ETICHETTA IN CORSO", widget=None),
"resistance": Test_Assembly(img_path=None, text=u"COLLEGARE CONNETTORE ELETTRICO PER EFFETTUARE PROVA RESISTENZA", widget=Test_Resistance(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
diff --git a/src/ui/test_leak/test_leak.py b/src/ui/test_leak/test_leak.py
index 4fe6330..7bcf1e4 100644
--- a/src/ui/test_leak/test_leak.py
+++ b/src/ui/test_leak/test_leak.py
@@ -2,18 +2,26 @@ import sys
import time
import weakref
-from PyQt5.QtWidgets import QMessageBox
+from PyQt5.QtWidgets import QMessageBox, QDialog
+from ui import Dialog
from ui.test_test import Test_Test
from components.Automation.BDaq import ErrorCode
class Test_Leak(Test_Test):
def __init__(self, components=None, recipe=None, step=None, pieces=None, run_once=False, reset_on_start=True, enable_override=False,parent=None):
super().__init__(components=components, recipe=recipe, step=step, pieces=pieces, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
+ self.parent=parent
self.step=step
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.parent=parent
+ self.show_instruction_b.setVisible("show_instructions" in self.parent.config["hardware_config"].keys())
+ self.show_instruction_b.clicked.connect(self.show_instruction)
+
+ def show_instruction(self):
+ dialog=Dialog()
+ dialog.setCentralWidget(self.parent.cycle_available_steps["instruction"])
+ dialog.show()
def start_test(self):
# print extra labels
diff --git a/src/ui/test_leak/test_leak.ui b/src/ui/test_leak/test_leak.ui
index 90ef48e..4b73aae 100644
--- a/src/ui/test_leak/test_leak.ui
+++ b/src/ui/test_leak/test_leak.ui
@@ -6,8 +6,8 @@
0
0
- 370
- 491
+ 1424
+ 806
@@ -26,7 +26,7 @@
0
- -
+
-
@@ -39,8 +39,8 @@
PROVA TENUTA
-
-
-
+
-
+
16
@@ -49,15 +49,54 @@
- Tipo di test
+ mbar
+
+
+
+ -
+
+
+
+ 130
+ 16777215
+
+
+
+
+ 20
+ 50
+ false
+
+
+
+ background-color: rgb(255, 255, 255);
+border: 1px solid black;
+
+
+
+ -
+
+
+
+ -
+
+
+
+ 16
+ 50
+ false
+
+
+
+ Indice di sequenza del test
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
+
-
+
16
@@ -66,10 +105,7 @@
- Pressione del circuito
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ mbar
@@ -107,17 +143,11 @@
- -
-
-
-
- 130
- 16777215
-
-
+
-
+
- 20
+ 16
50
false
@@ -132,6 +162,54 @@ border: 1px solid black;
+ -
+
+
+
+ 16
+ 50
+ false
+
+
+
+ Tipo di test
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 16
+ 50
+ false
+
+
+
+ Pressione del circuito
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 16
+ 50
+ false
+
+
+
+ mbar
+
+
+
-
@@ -187,8 +265,27 @@ border: 1px solid black;
- -
-
+
-
+
+
+
+ 16
+ 50
+ false
+
+
+
+ background-color: rgb(255, 255, 255);
+border: 1px solid black;
+
+
+
+ -
+
+
+
+ -
+
130
@@ -212,65 +309,6 @@ border: 1px solid black;
- -
-
-
-
- 16
- 50
- false
-
-
-
- Indice di sequenza del test
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 16
- 50
- false
-
-
-
- mbar
-
-
-
- -
-
-
-
- 16
- 50
- false
-
-
-
- mbar
-
-
-
- -
-
-
-
- 16
- 50
- false
-
-
-
- mbar
-
-
-
-
@@ -283,44 +321,6 @@ border: 1px solid black;
background-color: rgb(255, 255, 255);
border: 1px solid black;
-
-
-
- -
-
-
-
- -
-
-
-
- 16
- 50
- false
-
-
-
- background-color: rgb(255, 255, 255);
-border: 1px solid black;
-
-
-
- -
-
-
-
- -
-
-
-
- 16
- 50
- false
-
-
-
- background-color: rgb(255, 255, 255);
-border: 1px solid black;
@@ -331,7 +331,27 @@ border: 1px solid black;
- -
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 12
+ 75
+ true
+
+
+
+ FORZA ACCETTAZIONE
+
+
+
+ -
@@ -345,6 +365,12 @@ border: 1px solid black;
100
+
+
+ 16777215
+ 16777215
+
+
@@ -802,7 +828,7 @@ border: 1px solid black;
- -
+
-
@@ -856,7 +882,7 @@ border: 1px solid black;
- -
+
-
@@ -870,6 +896,12 @@ border: 1px solid black;
100
+
+
+ 16777215
+ 16777215
+
+
@@ -1327,23 +1359,474 @@ border: 1px solid black;
- -
-
+
-
+
-
+
0
0
+
+
+ 0
+ 100
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 112
+ 112
+ 255
+
+
+
+
+
+
+ 255
+ 127
+ 127
+
+
+
+
+
+
+ 255
+ 63
+ 63
+
+
+
+
+
+
+ 127
+ 0
+ 0
+
+
+
+
+
+
+ 170
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 112
+ 112
+ 255
+
+
+
+
+
+
+ 112
+ 112
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 127
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 112
+ 112
+ 255
+
+
+
+
+
+
+ 255
+ 127
+ 127
+
+
+
+
+
+
+ 255
+ 63
+ 63
+
+
+
+
+
+
+ 127
+ 0
+ 0
+
+
+
+
+
+
+ 170
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 255
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 112
+ 112
+ 255
+
+
+
+
+
+
+ 112
+ 112
+ 255
+
+
+
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+ 255
+ 127
+ 127
+
+
+
+
+
+
+ 255
+ 255
+ 220
+
+
+
+
+
+
+ 0
+ 0
+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