Browse Source

Clean up LCD print, align (#15498)

ANMay-ru 4 years ago
parent
commit
b119c14017

+ 7
- 7
Marlin/src/lcd/menu/menu_mixer.cpp View File

@@ -53,7 +53,7 @@
53 53
       strcpy_P(tmp, GET_TEXT(MSG_START_Z));
54 54
       sprintf_P(tmp + strlen(tmp), PSTR(": %4d.%d mm"), int(mixer.gradient.start_z), int(mixer.gradient.start_z * 10) % 10);
55 55
       SETCURSOR(2, (LCD_HEIGHT - 1) / 2);
56
-      LCDPRINT(tmp);
56
+      lcd_put_u8str(tmp);
57 57
     }
58 58
 
59 59
     if (ui.lcd_clicked) {
@@ -79,7 +79,7 @@
79 79
       strcpy_P(tmp, GET_TEXT(MSG_END_Z));
80 80
       sprintf_P(tmp + strlen(tmp), PSTR(": %4d.%d mm"), int(mixer.gradient.end_z), int(mixer.gradient.end_z * 10) % 10);
81 81
       SETCURSOR(2, (LCD_HEIGHT - 1) / 2);
82
-      LCDPRINT(tmp);
82
+      lcd_put_u8str(tmp);
83 83
     }
84 84
 
85 85
     if (ui.lcd_clicked) {
@@ -106,13 +106,13 @@
106 106
     SUBMENU(MSG_START_Z, lcd_mixer_gradient_z_start_edit);
107 107
     MENU_ITEM_ADDON_START(9);
108 108
       sprintf_P(tmp, PSTR("%4d.%d mm"), int(mixer.gradient.start_z), int(mixer.gradient.start_z * 10) % 10);
109
-      LCDPRINT(tmp);
109
+      lcd_put_u8str(tmp);
110 110
     MENU_ITEM_ADDON_END();
111 111
 
112 112
     SUBMENU(MSG_END_Z, lcd_mixer_gradient_z_end_edit);
113 113
     MENU_ITEM_ADDON_START(9);
114 114
       sprintf_P(tmp, PSTR("%4d.%d mm"), int(mixer.gradient.end_z), int(mixer.gradient.end_z * 10) % 10);
115
-      LCDPRINT(tmp);
115
+      lcd_put_u8str(tmp);
116 116
     MENU_ITEM_ADDON_END();
117 117
 
118 118
     END_MENU();
@@ -129,7 +129,7 @@ static uint8_t v_index;
129 129
     lcd_put_u8str_P(GET_TEXT(MSG_MIX));
130 130
     SETCURSOR(LCD_WIDTH - 9, y);
131 131
     sprintf_P(tmp, PSTR("%3d%% %3d%%"), int(mixer.mix[0]), int(mixer.mix[1]));
132
-    LCDPRINT(tmp);
132
+    lcd_put_u8str(tmp);
133 133
   }
134 134
 #endif
135 135
 
@@ -283,7 +283,7 @@ void menu_mixer() {
283 283
     MENU_ITEM_ADDON_START(10);
284 284
       mixer.update_mix_from_vtool();
285 285
       sprintf_P(tmp, PSTR("%3d;%3d%%"), int(mixer.mix[0]), int(mixer.mix[1]));
286
-      LCDPRINT(tmp);
286
+      lcd_put_u8str(tmp);
287 287
     MENU_ITEM_ADDON_END();
288 288
     ACTION_ITEM(MSG_TOGGLE_MIX, _lcd_mixer_toggle_mix);
289 289
   }
@@ -299,7 +299,7 @@ void menu_mixer() {
299 299
     SUBMENU(MSG_GRADIENT, lcd_mixer_edit_gradient_menu);
300 300
     MENU_ITEM_ADDON_START(10);
301 301
       sprintf_P(tmp, PSTR("T%i->T%i"), mixer.gradient.start_vtool, mixer.gradient.end_vtool);
302
-      LCDPRINT(tmp);
302
+      lcd_put_u8str(tmp);
303 303
     MENU_ITEM_ADDON_END();
304 304
     ACTION_ITEM(MSG_REVERSE_GRADIENT, _lcd_mixer_reverse_gradient);
305 305
   }

+ 2
- 2
Marlin/src/lcd/menu/menu_motion.cpp View File

@@ -262,13 +262,13 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
262 262
     SUBMENU(MSG_MOVE_01MM, [](){ _goto_manual_move( 0.1f); });
263 263
     if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
264 264
       SUBMENU_P(PSTR(""), []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
265
-      MENU_ITEM_ADDON_START(1);
265
+      MENU_ITEM_ADDON_START(0);
266 266
         char tmp[20], numstr[10];
267 267
         // Determine digits needed right of decimal
268 268
         const uint8_t digs = !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 1000 - int((SHORT_MANUAL_Z_MOVE) * 1000)) ? 4 :
269 269
                              !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) *  100 - int((SHORT_MANUAL_Z_MOVE) *  100)) ? 3 : 2;
270 270
         sprintf_P(tmp, GET_TEXT(MSG_MOVE_Z_DIST), dtostrf(SHORT_MANUAL_Z_MOVE, 1, digs, numstr));
271
-        LCDPRINT(tmp);
271
+        lcd_put_u8str(tmp);
272 272
       MENU_ITEM_ADDON_END();
273 273
     }
274 274
   }

+ 0
- 4
Marlin/src/lcd/ultralcd.h View File

@@ -67,13 +67,9 @@
67 67
     #if HAS_GRAPHICAL_LCD
68 68
       #define SETCURSOR(col, row) lcd_moveto(col * (MENU_FONT_WIDTH), (row + 1) * (MENU_FONT_HEIGHT))
69 69
       #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_PIXEL_WIDTH - (len) * (MENU_FONT_WIDTH), (row + 1) * (MENU_FONT_HEIGHT))
70
-      #define LCDPRINT(p) u8g.print(p)
71
-      #define LCDWRITE(c) u8g.print(c)
72 70
     #else
73 71
       #define SETCURSOR(col, row) lcd_moveto(col, row)
74 72
       #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_WIDTH - (len), row)
75
-      #define LCDPRINT(p) lcd_put_u8str(p)
76
-      #define LCDWRITE(c) lcd_put_wchar(c)
77 73
     #endif
78 74
 
79 75
     #include "lcdprint.h"

Loading…
Cancel
Save