No retroactive changes with M851 Z
If using babystep to adjust the Z probe offset, the axis will move and the mesh will be updated at the same time, causing a doubling of the Z offset over the rest of the print. To correct for this, the current Z position would need to be modified in the opposite direction, canceling out the additional Z offset added to the mesh. This would be confusing to users, and moreover it would not be accurate without also taking the current Z fade level and current Z height into account. It might make sense to change the mesh in the case where no babystepping is taking place, but this could be considered an undesirable side-effect of changing the `zprobe_zoffset`. One way to remedy this would be to return to storing the mesh with `zprobe_zoffset` included, then subtracting `zprobe_zoffset` from the returned Z value. Thus, a babystep moving the Z axis up 1mm would subtract 1 from `zprobe_zoffset` while adding 1 to all mesh Z values. Without including the `zprobe_zoffset` in the `z_values` there is no safe way to alter the mesh in conjunction with babystepping, although it's fine without it.
This commit is contained in:
@ -1100,8 +1100,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
ENCODER_DIRECTION_NORMAL();
|
||||
if (encoderPosition) {
|
||||
const int16_t babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR);
|
||||
encoderPosition = 0;
|
||||
|
||||
const float new_zoffset = zprobe_zoffset + planner.steps_to_mm[Z_AXIS] * babystep_increment;
|
||||
if (WITHIN(new_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
|
||||
|
||||
@ -1109,9 +1107,9 @@ void kill_screen(const char* lcd_msg) {
|
||||
thermalManager.babystep_axis(Z_AXIS, babystep_increment);
|
||||
|
||||
zprobe_zoffset = new_zoffset;
|
||||
refresh_zprobe_zoffset(true);
|
||||
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
|
||||
}
|
||||
encoderPosition = 0;
|
||||
}
|
||||
if (lcdDrawUpdate) {
|
||||
lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
|
||||
@ -1678,11 +1676,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
static void lcd_load_settings() { lcd_completion_feedback(settings.load()); }
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE && DISABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
static void lcd_refresh_zprobe_zoffset() { refresh_zprobe_zoffset(); }
|
||||
#endif
|
||||
|
||||
|
||||
#if ENABLED(LEVEL_BED_CORNERS)
|
||||
|
||||
/**
|
||||
@ -2000,7 +1993,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
|
||||
#elif HAS_BED_PROBE
|
||||
MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, lcd_refresh_zprobe_zoffset);
|
||||
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
|
||||
#endif
|
||||
|
||||
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
|
||||
@ -3647,7 +3640,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
|
||||
#elif HAS_BED_PROBE
|
||||
MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, lcd_refresh_zprobe_zoffset);
|
||||
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
|
||||
#endif
|
||||
|
||||
// M203 / M205 - Feedrate items
|
||||
|
Reference in New Issue
Block a user