Skip to content

Commit

Permalink
bed_mesh: Change macro rename lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh committed May 28, 2023
1 parent 0c95ab5 commit 9d059e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 5 additions & 1 deletion bed_mesh_fast.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
[gcode_macro bed_mesh_calibrate_fast]
description: Wraps BED_MESH_CALIBRATE, scaling probe count to specified area.
Usage: See Klipper documentation.
variable_calibrate_cmd: "BED_MESH_CALIBRATE"
gcode:
# Abort on a bad config.
BED_MESH_CHECK ABORT=1

# Find the real bed_mesh_calibrate command.
{% set calibrate_cmd =
(printer["gcode_macro list_macros"].macros.bed_mesh_calibrate|
default(["bed_mesh_calibrate"],True))[-1] %}

{% set km = printer["gcode_macro _km_globals"] %}
{% set probe_mesh_padding = km.probe_mesh_padding %}
{% set probe_min_count = km.probe_min_count %}
Expand Down
5 changes: 0 additions & 5 deletions optional/bed_mesh.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ gcode:
[gcode_macro g29]
gcode:
BED_MESH_CALIBRATE

[delayed_gcode _set_bed_mesh_calibrate_cmd]
initial_duration: 1
gcode:
SET_GCODE_VARIABLE MACRO=bed_mesh_calibrate_fast VARIABLE=calibrate_cmd VALUE='"_km_bed_mesh_calibrate_base"'

0 comments on commit 9d059e4

Please sign in to comment.