diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index 62688ebe8..80d250bf2 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -17,7 +17,7 @@ extern PGM_P sPrinterName; // Firmware version #define FW_VERSION "3.9.3" -#define FW_COMMIT_NR 3556 +#define FW_COMMIT_NR 5002 // FW_VERSION_UNKNOWN means this is an unofficial build. // The firmware should only be checked into github with this symbol. #define FW_DEV_VERSION FW_VERSION_UNKNOWN diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 5ef7ca00e..49201c3a1 100755 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -438,8 +438,6 @@ extern void cancel_saved_printing(); //estimated time to end of the print -extern uint16_t print_time_remaining(); -extern uint16_t print_time_to_change_remaining(); extern uint8_t calc_percent_done(); diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index c50ec0297..426a32170 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -6423,7 +6423,7 @@ Sigma_Exit: if(code_seen('C')) { print_time_to_change = code_value(); - printf_P(_N("Time to next change in mins: %d\n"), print_time_to_change); + printf_P(_N("Change in mins: %d\n"), print_time_to_change); } break; } @@ -11664,32 +11664,6 @@ void print_mesh_bed_leveling_table() SERIAL_ECHOLN(); } -uint16_t print_time_remaining() -{ - uint16_t print_t = PRINT_TIME_REMAINING_INIT; -#ifdef TMC2130 - if (SilentModeMenu == SILENT_MODE_OFF) print_t = print_time_remaining_normal; - else print_t = print_time_remaining_silent; -#else - print_t = print_time_remaining_normal; -#endif //TMC2130 - if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100ul * print_t / feedmultiply; - return print_t; -} - -uint16_t print_time_to_change_remaining() -{ - uint16_t print_t = PRINT_TIME_REMAINING_INIT; -#ifdef TMC2130 - if (SilentModeMenu == SILENT_MODE_OFF) print_t = print_time_to_change; - else print_t = print_time_to_change - (print_time_remaining_normal - print_time_remaining_silent); -#else - print_t = print_time_to_change; -#endif //TMC2130 - if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100ul * print_t / feedmultiply; - return print_t; -} - uint8_t calc_percent_done() { //in case that we have information from M73 gcode return percentage counted by slicer, else return percentage counted as byte_printed/filesize diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index cf4737cb8..43d80799e 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -672,30 +672,37 @@ void lcdui_print_cmd_diag(void) void lcdui_print_time(void) { //if remaining print time estimation is available print it else print elapsed time - uint16_t print_t = 0; int chars = 0; - char suff = ' '; - char suff_doubt = ' '; + if ((PRINTER_ACTIVE) && (starttime != 0)) + { + uint16_t print_t = 0; + char suff = ' '; + char suff_doubt = ' '; - if(print_time_to_change != PRINT_TIME_REMAINING_INIT) - { - print_t = print_time_to_change_remaining(); - suff = 'C'; + if (print_time_to_change != PRINT_TIME_REMAINING_INIT) + { + print_t = print_time_to_change; + suff = 'C'; + } + else + { + suff = 'R'; + #ifdef TMC2130 + if (print_time_remaining_silent != PRINT_TIME_REMAINING_INIT && (SilentModeMenu != SILENT_MODE_OFF)) + { + print_t = print_time_remaining_silent; + } + else + #endif //TMC2130 + print_t = print_time_remaining_normal; + } + if (feedmultiply != 100) + { suff_doubt = '?'; - } - else if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) - { - print_t = print_time_remaining(); - suff = 'R'; - if (feedmultiply != 100) - suff_doubt = '?'; - } - else if(starttime != 0) - print_t = _millis() / 60000 - starttime / 60000; - - if ((PRINTER_ACTIVE) && ((print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) || (print_time_to_change != PRINT_TIME_REMAINING_INIT) || (starttime != 0))) - { + print_t = 100ul * print_t / feedmultiply; + } + if (print_t < 6000) //time<100h chars = lcd_printf_P(_N("%c%02u:%02u%c%c"), LCD_STR_CLOCK[0], print_t / 60, print_t % 60, suff, suff_doubt); else //time>=100h