Compare commits

..

1 Commits

7 changed files with 52 additions and 159 deletions

View File

@ -1,33 +0,0 @@
codice_ricetta,cliente,part_number,dimensione_lotto_abilitata,dimensione_lotto,verifica_connettore_abilitata,connettore,verifica_codice_a_barre_abilitata,codice_a_barre,verifica_resistenza_connettore_abilitata,scala_resistenza,r nominale,tolleranza_resistenza_pos,tolleranza_resistenza_neg,avvitatura_abilitata,viti,prova_tenuta_abilitata,tempo_pre_riempimento,pressione_pre_riempimento,tempo_riempimento,tempo_assestamento,percentuale_minima_pressione_assestamento,percentuale_massima_pressione_assestamento,tempo_di_test,pressione_di_test_delta_minimo,pressione_di_test,pressione_di_test_delta_massimo,tempo_svuotamento,pressione_svuotamento,prova_pervieta_abilitata,tempo_riempimento_free_fall,pressione_riempimento_free_fall,pressione_min_free_fall,pressione_max_free_fall,riempimento_continuo_free_fall,prova_tenuta_abilitata_2,tempo_pre_riempimento_2,pressione_pre_riempimento_2,tempo_riempimento_2,tempo_assestamento_2,percentuale_minima_pressione_assestamento_2,percentuale_massima_pressione_assestamento_2,tempo_di_test_2,pressione_di_test_delta_minimo_2,pressione_di_test_2,pressione_di_test_delta_massimo_2,tempo_svuotamento_2,pressione_svuotamento_2,test_visione_abilitato,ricetta_visione,stampa_etichetta_abilitata,modello_etichetta,labeltxt_1,labeltxt_2,labeltxt_3,labeltxt_4,labeltxt_5,printer_selection
5803566932,IVECO,5803566932,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566933,IVECO,5803566933,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566934,IVECO,5803566934,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566935,IVECO,5803566935,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566936,IVECO,5803566936,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566937,IVECO,5803566937,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803532411,IVECO,5803532411,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803293151,IVECO,5803293151,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803293152,IVECO,5803293152,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520145,IVECO,5803520145,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520146,IVECO,5803520146,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520147,IVECO,5803520147,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520148,IVECO,5803520148,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520149,IVECO,5803520149,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520150,IVECO,5803520150,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520151,IVECO,5803520151,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520152,IVECO,5803520152,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520153,IVECO,5803520153,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520154,IVECO,5803520154,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803522026,IVECO,5803522026,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803525931,IVECO,5803525931,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803525935,IVECO,5803525935,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803537510,IVECO,5803537510,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803537511,IVECO,5803537511,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803537512,IVECO,5803537512,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547707,IVECO,5803547707,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547712,IVECO,5803547712,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547715,IVECO,5803547715,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547736,IVECO,5803547736,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566929,IVECO,5803566929,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566930,IVECO,5803566930,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803532412,IVECO,5803532412,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
1 codice_ricetta cliente part_number dimensione_lotto_abilitata dimensione_lotto verifica_connettore_abilitata connettore verifica_codice_a_barre_abilitata codice_a_barre verifica_resistenza_connettore_abilitata scala_resistenza r nominale tolleranza_resistenza_pos tolleranza_resistenza_neg avvitatura_abilitata viti prova_tenuta_abilitata tempo_pre_riempimento pressione_pre_riempimento tempo_riempimento tempo_assestamento percentuale_minima_pressione_assestamento percentuale_massima_pressione_assestamento tempo_di_test pressione_di_test_delta_minimo pressione_di_test pressione_di_test_delta_massimo tempo_svuotamento pressione_svuotamento prova_pervieta_abilitata tempo_riempimento_free_fall pressione_riempimento_free_fall pressione_min_free_fall pressione_max_free_fall riempimento_continuo_free_fall prova_tenuta_abilitata_2 tempo_pre_riempimento_2 pressione_pre_riempimento_2 tempo_riempimento_2 tempo_assestamento_2 percentuale_minima_pressione_assestamento_2 percentuale_massima_pressione_assestamento_2 tempo_di_test_2 pressione_di_test_delta_minimo_2 pressione_di_test_2 pressione_di_test_delta_massimo_2 tempo_svuotamento_2 pressione_svuotamento_2 test_visione_abilitato ricetta_visione stampa_etichetta_abilitata modello_etichetta labeltxt_1 labeltxt_2 labeltxt_3 labeltxt_4 labeltxt_5 printer_selection
2 5803566932 IVECO 5803566932 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
3 5803566933 IVECO 5803566933 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
4 5803566934 IVECO 5803566934 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
5 5803566935 IVECO 5803566935 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
6 5803566936 IVECO 5803566936 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
7 5803566937 IVECO 5803566937 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
8 5803532411 IVECO 5803532411 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
9 5803293151 IVECO 5803293151 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
10 5803293152 IVECO 5803293152 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
11 5803520145 IVECO 5803520145 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
12 5803520146 IVECO 5803520146 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
13 5803520147 IVECO 5803520147 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
14 5803520148 IVECO 5803520148 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
15 5803520149 IVECO 5803520149 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
16 5803520150 IVECO 5803520150 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
17 5803520151 IVECO 5803520151 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
18 5803520152 IVECO 5803520152 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
19 5803520153 IVECO 5803520153 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
20 5803520154 IVECO 5803520154 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
21 5803522026 IVECO 5803522026 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
22 5803525931 IVECO 5803525931 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
23 5803525935 IVECO 5803525935 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
24 5803537510 IVECO 5803537510 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
25 5803537511 IVECO 5803537511 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
26 5803537512 IVECO 5803537512 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
27 5803547707 IVECO 5803547707 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
28 5803547712 IVECO 5803547712 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
29 5803547715 IVECO 5803547715 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
30 5803547736 IVECO 5803547736 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
31 5803566929 IVECO 5803566929 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
32 5803566930 IVECO 5803566930 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
33 5803532412 IVECO 5803532412 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b

View File

@ -16,4 +16,3 @@ st-ten-14: st-ten-14
st-ten-15: st-ten-15
test-linux: test-linux
Dell06:st-ten-3
ST-TEN-16: st-ten-16

View File

@ -1,99 +0,0 @@
[machine]
description = ST-TEN-16 raccordati
instruction_folder = st-ten-16
image_for_warning= st-ten-16
[hardware_config]
archive_synchronizer: present
archive_synchronizer_extra: absent
uvc_camera: absent
label_printer: present
neo_pixels: absent
remote_api: absent
tecna_t3: present
vision_saver: absent
vision: absent
screwdriver: absent
digital_io: absent
barcode_recipe_selection: absent
fixture_id: absent
discard_box: absent
second_leak_test:absent
dual_channel: absent
#enforce_piece_removal: yes
[tecna_t3]
port: /dev/ttyUSB0
model: t3P
[archive_synchronizer_extra]
portal_address: http://172.20.3.13:45022/
poll_time: 10
hold_time: 10
[label_printer]
platform: linux
printer: ZTC-ZD421-203dpi-ZPL
risoluzione:203
[recipe]
recipe_name_field: codice_ricetta
part_number_field: codice_ricetta
label_template_field: modello_etichetta
description_field: descrizione
[recipes_defaults]
tester_discharge_enable: yes
dimensione_lotto_abilitata: x
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 15
tempo_assestamento: 15
tempo_di_test: 10
n_componenti:1
percentuale_minima_pressione_assestamento: 5
percentuale_massima_pressione_assestamento: 5
pressione_di_test_delta_minimo: 30
pressione_di_test: 7000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 0
pressione_svuotamento: 100
canale_di_prova: 1
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
tempo_riempimento_2: 20
tempo_assestamento_2: 20
tempo_di_test_2: 10
percentuale_minima_pressione_assestamento_2: 5
percentuale_massima_pressione_assestamento_2: 5
pressione_di_test_delta_minimo_2: 30
pressione_di_test_2: 1000
pressione_di_test_delta_massimo_2: 30
tempo_svuotamento_2: 0
pressione_svuotamento_2: 100
canale_di_prova_2: 2
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
pid_pressure_correction: 100
istruzione_abilitata_extra:
slow_pid:
[autotest_leak]
enabled: true
pre_filling_time: 0
pre_filling_pressure: 1000
filling_time: 10
settling_time: 10
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_pressure: 7000
test_time: 10
test_pressure_qpos: 16 #Q+ Upper test leak limit
test_pressure_qneg: 24 #Q- Lower test leak limit
test_pressure_tt_qpos: 1 # Q+ Upper test leak limit (tube-tube)
test_pressure_tt_qneg: 5 # Q- Lower test leak limit (tube-tube)
flush_time: 1
flush_pressure: 100
relay_config: 1
pid_pressure_correction: 100

