Skip to content

Commit 4d0089b

Browse files
committed
Fix bug in error condition. This was an error that perviously wasn't raised (message was formed, but not raised), hence why the incorrect condition was never noticed.
1 parent 96b3dd3 commit 4d0089b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

labscript/outputs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,10 @@ def do_checks(self, trigger_times):
347347
f"t={trigger_time + self.trigger_delay}"
348348
)
349349
# Check that there are no instructions too soon before the trigger:
350-
if 0 < trigger_time - t < max(self.clock_limit, compiler.wait_delay):
350+
if (
351+
t < trigger_time
352+
and max(self.clock_limit, compiler.wait_delay) < trigger_time - t
353+
):
351354
raise LabscriptError(
352355
f"{self.description} {self.name} has an instruction at t={t}. "
353356
f"This is too soon before a trigger at t={trigger_time}, "

0 commit comments

Comments
 (0)