diff --git a/bed_mesh_fast.cfg b/bed_mesh_fast.cfg index ba3d883..b24ab6a 100644 --- a/bed_mesh_fast.cfg +++ b/bed_mesh_fast.cfg @@ -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 %} diff --git a/optional/bed_mesh.cfg b/optional/bed_mesh.cfg index a233703..d32fbbb 100644 --- a/optional/bed_mesh.cfg +++ b/optional/bed_mesh.cfg @@ -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"'