By the code of SET_GCODE_OFFSET
and G92
I would say following:
G92
- will update just base_position
- current position of a toolhead
SET_GCODE_OFFSET
- will do the same update of base_position
but additionally it will update homing_position
- which will be used on next homing sequence
So I would say SET_GCODE_OFFSET - offsets will survive G28 (Re-Homing) but not klipper restart, G92 - offsets will be reset after G28 (Re-Homing)
Yes PROBE is just prints bed height to the console, but it also remember it in internal variable probe variable
so you can build simple MACRO which can use it and invoke G92, something like this:
P.S. this is simplified macro which just use probe value for new Z position, it needs additional calculations as current position of toolhead most probably is different than when it was probed
[gcode_macro APPLY_PROBE_TO_Z_OFFSET]
gcode:
{% set z_probe = printer.probe.last_z_result|float %}
{% if z_probe > 0. %}
G92 Z{z_probe}
{% endif %}
Then you can call PROBE
and then your MACRO
, but those should be called separately, they can’t be joined under single macro because MACRO
will not see updated variables in PROBE
.
You still can override G28
and include PROBE
there and integrate APPLY_PROBE_TO_Z_OFFSET
into your START_PRINT
macro as G28
and START_PRINT
are called separately.