|
@@ -309,6 +309,23 @@ FORCE_INLINE void _draw_heater_status(int x, int heater) {
|
309
|
309
|
}
|
310
|
310
|
}
|
311
|
311
|
|
|
312
|
+FORCE_INLINE void _draw_axis_label(AxisEnum axis, const char *pstr, bool blink) {
|
|
313
|
+ if (blink)
|
|
314
|
+ lcd_printPGM(pstr);
|
|
315
|
+ else {
|
|
316
|
+ if (!axis_homed[axis])
|
|
317
|
+ lcd_printPGM(PSTR("?"));
|
|
318
|
+ else {
|
|
319
|
+ #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
|
320
|
+ if (!axis_known_position[axis])
|
|
321
|
+ lcd_printPGM(PSTR(" "));
|
|
322
|
+ else
|
|
323
|
+ #endif
|
|
324
|
+ lcd_printPGM(pstr);
|
|
325
|
+ }
|
|
326
|
+ }
|
|
327
|
+}
|
|
328
|
+
|
312
|
329
|
static void lcd_implementation_status_screen() {
|
313
|
330
|
u8g.setColorIndex(1); // black on white
|
314
|
331
|
|
|
@@ -382,59 +399,22 @@ static void lcd_implementation_status_screen() {
|
382
|
399
|
u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 9);
|
383
|
400
|
#endif
|
384
|
401
|
u8g.setColorIndex(0); // white on black
|
|
402
|
+
|
385
|
403
|
u8g.setPrintPos(2, XYZ_BASELINE);
|
386
|
|
- if (blink)
|
387
|
|
- lcd_printPGM(PSTR(MSG_X));
|
388
|
|
- else {
|
389
|
|
- if (!axis_homed[X_AXIS])
|
390
|
|
- lcd_printPGM(PSTR("?"));
|
391
|
|
- else {
|
392
|
|
- #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
393
|
|
- if (!axis_known_position[X_AXIS])
|
394
|
|
- lcd_printPGM(PSTR(" "));
|
395
|
|
- else
|
396
|
|
- #endif
|
397
|
|
- lcd_printPGM(PSTR(MSG_X));
|
398
|
|
- }
|
399
|
|
- }
|
|
404
|
+ _draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
|
400
|
405
|
u8g.setPrintPos(10, XYZ_BASELINE);
|
401
|
406
|
lcd_print(ftostr4sign(current_position[X_AXIS]));
|
402
|
407
|
|
403
|
408
|
u8g.setPrintPos(43, XYZ_BASELINE);
|
404
|
|
- if (blink)
|
405
|
|
- lcd_printPGM(PSTR(MSG_Y));
|
406
|
|
- else {
|
407
|
|
- if (!axis_homed[Y_AXIS])
|
408
|
|
- lcd_printPGM(PSTR("?"));
|
409
|
|
- else {
|
410
|
|
- #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
411
|
|
- if (!axis_known_position[Y_AXIS])
|
412
|
|
- lcd_printPGM(PSTR(" "));
|
413
|
|
- else
|
414
|
|
- #endif
|
415
|
|
- lcd_printPGM(PSTR(MSG_Y));
|
416
|
|
- }
|
417
|
|
- }
|
|
409
|
+ _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
|
418
|
410
|
u8g.setPrintPos(51, XYZ_BASELINE);
|
419
|
411
|
lcd_print(ftostr4sign(current_position[Y_AXIS]));
|
420
|
412
|
|
421
|
413
|
u8g.setPrintPos(83, XYZ_BASELINE);
|
422
|
|
- if (blink)
|
423
|
|
- lcd_printPGM(PSTR(MSG_Z));
|
424
|
|
- else {
|
425
|
|
- if (!axis_homed[Z_AXIS])
|
426
|
|
- lcd_printPGM(PSTR("?"));
|
427
|
|
- else {
|
428
|
|
- #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
429
|
|
- if (!axis_known_position[Z_AXIS])
|
430
|
|
- lcd_printPGM(PSTR(" "));
|
431
|
|
- else
|
432
|
|
- #endif
|
433
|
|
- lcd_printPGM(PSTR(MSG_Z));
|
434
|
|
- }
|
435
|
|
- }
|
|
414
|
+ _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
|
436
|
415
|
u8g.setPrintPos(91, XYZ_BASELINE);
|
437
|
416
|
lcd_print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
|
|
417
|
+
|
438
|
418
|
u8g.setColorIndex(1); // black on white
|
439
|
419
|
|
440
|
420
|
// Feedrate
|