fix input state handling in test instructions
This commit is contained in:
parent
f77d5de0f4
commit
fb6582857d
|
|
@ -43,6 +43,7 @@ class Test_Instructions(Test_Test):
|
||||||
show = super().start(recipe=recipe, step=step)
|
show = super().start(recipe=recipe, step=step)
|
||||||
|
|
||||||
self.timer.start(1000)
|
self.timer.start(1000)
|
||||||
|
self.inputs = {}
|
||||||
# setup test loop
|
# setup test loop
|
||||||
if "digital_io" in self.components.keys():
|
if "digital_io" in self.components.keys():
|
||||||
self.get_connection = self.components["digital_io"].out.connect(self.get)
|
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 isinstance(sensor_index, int):
|
||||||
if (inverse and current_bitstate != self.expected_input_state) or (not inverse and current_bitstate == self.expected_input_state):
|
if (inverse and current_bitstate != self.expected_input_state) or (not inverse and current_bitstate == self.expected_input_state):
|
||||||
self.inputs[sensor_index] = True
|
self.inputs[sensor_index] = True
|
||||||
else:
|
|
||||||
self.inputs[sensor_index] = False
|
if not self.inputs.get(sensor_index, False):
|
||||||
ok = False
|
ok = False
|
||||||
else:
|
else:
|
||||||
self.inputs[sensor_index] = False
|
|
||||||
ok = False
|
ok = False
|
||||||
|
|
||||||
if ok:
|
if ok:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user