diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-05-19 13:15:30 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-05-21 20:16:31 -0400 |
commit | 37482178b5482a013a4a5a62789705ccaf1e03c6 (patch) | |
tree | 34d936d7d76183bd429fd4dfa399f39fe7ed8dee /klippy/extras/probe_eddy_current.py | |
parent | 4709f1fad50b642f744a8804608d55855d7d7b42 (diff) | |
download | kutter-37482178b5482a013a4a5a62789705ccaf1e03c6.tar.gz kutter-37482178b5482a013a4a5a62789705ccaf1e03c6.tar.xz kutter-37482178b5482a013a4a5a62789705ccaf1e03c6.zip |
mcu: Raise an error on a failed home_wait() call
Raise a printer.command_error exception if a home_wait() call fails.
This makes it easier to support future types of homing errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/probe_eddy_current.py')
-rw-r--r-- | klippy/extras/probe_eddy_current.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/extras/probe_eddy_current.py b/klippy/extras/probe_eddy_current.py index 8b9d705b..636c800d 100644 --- a/klippy/extras/probe_eddy_current.py +++ b/klippy/extras/probe_eddy_current.py @@ -243,8 +243,9 @@ class EddyEndstopWrapper: trigger_time = self._sensor_helper.clear_home() self._stop_measurements(is_home=True) res = self._dispatch.stop() - if res == mcu.MCU_trsync.REASON_COMMS_TIMEOUT: - return -1. + if res >= mcu.MCU_trsync.REASON_COMMS_TIMEOUT: + raise self._printer.command_error( + "Communication timeout during homing") if res != mcu.MCU_trsync.REASON_ENDSTOP_HIT: return 0. if self._mcu.is_fileoutput(): |