View File

@ -9,6 +9,6 @@ Exec=bash $here/runme.sh
Icon=$here/src/ui/imgs/neo.ico
Terminal=false
Type=Application
Categories=Application;" > "$HOME/.local/share/applications/ST-TEN-16.desktop"
Categories=Application;" > "$HOME/.local/share/applications/ST-TEN-13.desktop"
ln -f -s "$HOME/.local/share/applications/ST-TEN-16.desktop" "$HOME/Scrivania/ST-TEN-16.desktop"
ln -f -s "$HOME/.local/share/applications/ST-TEN-13.desktop" "$HOME/Scrivania/ST-TEN-13.desktop"

View File

@ -219,7 +219,7 @@ class ArchiveSynchronizer(Component):
"data": json.dumps(record.test_data),
"machine_id": self.machine_id,
"overridden": record.overridden,
"recipe": record.test_data.get("recipe", {}).get("name") or "N/A",
"recipe": record.test_data.get("recipe", {}).get("name", None),
"result": "OK" if record.result else "KO",
"serial": record.id,
"time": record.time.isoformat(),
@ -230,7 +230,7 @@ class ArchiveSynchronizer(Component):
r = requests.get(self.archive_endpoint, params={
"machine_id": self.machine_id,
"overridden": record.overridden,
"recipe": record.test_data.get("recipe", {}).get("name") or "N/A",
"recipe": record.test_data.get("recipe", {}).get("name", None),
"result": "OK" if record.result else "KO",
"serial": record.id,
"time": record.time.isoformat(),

View File

@ -1,25 +1,29 @@
import os
from peewee import Model, SqliteDatabase
from peewee import Model
from playhouse.sqlite_ext import SqliteExtDatabase
db_path = "./data/database"
os.makedirs(db_path, exist_ok=True)
db = SqliteDatabase(
db = SqliteExtDatabase(
db_path + "/sqlite.db",
pragmas={
pragmas={ # see https://www.sqlite.org/pragma.html
"auto_vacuum": 1,
"busy_timeout": 5000,
"cache_size": round(-64e3),
"foreign_keys": 1,
"ignore_check_constraints": 0,
"journal_mode": "wal",
"synchronous": 1,
"synchronous": 1, # Changed from 0 to 1 (NORMAL) for better data integrity
},
timeout=5
)
class BaseModel(Model):
"""A base model that will use our Sqlite database."""
class Meta:
database = db
global db
database = db

View File

@ -535,9 +535,6 @@ class Test(Widget):
else:
# Autotest succeeded; proceed to post-autotest actions
self.autotesting = False
# MOSTRA IL POPUP RICHIESTO ALLA FINE DELL'AUTOTEST
QMessageBox.information(self, "Avviso",
"ATTENZIONE ,SCOLLEGARE IL TUBO-TUBO PRIMA DI INIZIARE A COLLAUDARE")
if self.autotesting_reason == "logout":
Users.logout()
self.main_window.open_login()
@ -754,6 +751,7 @@ class Test(Widget):
self.cycle_steps = steps
self.check_steps_dependencies(self.cycle_steps)
leak_autotest_steps = []
# CONFIGURE LEAK AUTOTEST PARAMETERS
if self.config["autotest_leak"]["enabled"] == "true":
l_at_1 = copy.deepcopy(self.config["autotest_leak"])
@ -1013,20 +1011,36 @@ class Test(Widget):
leak_test_2_step_spec = leak_test_2_step.get("spec", {})
leak_test_2_results = leak_test_2.get("results", {})
psetminp_a = leak_test_1_step_spec.get("test_pressure", 0) * (
100 + leak_test_1_step_spec.get("test_pressure_qneg", 0) / 100)
psetmaxp_a = leak_test_1_step_spec.get("settling_pressure_max_percent", 0) * (
100 + leak_test_1_step_spec.get("test_pressure_qpos", 0) / 100)
psetminp2_a = leak_test_2_step_spec.get("settling_pressure_min_percent", 0) * (
100 + leak_test_2_step_spec.get("test_pressure_qneg", 0) / 100)
psetmaxp2_a = leak_test_2_step_spec.get("settling_pressure_max_percent", 0) * (
100 + leak_test_2_step_spec.get("test_pressure_qpos", 0) / 100)
if self.tester_component is not None:
if self.recipe.spec["leak_1"]:
# Verifica preventiva della presenza della specifica della ricetta
has_spec = self.recipe is not None and getattr(self.recipe, 'spec', None) is not None
# Calcolo protetto delle pressioni assolute del test 1
if has_spec and self.recipe.spec.get("leak_1", False):
psetminp_a = leak_test_1_step_spec.get("test_pressure", 0) * (
100 + leak_test_1_step_spec.get("test_pressure_qneg", 0) / 100)
psetmaxp_a = leak_test_1_step_spec.get("settling_pressure_max_percent", 0) * (
100 + leak_test_1_step_spec.get("test_pressure_qpos", 0) / 100)
else:
psetminp_a = "-"
psetmaxp_a = "-"
# Calcolo protetto delle pressioni assolute del test 2
if has_spec and self.recipe.spec.get("leak_2", False):
psetminp2_a = leak_test_2_step_spec.get("settling_pressure_min_percent", 0) * (
100 + leak_test_2_step_spec.get("test_pressure_qneg", 0) / 100)
psetmaxp2_a = leak_test_2_step_spec.get("settling_pressure_max_percent", 0) * (
100 + leak_test_2_step_spec.get("test_pressure_qpos", 0) / 100)
else:
psetminp2_a = "-"
psetmaxp2_a = "-"
# Calcolo del valore di fine misura solo se le fasi sono effettivamente attive
if self.tester_component is not None and has_spec:
if self.recipe.spec.get("leak_1", False) and "Running test: pressure at the end of settling" in leak_test_1_results:
leak_test_1_results["Running test: pressure at the end of measure"] = (
leak_test_1_results["Running test: pressure at the end of settling"]
+ leak_test_1_results["Running test: measured leak"])
if self.recipe.spec["leak_2"]:
if self.recipe.spec.get("leak_2", False) and "Running test: pressure at the end of settling" in leak_test_2_results:
leak_test_2_results["Running test: pressure at the end of measure"] = (
leak_test_2_results["Running test: pressure at the end of settling"]
+ leak_test_2_results["Running test: measured leak"])
@ -1257,11 +1271,19 @@ class Test(Widget):
has_error (bool): True if there is an error, False otherwise.
error_message (str): The error message to add.
"""
# print(f"DEBUG: Modbus error handler called - has_error={has_error}, error_message={error_message}") # Debugging
# Verifica se la ricetta attuale richiede il Tecna
needs_tecna = False
if self.recipe is not None and getattr(self.recipe, 'spec', None):
needs_tecna = (self.recipe.spec.get("leak_1", False) or
self.recipe.spec.get("leak_2", False) or
self.recipe.spec.get("test_freefall_leak", False))
if has_error:
self.add_error(f"Errore Tecna", True) # Add the Modbus error
# Mostra l'errore solo se il Tecna serve alla ricetta, o se non c'è nessuna ricetta caricata
if needs_tecna or self.recipe is None:
self.add_error(f"Errore Tecna", True)
else:
self.remove_error(f"Errore Tecna") # Remove the Modbus error
self.remove_error(f"Errore Tecna")
def update_label_with_args(self, extra_info=None):
"""