|
@ -1035,46 +1035,21 @@ void kill_screen(const char* lcd_msg) { |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEPPING) |
|
|
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY) |
|
|
|
|
|
|
|
|
void _lcd_babystep(const AxisEnum axis, const char* msg) { |
|
|
|
|
|
if (lcd_clicked) { return lcd_goto_previous_menu_no_defer(); } |
|
|
|
|
|
ENCODER_DIRECTION_NORMAL(); |
|
|
|
|
|
if (encoderPosition) { |
|
|
|
|
|
const int16_t babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR); |
|
|
|
|
|
encoderPosition = 0; |
|
|
|
|
|
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; |
|
|
|
|
|
thermalManager.babystep_axis(axis, babystep_increment); |
|
|
|
|
|
babysteps_done += babystep_increment; |
|
|
|
|
|
} |
|
|
|
|
|
if (lcdDrawUpdate) |
|
|
|
|
|
lcd_implementation_drawedit(msg, ftostr43sign(planner.steps_to_mm[axis] * babysteps_done)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_XY) |
|
|
|
|
|
void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEP_X)); } |
|
|
|
|
|
void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEP_Y)); } |
|
|
|
|
|
void lcd_babystep_x() { lcd_goto_screen(_lcd_babystep_x); babysteps_done = 0; defer_return_to_status = true; } |
|
|
|
|
|
void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; } |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) |
|
|
|
|
|
|
|
|
|
|
|
void _lcd_zoffset_overlay_gfx(const float in_zoffset) { |
|
|
void _lcd_zoffset_overlay_gfx(const float zvalue) { |
|
|
// Determine whether the user is raising or lowering the nozzle.
|
|
|
// Determine whether the user is raising or lowering the nozzle.
|
|
|
int8_t dir = 0; |
|
|
static int8_t dir; |
|
|
static float old_zprobe_zoffset = 0; |
|
|
static float old_zvalue; |
|
|
if (in_zoffset != old_zprobe_zoffset) { |
|
|
if (zvalue != old_zvalue) { |
|
|
dir = (in_zoffset > old_zprobe_zoffset) ? 1 : (in_zoffset == 0) ? 0 : -1; |
|
|
dir = zvalue ? zvalue < old_zvalue ? -1 : 1 : 0; |
|
|
old_zprobe_zoffset = in_zoffset; |
|
|
old_zvalue = zvalue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_GFX_REVERSE) |
|
|
#if ENABLED(OVERLAY_GFX_REVERSE) |
|
|
const unsigned char *rot_up = ccw_bmp; |
|
|
const unsigned char *rot_up = ccw_bmp, *rot_down = cw_bmp; |
|
|
const unsigned char *rot_down = cw_bmp; |
|
|
|
|
|
#else |
|
|
#else |
|
|
const unsigned char *rot_up = cw_bmp; |
|
|
const unsigned char *rot_up = cw_bmp, *rot_down = ccw_bmp; |
|
|
const unsigned char *rot_down = ccw_bmp; |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(USE_BIG_EDIT_FONT) |
|
|
#if ENABLED(USE_BIG_EDIT_FONT) |
|
@ -1096,7 +1071,30 @@ void kill_screen(const char* lcd_msg) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || ENABLE_MESH_EDIT_GFX_OVERLAY
|
|
|
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEPPING) |
|
|
|
|
|
|
|
|
|
|
|
void _lcd_babystep(const AxisEnum axis, const char* msg) { |
|
|
|
|
|
if (lcd_clicked) { return lcd_goto_previous_menu_no_defer(); } |
|
|
|
|
|
ENCODER_DIRECTION_NORMAL(); |
|
|
|
|
|
if (encoderPosition) { |
|
|
|
|
|
const int16_t babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR); |
|
|
|
|
|
encoderPosition = 0; |
|
|
|
|
|
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; |
|
|
|
|
|
thermalManager.babystep_axis(axis, babystep_increment); |
|
|
|
|
|
babysteps_done += babystep_increment; |
|
|
|
|
|
} |
|
|
|
|
|
if (lcdDrawUpdate) |
|
|
|
|
|
lcd_implementation_drawedit(msg, ftostr43sign(planner.steps_to_mm[axis] * babysteps_done)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_XY) |
|
|
|
|
|
void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEP_X)); } |
|
|
|
|
|
void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEP_Y)); } |
|
|
|
|
|
void lcd_babystep_x() { lcd_goto_screen(_lcd_babystep_x); babysteps_done = 0; defer_return_to_status = true; } |
|
|
|
|
|
void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; } |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) |
|
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) |
|
|
|
|
|
|
|
@ -1157,7 +1155,7 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
|
|
|
|
|
if (lcdDrawUpdate) |
|
|
if (lcdDrawUpdate) |
|
|
lcd_implementation_drawedit(msg, ftostr43sign(mesh_edit_value)); |
|
|
lcd_implementation_drawedit(msg, ftostr43sign(mesh_edit_value)); |
|
|
#if ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) |
|
|
#if ENABLED(MESH_EDIT_GFX_OVERLAY) |
|
|
_lcd_zoffset_overlay_gfx(mesh_edit_value); |
|
|
_lcd_zoffset_overlay_gfx(mesh_edit_value); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
@ -1194,7 +1192,6 @@ void kill_screen(const char* lcd_msg) { |
|
|
|
|
|
|
|
|
#endif // AUTO_BED_LEVELING_UBL
|
|
|
#endif // AUTO_BED_LEVELING_UBL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* Watch temperature callbacks |
|
|
* Watch temperature callbacks |
|
|
*/ |
|
|
*/ |
|
|