probe_eddy_current: Stop measurements on an error in EddyScanningProbe
Register an event handler to make sure measurements are stopped if a gcode error occurs while using EddyScanningProbe. EddyTap and EddyDescend use ProbeSessionHelper which already provides this handling, but EddyScanningProbe doesn't use that wrapper so it must be implemented manually. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
1 parent
54c7b65d5d
commit
016f6e62b8
1 file changed
+5
@@ -609,6 +609,11 @@ class EddyScanningProbe:
|
||||
self._sample_time_delay = 0.050
|
||||
self._sample_time = 0.
|
||||
self._is_rapid = False
|
||||
self._printer.register_event_handler("gcode:command_error",
|
||||
self._handle_command_error)
|
||||
def _handle_command_error(self):
|
||||
if self._gather is not None:
|
||||
self.end_probe_session()
|
||||
def _lookup_toolhead_pos(self, pos_time):
|
||||
toolhead = self._printer.lookup_object('toolhead')
|
||||
kin = toolhead.get_kinematics()
|
||||
|
||||
Reference in new issue
Block a user