Feature request regarding the Z_OFFSET_APPLY_ENDSTOP / Z_ENDSTOP_CALIBRATE (unless I’m missing something).
Both of these commands apply changes to the position_endstop. However, in some printers (like Voron V0.2), the endstop is located exactly at the extreme of the Z travel, the position where position_max is supposed to be. So, in such printers, position_max should always be exactly where position_endstop happens to be – as you cannot go past the endstop.
However, Klipper does not update the position_max during that calibration, which causes one the two issues:
-
position_endstopcould become more than theposition_max, causingSAVE_CONFIGto fail with an error that endstop is > max. -
position_endstopcould stay/become strictly less than theposition_max, allowing potential Z crash since table is now allowed to go past the endstop.
I’ve read Klipper documentation but I fail to see how this could be remedied. Hence the feature request:
Would it make sense to add a new setting, let’s call it maybe [manual_probe] max_position_endstop_offset = <offset> that, if present, would make both G-Code commands to also update position_max, the same way they update position_endstop? If setting is not present, it will behave the same way as it currently does – only updating the position_endstop. If present, the new position_max will be new position_endstop + max_position_endstop_offset.
Does it sound reasonable?