diff --git a/src/ui/test_instructions/test_instructions.py b/src/ui/test_instructions/test_instructions.py index 479aa8d..a0f91f1 100644 --- a/src/ui/test_instructions/test_instructions.py +++ b/src/ui/test_instructions/test_instructions.py @@ -43,6 +43,7 @@ class Test_Instructions(Test_Test): show = super().start(recipe=recipe, step=step) self.timer.start(1000) + self.inputs = {} # setup test loop if "digital_io" in self.components.keys(): self.get_connection = self.components["digital_io"].out.connect(self.get) @@ -215,11 +216,10 @@ class Test_Instructions(Test_Test): if isinstance(sensor_index, int): if (inverse and current_bitstate != self.expected_input_state) or (not inverse and current_bitstate == self.expected_input_state): self.inputs[sensor_index] = True - else: - self.inputs[sensor_index] = False + + if not self.inputs.get(sensor_index, False): ok = False else: - self.inputs[sensor_index] = False ok = False if ok: