From 1d1a3d2e95248043e48994a69bda0876caeda9f6 Mon Sep 17 00:00:00 2001 From: Rogerio Goncalves Date: Mon, 12 Oct 2026 11:54:38 +0100 Subject: [PATCH] probe: Resolve externally registered default probe Third-party probes such as Beacon register "probe" directly without going through ProbeList. Since #972 this made ProbePointsHelper users (Z_TILT_ADJUST, QUAD_GANTRY_LEVEL, ...) fall into manual probing. Always create ProbeList before loading config sections, and fill default_probe from the "probe" object on connect if none registered. Signed-off-by: Rogerio Goncalves --- klippy/extras/probe.py | 8 ++++++++ klippy/printer.py | 3 +++ 2 files changed, 11 insertions(+) diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 1887648b58..a7474e60c1 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -328,13 +328,21 @@ def get_list(printer: Printer) -> ProbeList: return probes def __init__(self, printer): + self.printer = printer self.probes: dict[str, PrinterProbe] = {} self.default_probe = None + printer.register_event_handler("klippy:connect", self._handle_connect) gcode = printer.lookup_object("gcode") gcode.register_command( "LIST_PROBES", self.cmd_LIST_PROBES, desc=self.cmd_LIST_PROBES_help ) + def _handle_connect(self): + if self.default_probe is None: + probe = self.printer.lookup_object("probe", None) + if probe is not None: + self.default_probe = ("probe", probe) + def get_status(self, eventtime): return { "probes": list(self.probes.keys()), diff --git a/klippy/printer.py b/klippy/printer.py index 6506033845..a21b3d1f25 100644 --- a/klippy/printer.py +++ b/klippy/printer.py @@ -337,6 +337,9 @@ def _read_config(self): # Create printer objects for m in [pins, mcu]: m.add_printer_objects(config) + from .extras.probe import ProbeList + + ProbeList.get_list(self) for section_config in config.get_prefix_sections(""): self.load_object(config, section_config.get_name(), None) # Kalico on-by-default extras