diff --git a/src/ui/test/test.py b/src/ui/test/test.py index a5ed93c..b4ae8e7 100755 --- a/src/ui/test/test.py +++ b/src/ui/test/test.py @@ -448,14 +448,14 @@ class Test(Widget): leak1_index = step_types.index("leak_1") leak2_index = step_types.index("leak_2") if leak1_index + 1 == leak2_index: # Ensure 'leak_1' is immediately followed by 'leak_2' - steps.insert(leak2_index, Steps(type="instruction_extra", spec={})) + steps.insert(leak2_index, Step(step_type="instruction_extra", spec={})) inserted_instruction = True # Insert 'instruction_extra' after the first 'instructions' if not inserted between leaks if not inserted_instruction: for i, step in enumerate(steps): if step.type == "instructions": - steps.insert(i + 1, Steps(type="instruction_extra", spec={})) + steps.insert(i + 1, Step(step_type="instruction_extra", spec={})) inserted_instruction = True break diff --git a/src/ui/test_leak/test_leak.py b/src/ui/test_leak/test_leak.py index 0728174..72a7391 100644 --- a/src/ui/test_leak/test_leak.py +++ b/src/ui/test_leak/test_leak.py @@ -12,13 +12,14 @@ from ui.test_test import Test_Test VALVE_TIME=0.5 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): + def __init__(self, config,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.get_connection = None self.io_ok = True self.blow_on = False self.parent=parent self.step=step + self.config = config self.recipe_written = False self.start_b.clicked.connect(self.start_test) self.stop_b.clicked.connect(self.stop_test) @@ -143,11 +144,16 @@ class Test_Leak(Test_Test): time.sleep(2) # AUTO START SECOND TEST - if step.step_type == "leak_2": - self.recipe_written = False - time.sleep(1) - self.start_b.setEnabled(True) - self.start_b.click() + if step.type == "leak_2": + if self.config["hardware_config"].get("dual_chanel", "absent") == "present": + self.recipe_written = False + time.sleep(1) + self.start_b.setEnabled(True) + self.start_b.click() + else: + self.recipe_written = False + time.sleep(1) + self.start_b.setEnabled(True) return show