|
@@ -421,7 +421,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
|
421
|
421
|
void lcd_erase_line(const int16_t line) {
|
422
|
422
|
lcd.setCursor(0, line);
|
423
|
423
|
for (uint8_t i = LCD_WIDTH + 1; --i;)
|
424
|
|
- lcd.print(' ');
|
|
424
|
+ lcd.write(' ');
|
425
|
425
|
}
|
426
|
426
|
|
427
|
427
|
// Scroll the PSTR 'text' in a 'len' wide field for 'time' milliseconds at position col,line
|
|
@@ -438,9 +438,9 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
|
438
|
438
|
|
439
|
439
|
static void logo_lines(const char* const extra) {
|
440
|
440
|
int16_t indent = (LCD_WIDTH - 8 - lcd_strlen_P(extra)) / 2;
|
441
|
|
- lcd.setCursor(indent, 0); lcd.print('\x00'); lcd_printPGM(PSTR( "------" )); lcd.print('\x01');
|
|
441
|
+ lcd.setCursor(indent, 0); lcd.print('\x00'); lcd_printPGM(PSTR( "------" )); lcd.write('\x01');
|
442
|
442
|
lcd.setCursor(indent, 1); lcd_printPGM(PSTR("|Marlin|")); lcd_printPGM(extra);
|
443
|
|
- lcd.setCursor(indent, 2); lcd.print('\x02'); lcd_printPGM(PSTR( "------" )); lcd.print('\x03');
|
|
443
|
+ lcd.setCursor(indent, 2); lcd.write('\x02'); lcd_printPGM(PSTR( "------" )); lcd.write('\x03');
|
444
|
444
|
}
|
445
|
445
|
|
446
|
446
|
void bootscreen() {
|
|
@@ -581,11 +581,11 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
|
581
|
581
|
lcd_printPGM(pstr);
|
582
|
582
|
else {
|
583
|
583
|
if (!axis_homed[axis])
|
584
|
|
- lcd.print('?');
|
|
584
|
+ lcd.write('?');
|
585
|
585
|
else {
|
586
|
586
|
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
587
|
587
|
if (!axis_known_position[axis])
|
588
|
|
- lcd.print(' ');
|
|
588
|
+ lcd.write(' ');
|
589
|
589
|
else
|
590
|
590
|
#endif
|
591
|
591
|
lcd_printPGM(pstr);
|
|
@@ -602,7 +602,7 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, co
|
602
|
602
|
if (prefix >= 0) lcd.print(prefix);
|
603
|
603
|
|
604
|
604
|
lcd.print(itostr3(t1 + 0.5));
|
605
|
|
- lcd.print('/');
|
|
605
|
+ lcd.write('/');
|
606
|
606
|
|
607
|
607
|
#if HEATER_IDLE_HANDLER
|
608
|
608
|
const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
|
|
@@ -614,9 +614,9 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, co
|
614
|
614
|
);
|
615
|
615
|
|
616
|
616
|
if (!blink && is_idle) {
|
617
|
|
- lcd.print(' ');
|
618
|
|
- if (t2 >= 10) lcd.print(' ');
|
619
|
|
- if (t2 >= 100) lcd.print(' ');
|
|
617
|
+ lcd.write(' ');
|
|
618
|
+ if (t2 >= 10) lcd.write(' ');
|
|
619
|
+ if (t2 >= 100) lcd.write(' ');
|
620
|
620
|
}
|
621
|
621
|
else
|
622
|
622
|
#endif
|
|
@@ -624,8 +624,8 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, co
|
624
|
624
|
|
625
|
625
|
if (prefix >= 0) {
|
626
|
626
|
lcd.print((char)LCD_DEGREE_CHAR);
|
627
|
|
- lcd.print(' ');
|
628
|
|
- if (t2 < 10) lcd.print(' ');
|
|
627
|
+ lcd.write(' ');
|
|
628
|
+ if (t2 < 10) lcd.write(' ');
|
629
|
629
|
}
|
630
|
630
|
}
|
631
|
631
|
|
|
@@ -742,7 +742,7 @@ static void lcd_implementation_status_screen() {
|
742
|
742
|
lcd.print(itostr3(card.percentDone()));
|
743
|
743
|
else
|
744
|
744
|
lcd_printPGM(PSTR("---"));
|
745
|
|
- lcd.print('%');
|
|
745
|
+ lcd.write('%');
|
746
|
746
|
#endif // SDSUPPORT
|
747
|
747
|
|
748
|
748
|
#else // LCD_WIDTH >= 20
|
|
@@ -764,7 +764,7 @@ static void lcd_implementation_status_screen() {
|
764
|
764
|
_draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
|
765
|
765
|
lcd.print(ftostr4sign(current_position[X_AXIS]));
|
766
|
766
|
|
767
|
|
- lcd.print(' ');
|
|
767
|
+ lcd.write(' ');
|
768
|
768
|
|
769
|
769
|
_draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
|
770
|
770
|
lcd.print(ftostr4sign(current_position[Y_AXIS]));
|
|
@@ -788,7 +788,7 @@ static void lcd_implementation_status_screen() {
|
788
|
788
|
lcd.setCursor(0, 2);
|
789
|
789
|
lcd.print((char)LCD_FEEDRATE_CHAR);
|
790
|
790
|
lcd.print(itostr3(feedrate_percentage));
|
791
|
|
- lcd.print('%');
|
|
791
|
+ lcd.write('%');
|
792
|
792
|
|
793
|
793
|
#if LCD_WIDTH >= 20 && ENABLED(SDSUPPORT)
|
794
|
794
|
|
|
@@ -798,7 +798,7 @@ static void lcd_implementation_status_screen() {
|
798
|
798
|
lcd.print(itostr3(card.percentDone()));
|
799
|
799
|
else
|
800
|
800
|
lcd_printPGM(PSTR("---"));
|
801
|
|
- lcd.print('%');
|
|
801
|
+ lcd.write('%');
|
802
|
802
|
|
803
|
803
|
#endif // LCD_WIDTH >= 20 && SDSUPPORT
|
804
|
804
|
|
|
@@ -837,7 +837,7 @@ static void lcd_implementation_status_screen() {
|
837
|
837
|
lcd.print(ftostr12ns(filament_width_meas));
|
838
|
838
|
lcd_printPGM(PSTR(" V"));
|
839
|
839
|
lcd.print(itostr3(100.0 * volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]));
|
840
|
|
- lcd.print('%');
|
|
840
|
+ lcd.write('%');
|
841
|
841
|
return;
|
842
|
842
|
}
|
843
|
843
|
|
|
@@ -858,10 +858,10 @@ static void lcd_implementation_status_screen() {
|
858
|
858
|
lcd_print_utf(stat); // The string leaves space
|
859
|
859
|
chars -= slen - status_scroll_pos; // Amount of space left
|
860
|
860
|
}
|
861
|
|
- lcd.print('.'); // Always at 1+ spaces left, draw a dot
|
|
861
|
+ lcd.write('.'); // Always at 1+ spaces left, draw a dot
|
862
|
862
|
if (--chars) {
|
863
|
863
|
if (status_scroll_pos < slen + 1) // Draw a second dot if there's space
|
864
|
|
- --chars, lcd.print('.');
|
|
864
|
+ --chars, lcd.write('.');
|
865
|
865
|
if (chars) lcd_print_utf(lcd_status_message, chars); // Print a second copy of the message
|
866
|
866
|
}
|
867
|
867
|
}
|
|
@@ -897,7 +897,7 @@ static void lcd_implementation_status_screen() {
|
897
|
897
|
lcd.setCursor(0, row);
|
898
|
898
|
if (center && !valstr) {
|
899
|
899
|
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
900
|
|
- while (--pad >= 0) { lcd.print(' '); n--; }
|
|
900
|
+ while (--pad >= 0) { lcd.write(' '); n--; }
|
901
|
901
|
}
|
902
|
902
|
while (n > 0 && (c = pgm_read_byte(pstr))) {
|
903
|
903
|
n -= charset_mapper(c);
|
|
@@ -907,7 +907,7 @@ static void lcd_implementation_status_screen() {
|
907
|
907
|
n -= charset_mapper(c);
|
908
|
908
|
valstr++;
|
909
|
909
|
}
|
910
|
|
- while (n-- > 0) lcd.print(' ');
|
|
910
|
+ while (n-- > 0) lcd.write(' ');
|
911
|
911
|
}
|
912
|
912
|
|
913
|
913
|
static void lcd_implementation_drawmenu_generic(const bool sel, const uint8_t row, const char* pstr, const char pre_char, const char post_char) {
|
|
@@ -919,7 +919,7 @@ static void lcd_implementation_status_screen() {
|
919
|
919
|
n -= charset_mapper(c);
|
920
|
920
|
pstr++;
|
921
|
921
|
}
|
922
|
|
- while (n--) lcd.print(' ');
|
|
922
|
+ while (n--) lcd.write(' ');
|
923
|
923
|
lcd.print(post_char);
|
924
|
924
|
}
|
925
|
925
|
|
|
@@ -932,8 +932,8 @@ static void lcd_implementation_status_screen() {
|
932
|
932
|
n -= charset_mapper(c);
|
933
|
933
|
pstr++;
|
934
|
934
|
}
|
935
|
|
- lcd.print(':');
|
936
|
|
- while (n--) lcd.print(' ');
|
|
935
|
+ lcd.write(':');
|
|
936
|
+ while (n--) lcd.write(' ');
|
937
|
937
|
lcd_print(data);
|
938
|
938
|
}
|
939
|
939
|
static void lcd_implementation_drawmenu_setting_edit_generic_P(const bool sel, const uint8_t row, const char* pstr, const char pre_char, const char* const data) {
|
|
@@ -945,8 +945,8 @@ static void lcd_implementation_status_screen() {
|
945
|
945
|
n -= charset_mapper(c);
|
946
|
946
|
pstr++;
|
947
|
947
|
}
|
948
|
|
- lcd.print(':');
|
949
|
|
- while (n--) lcd.print(' ');
|
|
948
|
+ lcd.write(':');
|
|
949
|
+ while (n--) lcd.write(' ');
|
950
|
950
|
lcd_printPGM(data);
|
951
|
951
|
}
|
952
|
952
|
|
|
@@ -981,10 +981,10 @@ static void lcd_implementation_status_screen() {
|
981
|
981
|
lcd.setCursor(1, 1);
|
982
|
982
|
lcd_printPGM(pstr);
|
983
|
983
|
if (value != NULL) {
|
984
|
|
- lcd.print(':');
|
|
984
|
+ lcd.write(':');
|
985
|
985
|
const uint8_t valrow = (lcd_strlen_P(pstr) + 1 + lcd_strlen(value) + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit
|
986
|
986
|
lcd.setCursor((LCD_WIDTH - 1) - (lcd_strlen(value) + 1), valrow); // Right-justified, padded by spaces
|
987
|
|
- lcd.print(' '); // overwrite char if value gets shorter
|
|
987
|
+ lcd.write(' '); // overwrite char if value gets shorter
|
988
|
988
|
lcd_print(value);
|
989
|
989
|
}
|
990
|
990
|
}
|
|
@@ -1005,7 +1005,7 @@ static void lcd_implementation_status_screen() {
|
1005
|
1005
|
n -= charset_mapper(c);
|
1006
|
1006
|
filename++;
|
1007
|
1007
|
}
|
1008
|
|
- while (n--) lcd.print(' ');
|
|
1008
|
+ while (n--) lcd.write(' ');
|
1009
|
1009
|
lcd.print(post_char);
|
1010
|
1010
|
}
|
1011
|
1011
|
|
|
@@ -1083,7 +1083,7 @@ static void lcd_implementation_status_screen() {
|
1083
|
1083
|
|
1084
|
1084
|
#endif // LCD_HAS_STATUS_INDICATORS
|
1085
|
1085
|
|
1086
|
|
-#ifdef AUTO_BED_LEVELING_UBL
|
|
1086
|
+#if ENABLED(AUTO_BED_LEVELING_UBL)
|
1087
|
1087
|
|
1088
|
1088
|
/*
|
1089
|
1089
|
* These are just basic data for the 20x4 LCD work that
|
|
@@ -1111,75 +1111,10 @@ static void lcd_implementation_status_screen() {
|
1111
|
1111
|
| +-------+ Z:00.000|
|
1112
|
1112
|
*/
|
1113
|
1113
|
|
1114
|
|
- void _lcd_ubl_plot_HD44780(uint8_t x_plot, uint8_t y_plot) {
|
1115
|
|
-
|
1116
|
|
- uint8_t lcd_w_pos;
|
1117
|
|
-
|
1118
|
|
- #if LCD_WIDTH < 20
|
1119
|
|
- lcd_w_pos = 8;
|
1120
|
|
- #else
|
1121
|
|
- lcd_w_pos = 12;
|
1122
|
|
- #endif
|
1123
|
|
-
|
1124
|
|
- #if LCD_HEIGHT < 3
|
1125
|
|
-
|
1126
|
|
- /*
|
1127
|
|
- *** 16x2 or 20x2 display **
|
1128
|
|
- *
|
1129
|
|
- * Show X and Y positions
|
1130
|
|
- */
|
1131
|
|
- #if LCD_WIDTH < 20
|
1132
|
|
- lcd.setCursor(0, 0);
|
1133
|
|
- lcd.print("X");
|
1134
|
|
- #else
|
1135
|
|
- lcd.setCursor(1, 0);
|
1136
|
|
- lcd.print("X:");
|
1137
|
|
- #endif
|
1138
|
|
- lcd.print(ftostr32(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]))));
|
1139
|
|
-
|
1140
|
|
- lcd.setCursor(lcd_w_pos, 0);
|
1141
|
|
- #if LCD_WIDTH < 20
|
1142
|
|
- lcd.print("Y");
|
1143
|
|
- #else
|
1144
|
|
- lcd.print("Y:");
|
1145
|
|
- #endif
|
1146
|
|
- lcd.print(ftostr32(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]))));
|
1147
|
|
-
|
1148
|
|
- /*
|
1149
|
|
- * Print plot position
|
1150
|
|
- */
|
1151
|
|
- #if LCD_WIDTH < 20
|
1152
|
|
- lcd.setCursor(0, 1);
|
1153
|
|
- #else
|
1154
|
|
- lcd.setCursor(1, 1);
|
1155
|
|
- #endif
|
1156
|
|
- lcd.print("(");
|
1157
|
|
- lcd.print(x_plot);
|
1158
|
|
- lcd.print(",");
|
1159
|
|
- lcd.print(y_plot);
|
1160
|
|
- lcd.print(")");
|
1161
|
|
-
|
1162
|
|
- /*
|
1163
|
|
- * Print Z values
|
1164
|
|
- */
|
1165
|
|
- lcd.setCursor(lcd_w_pos, 1);
|
1166
|
|
- #if LCD_WIDTH < 20
|
1167
|
|
- lcd.print("Z");
|
1168
|
|
- #else
|
1169
|
|
- lcd.print("Z:");
|
1170
|
|
- #endif
|
1171
|
|
- if (!isnan(ubl.z_values[x_plot][y_plot])) {
|
1172
|
|
- lcd.print(ftostr43sign(ubl.z_values[x_plot][y_plot]));
|
1173
|
|
- }
|
1174
|
|
- else {
|
1175
|
|
- lcd.print(" -----");
|
1176
|
|
- }
|
1177
|
|
-
|
1178
|
|
- #elif LCD_HEIGHT > 3
|
1179
|
|
-
|
|
1114
|
+ void lcd_set_ubl_map_plot_chars() {
|
|
1115
|
+ #if LCD_HEIGHT > 3
|
1180
|
1116
|
//#include "_ubl_lcd_map_characters.h"
|
1181
|
|
-
|
1182
|
|
- const static PROGMEM byte _lcd_box_top[8] = {
|
|
1117
|
+ const static byte _lcd_box_top[8] PROGMEM = {
|
1183
|
1118
|
B11111,
|
1184
|
1119
|
B00000,
|
1185
|
1120
|
B00000,
|
|
@@ -1189,8 +1124,7 @@ static void lcd_implementation_status_screen() {
|
1189
|
1124
|
B00000,
|
1190
|
1125
|
B00000
|
1191
|
1126
|
};
|
1192
|
|
-
|
1193
|
|
- const static PROGMEM byte _lcd_box_bottom[8] = {
|
|
1127
|
+ const static byte _lcd_box_bottom[8] PROGMEM = {
|
1194
|
1128
|
B00000,
|
1195
|
1129
|
B00000,
|
1196
|
1130
|
B00000,
|
|
@@ -1200,75 +1134,99 @@ static void lcd_implementation_status_screen() {
|
1200
|
1134
|
B00000,
|
1201
|
1135
|
B11111
|
1202
|
1136
|
};
|
1203
|
|
-
|
1204
|
|
- /*
|
1205
|
|
- * Draw the Mesh Map Box
|
1206
|
|
- */
|
1207
|
|
- // First create the box custom characters
|
1208
|
1137
|
createChar_P(1, _lcd_box_top);
|
1209
|
1138
|
createChar_P(2, _lcd_box_bottom);
|
|
1139
|
+ #endif
|
|
1140
|
+ }
|
|
1141
|
+
|
|
1142
|
+ void lcd_implementation_ubl_plot(const uint8_t x_plot, const uint8_t y_plot) {
|
|
1143
|
+
|
|
1144
|
+ #if LCD_WIDTH >= 20
|
|
1145
|
+ #define _LCD_W_POS 12
|
|
1146
|
+ #define _PLOT_X 1
|
|
1147
|
+ #define _MAP_X 3
|
|
1148
|
+ #define _LABEL(C,X,Y) lcd.setCursor(X, Y); lcd.print(C)
|
|
1149
|
+ #define _XLABEL(X,Y) _LABEL("X:",X,Y)
|
|
1150
|
+ #define _YLABEL(X,Y) _LABEL("Y:",X,Y)
|
|
1151
|
+ #define _ZLABEL(X,Y) _LABEL("Z:",X,Y)
|
|
1152
|
+ #else
|
|
1153
|
+ #define _LCD_W_POS 8
|
|
1154
|
+ #define _PLOT_X 0
|
|
1155
|
+ #define _MAP_X 1
|
|
1156
|
+ #define _LABEL(X,Y,C) lcd.setCursor(X, Y); lcd.write(C)
|
|
1157
|
+ #define _XLABEL(X,Y) _LABEL('X',X,Y)
|
|
1158
|
+ #define _YLABEL(X,Y) _LABEL('Y',X,Y)
|
|
1159
|
+ #define _ZLABEL(X,Y) _LABEL('Z',X,Y)
|
|
1160
|
+ #endif
|
|
1161
|
+
|
|
1162
|
+ #if LCD_HEIGHT <= 3 // 16x2 or 20x2 display
|
|
1163
|
+
|
|
1164
|
+ /**
|
|
1165
|
+ * Show X and Y positions
|
|
1166
|
+ */
|
|
1167
|
+ _XLABEL(_PLOT_X, 0);
|
|
1168
|
+ lcd.print(ftostr32(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]))));
|
|
1169
|
+
|
|
1170
|
+ _YLABEL(_LCD_W_POS, 0);
|
|
1171
|
+ lcd.print(ftostr32(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]))));
|
|
1172
|
+
|
|
1173
|
+ lcd.setCursor(_PLOT_X, 0);
|
|
1174
|
+
|
|
1175
|
+ #else // 16x4 or 20x4 display
|
1210
|
1176
|
|
1211
|
|
- // Draw the mesh map box
|
|
1177
|
+ /**
|
|
1178
|
+ * Draw the Mesh Map Box
|
|
1179
|
+ */
|
1212
|
1180
|
uint8_t m;
|
1213
|
|
-
|
1214
|
|
- #if LCD_WIDTH < 20
|
|
1181
|
+ lcd.setCursor(_MAP_X, 0); for (m = 0; m < 5; m++) lcd.write(1); // Top
|
|
1182
|
+ lcd.setCursor(_MAP_X, 3); for (m = 0; m < 5; m++) lcd.write(2); // Bottom
|
|
1183
|
+ for (m = 0; m <= 3; m++) {
|
|
1184
|
+ lcd.setCursor(2, m); lcd.write('|'); // Left
|
|
1185
|
+ lcd.setCursor(8, m); lcd.write('|'); // Right
|
|
1186
|
+ }
|
1215
|
1187
|
|
1216
|
|
- for(m = 1; m <= 5; m++) { lcd.setCursor(m, 0); lcd.write(1); } // Top
|
1217
|
|
- for(m = 1; m <= 5; m++) { lcd.setCursor(m, 3); lcd.write(2); } // Bottom
|
1218
|
|
- for(m = 0; m <= 3; m++) { lcd.setCursor(2, m); lcd.write('|'); } // Left
|
1219
|
|
- for(m = 0; m <= 3; m++) { lcd.setCursor(8, m); lcd.write('|'); } // Right
|
|
1188
|
+ lcd.setCursor(_LCD_W_POS, 0);
|
1220
|
1189
|
|
1221
|
|
- #else
|
1222
|
|
-
|
1223
|
|
- for(m = 3; m <= 7; m++) { lcd.setCursor(m, 0); lcd.write(1); } // Top
|
1224
|
|
- for(m = 3; m <= 7; m++) { lcd.setCursor(m, 3); lcd.write(2); } // Bottom
|
1225
|
|
- for(m = 0; m <= 3; m++) { lcd.setCursor(2, m); lcd.write('|'); } // Left
|
1226
|
|
- for(m = 0; m <= 3; m++) { lcd.setCursor(8, m); lcd.write('|'); } // Right
|
|
1190
|
+ #endif
|
1227
|
1191
|
|
1228
|
|
- #endif
|
1229
|
|
- /*
|
1230
|
|
- * Print plot position
|
|
1192
|
+ /**
|
|
1193
|
+ * Print plot position
|
|
1194
|
+ */
|
|
1195
|
+ lcd.write('(');
|
|
1196
|
+ lcd.print(x_plot);
|
|
1197
|
+ lcd.write(',');
|
|
1198
|
+ lcd.print(y_plot);
|
|
1199
|
+ lcd.write(')');
|
|
1200
|
+
|
|
1201
|
+ #if LCD_HEIGHT <= 3 // 16x2 or 20x2 display
|
|
1202
|
+
|
|
1203
|
+ /**
|
|
1204
|
+ * Print Z values
|
1231
|
1205
|
*/
|
1232
|
|
- lcd.setCursor(lcd_w_pos, 0);
|
1233
|
|
- lcd.print("(");
|
1234
|
|
- lcd.print(x_plot);
|
1235
|
|
- lcd.print(",");
|
1236
|
|
- lcd.print(y_plot);
|
1237
|
|
- lcd.print(")");
|
1238
|
|
-
|
1239
|
|
- /*
|
|
1206
|
+ _ZLABEL(_LCD_W_POS, 1);
|
|
1207
|
+ if (!isnan(ubl.z_values[x_plot][y_plot]))
|
|
1208
|
+ lcd.print(ftostr43sign(ubl.z_values[x_plot][y_plot]));
|
|
1209
|
+ else
|
|
1210
|
+ lcd_printPGM(PSTR(" -----"));
|
|
1211
|
+
|
|
1212
|
+ #else // 16x4 or 20x4 display
|
|
1213
|
+
|
|
1214
|
+ /**
|
1240
|
1215
|
* Show all values at right of screen
|
1241
|
1216
|
*/
|
1242
|
|
- lcd.setCursor(lcd_w_pos, 1);
|
1243
|
|
- #if LCD_WIDTH < 20
|
1244
|
|
- lcd.print("X");
|
1245
|
|
- #else
|
1246
|
|
- lcd.print("X:");
|
1247
|
|
- #endif
|
|
1217
|
+ _XLABEL(_LCD_W_POS, 1);
|
1248
|
1218
|
lcd.print(ftostr32(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]))));
|
1249
|
|
- lcd.setCursor(lcd_w_pos, 2);
|
1250
|
|
- #if LCD_WIDTH < 20
|
1251
|
|
- lcd.print("Y");
|
1252
|
|
- #else
|
1253
|
|
- lcd.print("Y:");
|
1254
|
|
- #endif
|
|
1219
|
+ _YLABEL(_LCD_W_POS, 2);
|
1255
|
1220
|
lcd.print(ftostr32(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]))));
|
1256
|
1221
|
|
1257
|
|
- /*
|
|
1222
|
+ /**
|
1258
|
1223
|
* Show the location value
|
1259
|
1224
|
*/
|
1260
|
|
- lcd.setCursor(lcd_w_pos, 3);
|
1261
|
|
- #if LCD_WIDTH < 20
|
1262
|
|
- lcd.print("Z");
|
1263
|
|
- #else
|
1264
|
|
- lcd.print("Z:");
|
1265
|
|
- #endif
|
1266
|
|
- if (!isnan(ubl.z_values[x_plot][y_plot])) {
|
|
1225
|
+ _ZLABEL(_LCD_W_POS, 3);
|
|
1226
|
+ if (!isnan(ubl.z_values[x_plot][y_plot]))
|
1267
|
1227
|
lcd.print(ftostr43sign(ubl.z_values[x_plot][y_plot]));
|
1268
|
|
- }
|
1269
|
|
- else {
|
1270
|
|
- lcd.print(" -----");
|
1271
|
|
- }
|
|
1228
|
+ else
|
|
1229
|
+ lcd_printPGM(PSTR(" -----"));
|
1272
|
1230
|
|
1273
|
1231
|
#endif // LCD_HEIGHT > 3
|
1274
|
1232
|
}
|