Browse Source

Allow lcd_implementation_drawedit to draw a message

Scott Lahteine 9 years ago
parent
commit
92882fcc51

+ 5
- 3
Marlin/dogm_lcd_implementation.h View File

562
 
562
 
563
   u8g.setPrintPos(0, rowHeight + kHalfChar);
563
   u8g.setPrintPos(0, rowHeight + kHalfChar);
564
   lcd_printPGM(pstr);
564
   lcd_printPGM(pstr);
565
-  lcd_print(':');
566
-  u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
567
-  lcd_print(value);
565
+  if (value != NULL) {
566
+    lcd_print(':');
567
+    u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
568
+    lcd_print(value);
569
+  }
568
 }
570
 }
569
 
571
 
570
 #if ENABLED(SDSUPPORT)
572
 #if ENABLED(SDSUPPORT)

+ 2
- 2
Marlin/ultralcd.cpp View File

536
         babystepsTodo[axis] += distance;
536
         babystepsTodo[axis] += distance;
537
       #endif
537
       #endif
538
     }
538
     }
539
-    if (lcdDrawUpdate) lcd_implementation_drawedit(msg, "");
539
+    if (lcdDrawUpdate) lcd_implementation_drawedit(msg, NULL);
540
     if (LCD_CLICKED) lcd_goto_previous_menu();
540
     if (LCD_CLICKED) lcd_goto_previous_menu();
541
   }
541
   }
542
 
542
 
2482
    * MBL Move to mesh starting point
2482
    * MBL Move to mesh starting point
2483
    */
2483
    */
2484
   static void _lcd_level_bed_homing() {
2484
   static void _lcd_level_bed_homing() {
2485
-    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), MSG_LEVEL_BED_HOMING);
2485
+    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ " MSG_LEVEL_BED_HOMING), NULL);
2486
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
2486
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
2487
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2487
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2488
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
2488
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);

+ 5
- 3
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

863
 void lcd_implementation_drawedit(const char* pstr, const char* value) {
863
 void lcd_implementation_drawedit(const char* pstr, const char* value) {
864
   lcd.setCursor(1, 1);
864
   lcd.setCursor(1, 1);
865
   lcd_printPGM(pstr);
865
   lcd_printPGM(pstr);
866
-  lcd.print(':');
867
-  lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
868
-  lcd_print(value);
866
+  if (value != NULL) {
867
+    lcd.print(':');
868
+    lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
869
+    lcd_print(value);
870
+  }
869
 }
871
 }
870
 
872
 
871
 #if ENABLED(SDSUPPORT)
873
 #if ENABLED(SDSUPPORT)

Loading…
Cancel
Save