-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue is in this if-elif-else block
labscript-devices/labscript_devices/PrawnBlaster/runviewer_parsers.py
Lines 96 to 115 in e1f3d32
for row in pulse_program: | |
if row["reps"] == 0 and not last_instruction_was_wait: # WAIT | |
last_instruction_was_wait = True | |
if clock is not None: | |
t = clock_ticks[trigger_index] + self.trigger_delay | |
trigger_index += 1 | |
else: | |
t += self.wait_delay | |
elif last_instruction_was_wait: | |
# two waits in a row means an indefinite wait, so we just skip this | |
# instruction. | |
last_instruction_was_wait = False | |
continue | |
else: | |
last_instruction_was_wait = False | |
for i in range(row["reps"]): | |
for j in range(1, -1, -1): | |
time.append(t) | |
states.append(j) | |
t += row["half_period"] * clock_factor |
The elif
block always triggers on the next instruction after a wait, even if the current instruction is not also a wait (the proper indication of an indefinite wait).
Pretty sure the elif
check should be elif row["reps"] == 0 and last_instruction_was_wait:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working