Make sure estimate time = 0 not displayed
This commit is contained in:
parent
6241bcf0c8
commit
52a8bbefcf
1 changed files with 13 additions and 7 deletions
|
@ -432,13 +432,19 @@ void MarlinUI::draw_status_screen() {
|
||||||
#if ENABLED(SHOW_REMAINING_TIME)
|
#if ENABLED(SHOW_REMAINING_TIME)
|
||||||
if (!(ev & 0x3)) {
|
if (!(ev & 0x3)) {
|
||||||
duration_t estimation = elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress;
|
duration_t estimation = elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress;
|
||||||
const bool has_days = (estimation.value >= 60*60*24L);
|
if (estimation.value == 0) {
|
||||||
const uint8_t len = estimation.toDigital(estimation_string, has_days);
|
estimation_string[0] = '\0';
|
||||||
#if ENABLED(DOGM_SD_PERCENT) && ENABLED(ROTATE_PROGRESS_DISPLAY)
|
estimation_x_pos = _PROGRESS_CENTER_X(0);
|
||||||
estimation_x_pos = _SD_DURATION_X(len);
|
}
|
||||||
#else
|
else {
|
||||||
estimation_x_pos = _SD_DURATION_X(len + 1);
|
const bool has_days = (estimation.value >= 60*60*24L);
|
||||||
#endif
|
const uint8_t len = estimation.toDigital(estimation_string, has_days);
|
||||||
|
#if ENABLED(DOGM_SD_PERCENT) && ENABLED(ROTATE_PROGRESS_DISPLAY)
|
||||||
|
estimation_x_pos = _SD_DURATION_X(len);
|
||||||
|
#else
|
||||||
|
estimation_x_pos = _SD_DURATION_X(len + 1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue