1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Allow lcd_implementation_drawedit to draw a message

This commit is contained in:
Scott Lahteine 2016-04-01 14:10:04 -07:00
parent 0114cf1101
commit 92882fcc51
3 changed files with 12 additions and 8 deletions

View File

@ -562,9 +562,11 @@ void lcd_implementation_drawedit(const char* pstr, const char* value) {
u8g.setPrintPos(0, rowHeight + kHalfChar);
lcd_printPGM(pstr);
lcd_print(':');
u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
lcd_print(value);
if (value != NULL) {
lcd_print(':');
u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
lcd_print(value);
}
}
#if ENABLED(SDSUPPORT)

View File

@ -536,7 +536,7 @@ void lcd_set_home_offsets() {
babystepsTodo[axis] += distance;
#endif
}
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, "");
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, NULL);
if (LCD_CLICKED) lcd_goto_previous_menu();
}
@ -2482,7 +2482,7 @@ char* ftostr52(const float& x) {
* MBL Move to mesh starting point
*/
static void _lcd_level_bed_homing() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), MSG_LEVEL_BED_HOMING);
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ " MSG_LEVEL_BED_HOMING), NULL);
if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);

View File

@ -863,9 +863,11 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t
void lcd_implementation_drawedit(const char* pstr, const char* value) {
lcd.setCursor(1, 1);
lcd_printPGM(pstr);
lcd.print(':');
lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
lcd_print(value);
if (value != NULL) {
lcd.print(':');
lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
lcd_print(value);
}
}
#if ENABLED(SDSUPPORT)