Skip to content

Commit

Permalink
Update PROBE_LIMITS to support beacon
Browse files Browse the repository at this point in the history
  • Loading branch information
rootiest committed Sep 14, 2023
1 parent dc88766 commit 49f5233
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions macros/GET_PROBE_LIMITS.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gcode_macro GET_PROBE_LIMITS]
description: Calculates the probe min/max/current coordinates
gcode:
{% set config = printer.configfile.config %}
{% set config = printer.configfile.settings %}
# Find probe config in configfile
{% if config["bltouch"] %}
# bltouch section found
Expand All @@ -11,6 +11,10 @@ gcode:
# probe section found
{% set probe = config["probe"] %}
{% set has_probe = True %}
{% elif config["beacon"] %}
# probe section found
{% set probe = config["beacon"] %}
{% set has_probe = True %}
{% else %}
# No probe or bltouch sections found
RESPOND MSG="Failed to detect probe in configfile"
Expand All @@ -24,7 +28,11 @@ gcode:
{% set yprobemax = steppery["position_max"]|float + probe["y_offset"]|float %}
RESPOND MSG="Configured Probe X-Offset {probe.x_offset}"
RESPOND MSG="Configured Probe Y-Offset {probe.y_offset}"
RESPOND MSG="Configured Probe Z-Offset {probe.z_offset}"
{% if probe.z_offset is defined %}
RESPOND MSG="Configured Probe Z-Offset {probe.z_offset}"
{% elif probe.trigger_distance is defined %}
RESPOND MSG="Configured Probe Trigger Distance {probe.trigger_distance}"
{% endif %}
RESPOND MSG="Minimum PROBE position X={xprobemin} Y={yprobemin}"
RESPOND MSG="Maximum PROBE position X={xprobemax} Y={yprobemax}"
# check if printer homed
Expand All @@ -33,4 +41,4 @@ gcode:
{% set curprobey = printer.toolhead.position.y|float + probe["y_offset"]|float %}
RESPOND MSG="Current PROBE position X={curprobex} Y={curprobey}"
{% endif %}
{% endif %}
{% endif %}

0 comments on commit 49f5233

Please sign in to comment.