|
@ -1035,6 +1035,44 @@ void kill_screen(const char* lcd_msg) { |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY) |
|
|
|
|
|
|
|
|
|
|
|
void _lcd_zoffset_overlay_gfx(const float zvalue) { |
|
|
|
|
|
// Determine whether the user is raising or lowering the nozzle.
|
|
|
|
|
|
static int8_t dir; |
|
|
|
|
|
static float old_zvalue; |
|
|
|
|
|
if (zvalue != old_zvalue) { |
|
|
|
|
|
dir = zvalue ? zvalue < old_zvalue ? -1 : 1 : 0; |
|
|
|
|
|
old_zvalue = zvalue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(OVERLAY_GFX_REVERSE) |
|
|
|
|
|
const unsigned char *rot_up = ccw_bmp, *rot_down = cw_bmp; |
|
|
|
|
|
#else |
|
|
|
|
|
const unsigned char *rot_up = cw_bmp, *rot_down = ccw_bmp; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(USE_BIG_EDIT_FONT) |
|
|
|
|
|
const int left = 0, right = 45, nozzle = 95; |
|
|
|
|
|
#else |
|
|
|
|
|
const int left = 5, right = 90, nozzle = 60; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// Draw a representation of the nozzle
|
|
|
|
|
|
if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); |
|
|
|
|
|
if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp); |
|
|
|
|
|
|
|
|
|
|
|
// Draw cw/ccw indicator and up/down arrows.
|
|
|
|
|
|
if (PAGE_CONTAINS(47,62)) { |
|
|
|
|
|
u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down); |
|
|
|
|
|
u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up); |
|
|
|
|
|
u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp); |
|
|
|
|
|
u8g.drawBitmapP(left + 20, 49 - dir, 2, 13, down_arrow_bmp); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEPPING) |
|
|
#if ENABLED(BABYSTEPPING) |
|
|
|
|
|
|
|
|
void _lcd_babystep(const AxisEnum axis, const char* msg) { |
|
|
void _lcd_babystep(const AxisEnum axis, const char* msg) { |
|
@ -1058,46 +1096,6 @@ void kill_screen(const char* lcd_msg) { |
|
|
void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); 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 |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) |
|
|
|
|
|
|
|
|
|
|
|
void _lcd_zoffset_overlay_gfx(const float in_zoffset) { |
|
|
|
|
|
// Determine whether the user is raising or lowering the nozzle.
|
|
|
|
|
|
int8_t dir = 0; |
|
|
|
|
|
static float old_zprobe_zoffset = 0; |
|
|
|
|
|
if (in_zoffset != old_zprobe_zoffset) { |
|
|
|
|
|
dir = (in_zoffset > old_zprobe_zoffset) ? 1 : (in_zoffset == 0) ? 0 : -1; |
|
|
|
|
|
old_zprobe_zoffset = in_zoffset; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_GFX_REVERSE) |
|
|
|
|
|
const unsigned char *rot_up = ccw_bmp; |
|
|
|
|
|
const unsigned char *rot_down = cw_bmp; |
|
|
|
|
|
#else |
|
|
|
|
|
const unsigned char *rot_up = cw_bmp; |
|
|
|
|
|
const unsigned char *rot_down = ccw_bmp; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(USE_BIG_EDIT_FONT) |
|
|
|
|
|
const int left = 0, right = 45, nozzle = 95; |
|
|
|
|
|
#else |
|
|
|
|
|
const int left = 5, right = 90, nozzle = 60; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// Draw a representation of the nozzle
|
|
|
|
|
|
if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); |
|
|
|
|
|
if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp); |
|
|
|
|
|
|
|
|
|
|
|
// Draw cw/ccw indicator and up/down arrows.
|
|
|
|
|
|
if (PAGE_CONTAINS(47,62)) { |
|
|
|
|
|
u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down); |
|
|
|
|
|
u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up); |
|
|
|
|
|
u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp); |
|
|
|
|
|
u8g.drawBitmapP(left + 20, 49 - dir, 2, 13, down_arrow_bmp); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || ENABLE_MESH_EDIT_GFX_OVERLAY
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) |
|
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) |
|
|
|
|
|
|
|
|
void lcd_babystep_zoffset() { |
|
|
void lcd_babystep_zoffset() { |
|
@ -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 |
|
|
*/ |
|
|
*/ |
|
|