diff --git a/src/main.py b/src/main.py index 0df8673..08492a9 100644 --- a/src/main.py +++ b/src/main.py @@ -141,6 +141,8 @@ try: for component_name in list(self.components_specs): if self.config.get("hardware_config", {}).get(component_name, None) != "present": self.components_specs.pop(component_name, None) + elif component_name in ("tecna_t3", "furness_controls") and self.config.machine_id == "st-ten-3": + self.components_specs.pop(component_name, None) elif component_name not in self.components_specs: raise AssertionError(f"{component_name!r} is not a valid component name") self.components = {} diff --git a/src/ui/test/test.py b/src/ui/test/test.py index df60af6..f2f7169 100755 --- a/src/ui/test/test.py +++ b/src/ui/test/test.py @@ -180,19 +180,20 @@ class Test(Widget): widget=Test_Leak(config=self.config, components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self)) - if self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"][ - "furness_controls"] != "absent" else None, + if (self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"][ + "furness_controls"] != "absent") and self.config.machine_id != "st-ten-3" else None, "leak_1": Test_Assembly(img_path=None, text=None, widget=Test_Leak(config=self.config, components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self)) - if self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"][ - "furness_controls"] != "absent" else None, + if (self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"][ + "furness_controls"] != "absent") and self.config.machine_id != "st-ten-3" else None, "leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(config=self.config, components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self)) - if ((self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"][ + if (((self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"][ "furness_controls"] != "absent") - and self.config["hardware_config"].get("second_leak_test", "absent") == "present") else None, + and self.config["hardware_config"].get("second_leak_test", "absent") == "present")) + and self.config.machine_id != "st-ten-3" else None, "flush": Test_Assembly(img_path=None, text=u"SCARICO ARIA IN CORSO - ATTENDERE...", widget=Test_Warning_Img(components=self.components, recipe=self.recipe, step=self.step)), @@ -712,8 +713,14 @@ class Test(Widget): steps.append(Step(step_type="count_end", spec={})) skip.add(i + 1) if step.step_type in ("leak_1", "leak_2"): + if self.config.machine_id == "st-ten-3": + continue self.leak_step = step + # Filter out leak steps for st-ten-3 + if self.config.machine_id == "st-ten-3": + steps = [s for s in steps if s.step_type not in ("leak_1", "leak_2")] + # Ensure Free Fall leak test appears before leak_1 when both are enabled step_types = [step.step_type for step in steps] if "test_freefall_leak" in step_types and "leak_1" in step_types: @@ -752,7 +759,7 @@ class Test(Widget): self.check_steps_dependencies(self.cycle_steps) leak_autotest_steps = [] # CONFIGURE LEAK AUTOTEST PARAMETERS - if self.config["autotest_leak"]["enabled"] == "true": + if self.config["autotest_leak"]["enabled"] == "true" and self.config.machine_id != "st-ten-3": l_at_1 = copy.deepcopy(self.config["autotest_leak"]) l_at_1.pop("enabled") l_at_1 = {a: float(x) for a, x in l_at_1.items()}