Existing command 'TESTZ' not found in gcode_macro rename

Describe your issue:

I’m not able to create a gcode_macro for the TESTZ command. I would like to change the functionality so it auto reports the printer.configfile.save_config_pending_items.stepper_z.position_endstop variable.

The macro is as follows:

[gcode_macro TESTZ]
rename_existing: BASE_TESTZ
gcode:
  BASE_TESTZ {rawparams}
  RESPOND TYPE=command MSG="printer.configfile.save_config_pending_items.stepper_z.position_endstop: {printer.configfile.save_config_pending_items.stepper_z.position_endstop}"

I get the error:
Existing command 'TESTZ' not found in gcode_macro rename

I believe this might be a bug as the TESTZ is not actually available until Z_ENDSTOP_CALIBRATE is run.

klippy.log (21.3 KB)

TESTZ is a command that is used during probe calibration and is only usable there. It is no regular gcode command.

Why do you want to change it?

https://www.klipper3d.org/Bed_Level.html#the-paper-test

I want to change it for development purposes. I would like it to automatically report the new resultant stepper_z.position_endstop.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.