From 576d0ca13de8434d6a52e2a3cd474501f3c3eae6 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 30 Jan 2026 14:00:55 -0500 Subject: [PATCH] probe_eddy_current: Minor reorg to PrinterEddyProbe startup The EddyTap class doesn't need the calibration object. Add some code comments. Signed-off-by: Kevin O'Connor --- klippy/extras/probe_eddy_current.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/klippy/extras/probe_eddy_current.py b/klippy/extras/probe_eddy_current.py index e3dd7270e..1befaf6e9 100644 --- a/klippy/extras/probe_eddy_current.py +++ b/klippy/extras/probe_eddy_current.py @@ -478,11 +478,9 @@ class EddyEndstopWrapper: # Probing helper for "tap" requests class EddyTap: - def __init__(self, config, sensor_helper, calibration, - param_helper, trigger_analog): + def __init__(self, config, sensor_helper, param_helper, trigger_analog): self._printer = config.get_printer() self._sensor_helper = sensor_helper - self._calibration = calibration self._param_helper = param_helper self._trigger_analog = trigger_analog self._z_min_position = probe.lookup_minimum_z(config) @@ -677,21 +675,21 @@ class PrinterEddyProbe: self.eddy_descend = EddyDescend( config, self.sensor_helper, self.calibration, self.probe_offsets, self.param_helper, trig_analog) - self.cmd_helper = probe.ProbeCommandHelper(config, self, - replace_z_offset=True) - self.probe_session = probe.ProbeSessionHelper( - config, self.param_helper, self._start_descend_wrapper) # Create wrapper to support Z homing with probe mcu_probe = EddyEndstopWrapper(self.sensor_helper, self.eddy_descend) - probe.HomingViaProbeHelper( - config, mcu_probe, self.probe_offsets, self.param_helper) + probe.HomingViaProbeHelper(config, mcu_probe, + self.probe_offsets, self.param_helper) # Probing via "tap" interface - self.eddy_tap = EddyTap(config, self.sensor_helper, self.calibration, + self.eddy_tap = EddyTap(config, self.sensor_helper, self.param_helper, trig_analog) # Probing via "scan" and "rapid_scan" requests self.eddy_scan = EddyScanningProbe(config, self.sensor_helper, self.calibration, self.probe_offsets) # Register with main probe interface + self.cmd_helper = probe.ProbeCommandHelper(config, self, + replace_z_offset=True) + self.probe_session = probe.ProbeSessionHelper( + config, self.param_helper, self._start_descend_wrapper) self.printer.add_object('probe', self) def add_client(self, cb): self.sensor_helper.add_client(cb) @@ -712,6 +710,7 @@ class PrinterEddyProbe: method = gcmd.get('METHOD', 'automatic').lower() if method in ('scan', 'rapid_scan'): return self.eddy_scan.start_probe_session(gcmd) + # For "tap" and normal, probe_session can average multiple attempts return self.probe_session.start_probe_session(gcmd) def register_drift_compensation(self, comp): self.calibration.register_drift_compensation(comp)