|
@@ -406,97 +406,99 @@ unsigned lcd_print(char c) { return charset_mapper(c); }
|
406
|
406
|
|
407
|
407
|
/*
|
408
|
408
|
Possible status screens:
|
409
|
|
-16x2 |0123456789012345|
|
410
|
|
- |000/000 B000/000|
|
411
|
|
- |Status line.....|
|
|
409
|
+16x2 |000/000 B000/000|
|
|
410
|
+ |0123456789012345|
|
412
|
411
|
|
413
|
|
-16x4 |0123456789012345|
|
414
|
|
- |000/000 B000/000|
|
415
|
|
- |SD100% Z000.0|
|
|
412
|
+16x4 |000/000 B000/000|
|
|
413
|
+ |SD100% Z000.00 |
|
416
|
414
|
|F100% T--:--|
|
417
|
|
- |Status line.....|
|
|
415
|
+ |0123456789012345|
|
418
|
416
|
|
419
|
|
-20x2 |01234567890123456789|
|
420
|
|
- |T000/000D B000/000D |
|
421
|
|
- |Status line.........|
|
|
417
|
+20x2 |T000/000D B000/000D |
|
|
418
|
+ |01234567890123456789|
|
422
|
419
|
|
423
|
|
-20x4 |01234567890123456789|
|
424
|
|
- |T000/000D B000/000D |
|
425
|
|
- |X000 Y000 Z000.00|
|
|
420
|
+20x4 |T000/000D B000/000D |
|
|
421
|
+ |X000 Y000 Z000.00 |
|
426
|
422
|
|F100% SD100% T--:--|
|
427
|
|
- |Status line.........|
|
|
423
|
+ |01234567890123456789|
|
428
|
424
|
|
429
|
|
-20x4 |01234567890123456789|
|
430
|
|
- |T000/000D B000/000D |
|
|
425
|
+20x4 |T000/000D B000/000D |
|
431
|
426
|
|T000/000D Z000.00 |
|
432
|
427
|
|F100% SD100% T--:--|
|
433
|
|
- |Status line.........|
|
|
428
|
+ |01234567890123456789|
|
434
|
429
|
*/
|
435
|
430
|
static void lcd_implementation_status_screen() {
|
436
|
|
- int tHotend = int(degHotend(0) + 0.5);
|
437
|
|
- int tTarget = int(degTargetHotend(0) + 0.5);
|
|
431
|
+
|
|
432
|
+ #define LCD_TEMP_ONLY(T1,T2) \
|
|
433
|
+ lcd.print(itostr3(T1 + 0.5)); \
|
|
434
|
+ lcd.print('/'); \
|
|
435
|
+ lcd.print(itostr3left(T2 + 0.5))
|
|
436
|
+
|
|
437
|
+ #define LCD_TEMP(T1,T2,PREFIX) \
|
|
438
|
+ lcd.print(PREFIX); \
|
|
439
|
+ LCD_TEMP_ONLY(T1,T2); \
|
|
440
|
+ lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); \
|
|
441
|
+ if (T2 < 10) lcd.print(' ')
|
|
442
|
+
|
|
443
|
+ //
|
|
444
|
+ // Line 1
|
|
445
|
+ //
|
|
446
|
+
|
|
447
|
+ lcd.setCursor(0, 0);
|
438
|
448
|
|
439
|
449
|
#if LCD_WIDTH < 20
|
440
|
450
|
|
441
|
|
- lcd.setCursor(0, 0);
|
442
|
|
- lcd.print(itostr3(tHotend));
|
443
|
|
- lcd.print('/');
|
444
|
|
- lcd.print(itostr3left(tTarget));
|
|
451
|
+ //
|
|
452
|
+ // Hotend 0 Temperature
|
|
453
|
+ //
|
|
454
|
+ LCD_TEMP_ONLY(degHotend(0), degTargetHotend(0));
|
445
|
455
|
|
|
456
|
+ //
|
|
457
|
+ // Hotend 1 or Bed Temperature
|
|
458
|
+ //
|
446
|
459
|
#if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
447
|
460
|
|
448
|
|
- // If we have an 2nd extruder or heated bed, show that in the top right corner
|
449
|
461
|
lcd.setCursor(8, 0);
|
450
|
462
|
#if EXTRUDERS > 1
|
451
|
|
- tHotend = int(degHotend(1) + 0.5);
|
452
|
|
- tTarget = int(degTargetHotend(1) + 0.5);
|
453
|
463
|
lcd.print(LCD_STR_THERMOMETER[0]);
|
454
|
|
- #else // Heated bed
|
455
|
|
- tHotend = int(degBed() + 0.5);
|
456
|
|
- tTarget = int(degTargetBed() + 0.5);
|
|
464
|
+ LCD_TEMP_ONLY(degHotend(1), degTargetHotend(1));
|
|
465
|
+ #else
|
457
|
466
|
lcd.print(LCD_STR_BEDTEMP[0]);
|
|
467
|
+ LCD_TEMP_ONLY(degBed(), degTargetBed());
|
458
|
468
|
#endif
|
459
|
|
- lcd.print(itostr3(tHotend));
|
460
|
|
- lcd.print('/');
|
461
|
|
- lcd.print(itostr3left(tTarget));
|
462
|
469
|
|
463
|
470
|
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
464
|
471
|
|
465
|
|
- #else // LCD_WIDTH > 19
|
|
472
|
+ #else // LCD_WIDTH >= 20
|
466
|
473
|
|
467
|
|
- lcd.setCursor(0, 0);
|
468
|
|
- lcd.print(LCD_STR_THERMOMETER[0]);
|
469
|
|
- lcd.print(itostr3(tHotend));
|
470
|
|
- lcd.print('/');
|
471
|
|
- lcd.print(itostr3left(tTarget));
|
472
|
|
- lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
473
|
|
- if (tTarget < 10) lcd.print(' ');
|
|
474
|
+ //
|
|
475
|
+ // Hotend 0 Temperature
|
|
476
|
+ //
|
|
477
|
+ LCD_TEMP(degHotend(0), degTargetHotend(0), LCD_STR_THERMOMETER[0]);
|
474
|
478
|
|
|
479
|
+ //
|
|
480
|
+ // Hotend 1 or Bed Temperature
|
|
481
|
+ //
|
475
|
482
|
#if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
476
|
|
- // If we have an 2nd extruder or heated bed, show that in the top right corner
|
477
|
483
|
lcd.setCursor(10, 0);
|
478
|
484
|
#if EXTRUDERS > 1
|
479
|
|
- tHotend = int(degHotend(1) + 0.5);
|
480
|
|
- tTarget = int(degTargetHotend(1) + 0.5);
|
481
|
|
- lcd.print(LCD_STR_THERMOMETER[0]);
|
482
|
|
- #else // Heated bed
|
483
|
|
- tHotend = int(degBed() + 0.5);
|
484
|
|
- tTarget = int(degTargetBed() + 0.5);
|
485
|
|
- lcd.print(LCD_STR_BEDTEMP[0]);
|
|
485
|
+ LCD_TEMP(degHotend(1), degTargetHotend(1), LCD_STR_THERMOMETER[0]);
|
|
486
|
+ #else
|
|
487
|
+ LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]);
|
486
|
488
|
#endif
|
487
|
|
- lcd.print(itostr3(tHotend));
|
488
|
|
- lcd.print('/');
|
489
|
|
- lcd.print(itostr3left(tTarget));
|
490
|
|
- lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
491
|
|
- if (tTarget < 10) lcd.print(' ');
|
492
|
489
|
|
493
|
490
|
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
494
|
491
|
|
495
|
|
- #endif // LCD_WIDTH > 19
|
|
492
|
+ #endif // LCD_WIDTH >= 20
|
|
493
|
+
|
|
494
|
+ //
|
|
495
|
+ // Line 2
|
|
496
|
+ //
|
496
|
497
|
|
497
|
498
|
#if LCD_HEIGHT > 2
|
498
|
|
- // Lines 2 for 4 line LCD
|
|
499
|
+
|
499
|
500
|
#if LCD_WIDTH < 20
|
|
501
|
+
|
500
|
502
|
#ifdef SDSUPPORT
|
501
|
503
|
lcd.setCursor(0, 2);
|
502
|
504
|
lcd_printPGM(PSTR("SD"));
|
|
@@ -507,36 +509,48 @@ static void lcd_implementation_status_screen() {
|
507
|
509
|
lcd.print('%');
|
508
|
510
|
#endif // SDSUPPORT
|
509
|
511
|
|
510
|
|
- #else // LCD_WIDTH > 19
|
|
512
|
+ #else // LCD_WIDTH >= 20
|
|
513
|
+
|
|
514
|
+ lcd.setCursor(0, 1);
|
511
|
515
|
|
512
|
516
|
#if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0
|
513
|
|
- // If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
|
514
|
|
- tHotend = int(degBed() + 0.5);
|
515
|
|
- tTarget = int(degTargetBed() + 0.5);
|
516
|
517
|
|
517
|
|
- lcd.setCursor(0, 1);
|
518
|
|
- lcd.print(LCD_STR_BEDTEMP[0]);
|
519
|
|
- lcd.print(itostr3(tHotend));
|
520
|
|
- lcd.print('/');
|
521
|
|
- lcd.print(itostr3left(tTarget));
|
522
|
|
- lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
523
|
|
- if (tTarget < 10) lcd.print(' ');
|
|
518
|
+ // If we both have a 2nd extruder and a heated bed,
|
|
519
|
+ // show the heated bed temp on the left,
|
|
520
|
+ // since the first line is filled with extruder temps
|
|
521
|
+ LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]);
|
|
522
|
+
|
524
|
523
|
#else
|
525
|
|
- lcd.setCursor(0,1);
|
|
524
|
+
|
526
|
525
|
lcd.print('X');
|
527
|
|
- lcd.print(ftostr3(current_position[X_AXIS]));
|
|
526
|
+ if (axis_known_position[X_AXIS])
|
|
527
|
+ lcd.print(ftostr3(current_position[X_AXIS]));
|
|
528
|
+ else
|
|
529
|
+ lcd_printPGM(PSTR("---"));
|
|
530
|
+
|
528
|
531
|
lcd_printPGM(PSTR(" Y"));
|
529
|
|
- lcd.print(ftostr3(current_position[Y_AXIS]));
|
|
532
|
+ if (axis_known_position[Y_AXIS])
|
|
533
|
+ lcd.print(ftostr3(current_position[Y_AXIS]));
|
|
534
|
+ else
|
|
535
|
+ lcd_printPGM(PSTR("---"));
|
|
536
|
+
|
530
|
537
|
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
531
|
538
|
|
532
|
|
- #endif // LCD_WIDTH > 19
|
|
539
|
+ #endif // LCD_WIDTH >= 20
|
533
|
540
|
|
534
|
541
|
lcd.setCursor(LCD_WIDTH - 8, 1);
|
535
|
542
|
lcd.print('Z');
|
536
|
|
- lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
|
|
543
|
+ if (axis_known_position[Z_AXIS])
|
|
544
|
+ lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
|
|
545
|
+ else
|
|
546
|
+ lcd_printPGM(PSTR("---.--"));
|
537
|
547
|
|
538
|
548
|
#endif // LCD_HEIGHT > 2
|
539
|
549
|
|
|
550
|
+ //
|
|
551
|
+ // Line 3
|
|
552
|
+ //
|
|
553
|
+
|
540
|
554
|
#if LCD_HEIGHT > 3
|
541
|
555
|
|
542
|
556
|
lcd.setCursor(0, 2);
|
|
@@ -570,9 +584,10 @@ static void lcd_implementation_status_screen() {
|
570
|
584
|
|
571
|
585
|
#endif // LCD_HEIGHT > 3
|
572
|
586
|
|
573
|
|
- /**
|
574
|
|
- * Display Progress Bar, Filament display, and/or Status Message on the last line
|
575
|
|
- */
|
|
587
|
+ //
|
|
588
|
+ // Last Line
|
|
589
|
+ // Status Message (which may be a Progress Bar or Filament display)
|
|
590
|
+ //
|
576
|
591
|
|
577
|
592
|
lcd.setCursor(0, LCD_HEIGHT - 1);
|
578
|
593
|
|