|
@@ -335,9 +335,9 @@ void MarlinUI::draw_status_screen() {
|
335
|
335
|
|
336
|
336
|
#if HAS_PRINT_PROGRESS
|
337
|
337
|
#if DISABLED(DOGM_SD_PERCENT)
|
338
|
|
- #define _SD_DURATION_X(len) (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH) / 2 - (len) * (MENU_FONT_WIDTH) / 2)
|
|
338
|
+ #define _SD_INFO_X(len) (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH) / 2 - (len) * (MENU_FONT_WIDTH) / 2)
|
339
|
339
|
#else
|
340
|
|
- #define _SD_DURATION_X(len) (LCD_PIXEL_WIDTH - (len) * (MENU_FONT_WIDTH))
|
|
340
|
+ #define _SD_INFO_X(len) (LCD_PIXEL_WIDTH - (len) * (MENU_FONT_WIDTH))
|
341
|
341
|
#endif
|
342
|
342
|
|
343
|
343
|
#if ENABLED(DOGM_SD_PERCENT)
|
|
@@ -350,14 +350,9 @@ void MarlinUI::draw_status_screen() {
|
350
|
350
|
static u8g_uint_t estimation_x_pos = 0;
|
351
|
351
|
static char estimation_string[10];
|
352
|
352
|
#if BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)
|
353
|
|
- #define PROGRESS_TIME_PREFIX "PROG"
|
354
|
|
- #define ELAPSED_TIME_PREFIX "ELAP"
|
355
|
|
- #define SHOW_REMAINING_TIME_PREFIX "REM"
|
356
|
353
|
static u8g_uint_t progress_x_pos = 0;
|
357
|
354
|
static uint8_t progress_state = 0;
|
358
|
355
|
static bool prev_blink = 0;
|
359
|
|
- #else
|
360
|
|
- #define SHOW_REMAINING_TIME_PREFIX 'R'
|
361
|
356
|
#endif
|
362
|
357
|
#endif
|
363
|
358
|
#endif
|
|
@@ -407,7 +402,7 @@ void MarlinUI::draw_status_screen() {
|
407
|
402
|
progress_string[0] = '\0';
|
408
|
403
|
#if ENABLED(SHOW_REMAINING_TIME)
|
409
|
404
|
estimation_string[0] = '\0';
|
410
|
|
- estimation_x_pos = _SD_DURATION_X(0);
|
|
405
|
+ estimation_x_pos = _SD_INFO_X(0);
|
411
|
406
|
#endif
|
412
|
407
|
}
|
413
|
408
|
else {
|
|
@@ -420,7 +415,7 @@ void MarlinUI::draw_status_screen() {
|
420
|
415
|
));
|
421
|
416
|
}
|
422
|
417
|
#if BOTH(SHOW_REMAINING_TIME, ROTATE_PROGRESS_DISPLAY) // Tri-state progress display mode
|
423
|
|
- progress_x_pos = _SD_DURATION_X(strlen(progress_string) + 1);
|
|
418
|
+ progress_x_pos = _SD_INFO_X(strlen(progress_string));
|
424
|
419
|
#endif
|
425
|
420
|
#endif
|
426
|
421
|
}
|
|
@@ -429,22 +424,22 @@ void MarlinUI::draw_status_screen() {
|
429
|
424
|
lastElapsed = ev;
|
430
|
425
|
const bool has_days = (elapsed.value >= 60*60*24L);
|
431
|
426
|
const uint8_t len = elapsed.toDigital(elapsed_string, has_days);
|
432
|
|
- elapsed_x_pos = _SD_DURATION_X(len);
|
|
427
|
+ elapsed_x_pos = _SD_INFO_X(len);
|
433
|
428
|
|
434
|
429
|
#if ENABLED(SHOW_REMAINING_TIME)
|
435
|
430
|
if (!(ev & 0x3)) {
|
436
|
431
|
duration_t estimation = elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress;
|
437
|
432
|
if (estimation.value == 0) {
|
438
|
433
|
estimation_string[0] = '\0';
|
439
|
|
- estimation_x_pos = _SD_DURATION_X(0);
|
|
434
|
+ estimation_x_pos = _SD_INFO_X(0);
|
440
|
435
|
}
|
441
|
436
|
else {
|
442
|
437
|
const bool has_days = (estimation.value >= 60*60*24L);
|
443
|
438
|
const uint8_t len = estimation.toDigital(estimation_string, has_days);
|
444
|
439
|
#if BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)
|
445
|
|
- estimation_x_pos = _SD_DURATION_X(len);
|
|
440
|
+ estimation_x_pos = _SD_INFO_X(len);
|
446
|
441
|
#else
|
447
|
|
- estimation_x_pos = _SD_DURATION_X(len + 1);
|
|
442
|
+ estimation_x_pos = _SD_INFO_X(len + 1);
|
448
|
443
|
#endif
|
449
|
444
|
}
|
450
|
445
|
}
|
|
@@ -605,17 +600,16 @@ void MarlinUI::draw_status_screen() {
|
605
|
600
|
|
606
|
601
|
if (progress_state == 0) {
|
607
|
602
|
if (progress_string[0]) {
|
608
|
|
- lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, PROGRESS_TIME_PREFIX);
|
609
|
603
|
lcd_put_u8str(progress_x_pos, EXTRAS_BASELINE, progress_string);
|
610
|
604
|
lcd_put_wchar('%');
|
611
|
605
|
}
|
612
|
606
|
}
|
613
|
607
|
else if (progress_state == 2 && estimation_string[0]) {
|
614
|
|
- lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
|
|
608
|
+ lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, "R:");
|
615
|
609
|
lcd_put_u8str(estimation_x_pos, EXTRAS_BASELINE, estimation_string);
|
616
|
610
|
}
|
617
|
611
|
else if (elapsed_string[0]) {
|
618
|
|
- lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, ELAPSED_TIME_PREFIX);
|
|
612
|
+ lcd_put_u8str(PROGRESS_BAR_X, EXTRAS_BASELINE, "E:");
|
619
|
613
|
lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string);
|
620
|
614
|
}
|
621
|
615
|
|
|
@@ -638,7 +632,7 @@ void MarlinUI::draw_status_screen() {
|
638
|
632
|
|
639
|
633
|
#if ENABLED(SHOW_REMAINING_TIME)
|
640
|
634
|
if (blink && estimation_string[0]) {
|
641
|
|
- lcd_put_wchar(estimation_x_pos, EXTRAS_BASELINE, SHOW_REMAINING_TIME_PREFIX);
|
|
635
|
+ lcd_put_wchar(estimation_x_pos, EXTRAS_BASELINE, 'R');
|
642
|
636
|
lcd_put_u8str(estimation_string);
|
643
|
637
|
}
|
644
|
638
|
else
|