bigtreetech / KNOMI

158 stars 73 forks source link

Macros should pass on all parameters #28

Open BHoggs opened 9 months ago

BHoggs commented 9 months ago

The macros included in the manual results in the commands ignoring any params given to them. For example, G28 Z should only home the Z axis, but will now always re-home all axes.

These updated macros should work better as it passes {rawparams} back to the base commands:

[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BED_MESH_CALIBRATE_BASE
variable_probing:False

gcode:
  SET_GCODE_VARIABLE MACRO=BED_MESH_CALIBRATE VARIABLE=probing VALUE=True
  BED_MESH_CALIBRATE_BASE {rawparams}
  SET_GCODE_VARIABLE MACRO=BED_MESH_CALIBRATE VARIABLE=probing VALUE=False

[gcode_macro G28]
rename_existing: G0028
variable_homing:False

gcode:
  SET_GCODE_VARIABLE MACRO=G28 VARIABLE=homing VALUE=True
  G0028 {rawparams}
  SET_GCODE_VARIABLE MACRO=G28 VARIABLE=homing VALUE=False
Casy11 commented 9 months ago

Thanks a lot. This code is works well. The homing and afterwards bed mesh works like it should, without a second time homing.