homing: Fix bug in multi_complete()

Reported by @skrogh.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-05-13 13:53:17 -04:00
parent c14118e9c6
commit 8268478006
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ def multi_complete(printer, completions):
cp = reactor.register_callback(lambda e: [c.wait() for c in completions])
# If any completion indicates an error, then exit main completion early
for c in completions:
reactor.register_callback(lambda e: cp.complete(1) if c.wait() else 0)
reactor.register_callback(
lambda e, c=c: cp.complete(1) if c.wait() else 0)
return cp
# Tracking of stepper positions during a homing/probing move