homing: Check for failures during multi-endstop homing

If any endstop reports a failure, then stop homing on all endstops.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-04-02 13:42:25 -04:00
parent 983951443c
commit bc29ee1c6d
2 changed files with 10 additions and 3 deletions

View file

@ -84,7 +84,9 @@ class MCU_trsync:
tc = self._trigger_completion
if tc is not None:
self._trigger_completion = None
self._reactor.async_complete(tc, True)
reason = params['trigger_reason']
is_failure = (reason == self.REASON_COMMS_TIMEOUT)
self._reactor.async_complete(tc, is_failure)
elif self._home_end_clock is not None:
clock = self._mcu.clock32_to_clock64(params['clock'])
if clock >= self._home_end_clock: