diff options
author | Pedro Lamas <pedrolamas@gmail.com> | 2023-03-03 09:46:36 +0000 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2023-03-14 21:11:33 -0400 |
commit | 87f109984a179089e8f56430aa9ce3a38cc08a94 (patch) | |
tree | 5b6e7499d3033be5afc826bd32ca41102b86e605 | |
parent | 2337d05f48d44e211443680db16e495ca9f6f4b7 (diff) | |
download | kutter-87f109984a179089e8f56430aa9ce3a38cc08a94.tar.gz kutter-87f109984a179089e8f56430aa9ce3a38cc08a94.tar.xz kutter-87f109984a179089e8f56430aa9ce3a38cc08a94.zip |
probe: expose name on status report
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
-rw-r--r-- | docs/Status_Reference.md | 1 | ||||
-rw-r--r-- | klippy/extras/probe.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/Status_Reference.md b/docs/Status_Reference.md index 5557cadf..423e3fd5 100644 --- a/docs/Status_Reference.md +++ b/docs/Status_Reference.md @@ -346,6 +346,7 @@ The following information is available in the [probe](Config_Reference.md#probe) object (this object is also available if a [bltouch](Config_Reference.md#bltouch) config section is defined): +- `name`: Returns the name of the probe in use. - `last_query`: Returns True if the probe was reported as "triggered" during the last QUERY_PROBE command. Note, if this is used in a macro, due to the order of template expansion, the QUERY_PROBE diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 9dc59eb9..e9f5ef94 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -195,7 +195,8 @@ class PrinterProbe: self.last_state = res gcmd.respond_info("probe: %s" % (["open", "TRIGGERED"][not not res],)) def get_status(self, eventtime): - return {'last_query': self.last_state, + return {'name': self.name, + 'last_query': self.last_state, 'last_z_result': self.last_z_result} cmd_PROBE_ACCURACY_help = "Probe Z-height accuracy at current XY position" def cmd_PROBE_ACCURACY(self, gcmd): |