From e481b79af1b88637faeee6646863010f0d0db24e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 Jul 2016 19:03:42 -0700 Subject: [PATCH 1/6] Allow stopwatch and printcounter to go over 18 hours --- Marlin/Marlin_main.cpp | 3 +-- Marlin/dogm_lcd_implementation.h | 2 +- Marlin/printcounter.cpp | 17 ++++++++--------- Marlin/printcounter.h | 8 ++++---- Marlin/stopwatch.cpp | 4 ++-- Marlin/stopwatch.h | 8 ++++---- Marlin/ultralcd.cpp | 8 ++++---- 7 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 95b8a5c76..e2937c39e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1172,8 +1172,7 @@ inline void get_serial_commands() { print_job_timer.stop(); char time[30]; millis_t t = print_job_timer.duration(); - int hours = t / 60 / 60, minutes = (t / 60) % 60; - sprintf_P(time, PSTR("%i " MSG_END_HOUR " %i " MSG_END_MINUTE), hours, minutes); + sprintf_P(time, PSTR("%i " MSG_END_HOUR " %i " MSG_END_MINUTE), int(t / 60 / 60), int(t / 60) % 60); SERIAL_ECHO_START; SERIAL_ECHOLN(time); lcd_setstatus(time, true); diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 6d6acb154..be45fb6ca 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -386,7 +386,7 @@ static void lcd_implementation_status_screen() { } u8g.setPrintPos(80,48); - uint16_t time = print_job_timer.duration() / 60; + millis_t time = print_job_timer.duration() / 60; if (time != 0) { lcd_print(itostr2(time/60)); lcd_print(':'); diff --git a/Marlin/printcounter.cpp b/Marlin/printcounter.cpp index 78e3630d3..6e875fabc 100644 --- a/Marlin/printcounter.cpp +++ b/Marlin/printcounter.cpp @@ -27,12 +27,12 @@ PrintCounter::PrintCounter(): super() { this->loadStats(); } -uint16_t PrintCounter::deltaDuration() { +millis_t PrintCounter::deltaDuration() { #if ENABLED(DEBUG_PRINTCOUNTER) PrintCounter::debug(PSTR("deltaDuration")); #endif - uint16_t tmp = this->lastDuration; + millis_t tmp = this->lastDuration; this->lastDuration = this->duration(); return this->lastDuration - tmp; } @@ -88,12 +88,12 @@ void PrintCounter::showStats() { SERIAL_ECHO(this->data.totalPrints - this->data.finishedPrints - ((this->isRunning() || this->isPaused()) ? 1 : 0)); // Removes 1 from failures with an active counter - uint32_t t = this->data.printTime / 60; + millis_t t = this->data.printTime / 60; // minutes from seconds SERIAL_ECHOPGM(", Total print time: "); - SERIAL_ECHO(t / 60); + SERIAL_ECHO(t / 60); // hours SERIAL_ECHOPGM("h "); - SERIAL_ECHO(t % 60); + SERIAL_ECHO(t % 60); // minutes SERIAL_ECHOPGM("min"); @@ -110,10 +110,10 @@ void PrintCounter::showStats() { void PrintCounter::tick() { if (!this->isRunning()) return; - static uint32_t update_before = millis(), + static millis_t update_before = millis(), eeprom_before = millis(); - uint32_t now = millis(); + millis_t now = millis(); // Trying to get the amount of calculations down to the bare min const static uint16_t i = this->updateInterval * 1000; @@ -128,8 +128,7 @@ void PrintCounter::tick() { } // Trying to get the amount of calculations down to the bare min - const static uint32_t j = this->saveInterval * 1000; - + const static millis_t j = this->saveInterval * 1000; if (now - eeprom_before >= j) { eeprom_before = now; this->saveStats(); diff --git a/Marlin/printcounter.h b/Marlin/printcounter.h index d6ac80b77..c7742a07b 100644 --- a/Marlin/printcounter.h +++ b/Marlin/printcounter.h @@ -35,8 +35,8 @@ struct printStatistics { // 13 bytes //const uint8_t magic; // Magic header, it will always be 0x16 uint16_t totalPrints; // Number of prints uint16_t finishedPrints; // Number of complete prints - uint32_t printTime; // Total printing time - uint32_t longestPrint; // Longest print job - not in use + millis_t printTime; // Total printing time + millis_t longestPrint; // Longest print job - not in use }; class PrintCounter: public Stopwatch { @@ -74,7 +74,7 @@ class PrintCounter: public Stopwatch { * @details Stores the timestamp of the last deltaDuration(), this is * required due to the updateInterval cycle. */ - uint16_t lastDuration; + millis_t lastDuration; /** * @brief Stats were loaded from EERPROM @@ -90,7 +90,7 @@ class PrintCounter: public Stopwatch { * used internally for print statistics accounting is not intended to be a * user callable function. */ - uint16_t deltaDuration(); + millis_t deltaDuration(); public: /** diff --git a/Marlin/stopwatch.cpp b/Marlin/stopwatch.cpp index 7a9e90d3c..042dbfc08 100644 --- a/Marlin/stopwatch.cpp +++ b/Marlin/stopwatch.cpp @@ -88,9 +88,9 @@ bool Stopwatch::isPaused() { return (this->state == STOPWATCH_PAUSED) ? true : false; } -uint16_t Stopwatch::duration() { +millis_t Stopwatch::duration() { return (((this->isRunning()) ? millis() : this->stopTimestamp) - - this->startTimestamp) / 1000 + this->accumulator; + - this->startTimestamp) / 1000UL + this->accumulator; } #if ENABLED(DEBUG_STOPWATCH) diff --git a/Marlin/stopwatch.h b/Marlin/stopwatch.h index f5ce2335a..173b5efb4 100644 --- a/Marlin/stopwatch.h +++ b/Marlin/stopwatch.h @@ -42,9 +42,9 @@ enum StopwatchState { class Stopwatch { private: StopwatchState state; - uint16_t accumulator; - uint32_t startTimestamp; - uint32_t stopTimestamp; + millis_t accumulator; + millis_t startTimestamp; + millis_t stopTimestamp; public: /** @@ -101,7 +101,7 @@ class Stopwatch { * @details Returns the total number of seconds the timer has been running. * @return the delta since starting the stopwatch */ - uint16_t duration(); + millis_t duration(); #if ENABLED(DEBUG_STOPWATCH) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 94a71102a..4a2e08e9a 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1967,13 +1967,13 @@ void kill_screen(const char* lcd_msg) { print_job_counter.loadStats(); printStatistics stats = print_job_counter.getStats(); - char printTime[6]; - sprintf(printTime, "%02d:%02d", int(stats.printTime / 3600), int(stats.printTime / 60) % 60); + char timeString[8]; + sprintf_P(timeString, PSTR("%i:%02i"), int(stats.printTime / 60 / 60), int(stats.printTime / 60) % 60); - START_SCREEN(); + START_SCREEN(); // 12345678901234567890 STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count : 999 STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": ", false, false, itostr3left(stats.finishedPrints)); // Finished : 666 - STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, printTime); // Total Time : 12:34 + STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, timeString); // Total Time : 123:45 END_SCREEN(); } #endif // PRINTCOUNTER From a8d71f0ac6a659b867aa4d36a25fa9ec222cd72f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 Jul 2016 12:57:59 -0700 Subject: [PATCH 2/6] Support longer print times in M31 --- Marlin/Marlin_main.cpp | 18 ++++++++++++++---- Marlin/language_en.h | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e2937c39e..c5d411cf8 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3948,12 +3948,22 @@ inline void gcode_M17() { */ inline void gcode_M31() { millis_t t = print_job_timer.duration(); - int min = t / 60, sec = t % 60; - char time[30]; - sprintf_P(time, PSTR("%i min, %i sec"), min, sec); + int d = int(t / 60 / 60 / 24), + h = int(t / 60 / 60) % 60, + m = int(t / 60) % 60, + s = int(t % 60); + char time[18]; // 123456789012345678 + if (d) + sprintf_P(time, PSTR("%id %ih %im %is"), d, h, m, s); // 99d 23h 59m 59s + else + sprintf_P(time, PSTR("%ih %im %is"), h, m, s); // 23h 59m 59s + + lcd_setstatus(time); + SERIAL_ECHO_START; + SERIAL_ECHOPGM(MSG_PRINT_TIME " "); SERIAL_ECHOLN(time); - lcd_setstatus(time); + thermalManager.autotempShutdown(); } diff --git a/Marlin/language_en.h b/Marlin/language_en.h index ef6022094..eb1450578 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -488,12 +488,18 @@ #ifndef MSG_PLEASE_RESET #define MSG_PLEASE_RESET "Please reset" #endif +#ifndef MSG_END_DAY + #define MSG_END_DAY "days" +#endif #ifndef MSG_END_HOUR #define MSG_END_HOUR "hours" #endif #ifndef MSG_END_MINUTE #define MSG_END_MINUTE "minutes" #endif +#ifndef MSG_PRINT_TIME + #define MSG_PRINT_TIME "Print time" +#endif #ifndef MSG_HEATING #define MSG_HEATING "Heating..." #endif @@ -521,6 +527,7 @@ #ifndef MSG_DELTA_CALIBRATE_CENTER #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #endif + #ifndef MSG_INFO_MENU #define MSG_INFO_MENU "About Printer" #endif From 23d2bc5ab03864c94da277d0ebc19f87bf4cafde Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 Jul 2016 12:58:52 -0700 Subject: [PATCH 3/6] Patch Greek for new strings --- Marlin/language_el.h | 63 +++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/Marlin/language_el.h b/Marlin/language_el.h index b3ec5344c..c62366081 100644 --- a/Marlin/language_el.h +++ b/Marlin/language_el.h @@ -198,6 +198,7 @@ #define MSG_DELTA_CALIBRATE_Y "Βαθμονόμηση Y" #define MSG_DELTA_CALIBRATE_Z "Βαθμονόμηση Z" #define MSG_DELTA_CALIBRATE_CENTER "Βαθμονόμηση κέντρου" + #define MSG_INFO_MENU "About Printer" #define MSG_INFO_PRINTER_MENU "Printer Info" #define MSG_INFO_STATS_MENU "Printer Stats" @@ -206,42 +207,50 @@ #define MSG_INFO_EXTRUDERS "Extruders" #define MSG_INFO_BAUDRATE "Baud" #define MSG_INFO_PROTOCOL "Protocol" -#define MSG_INFO_TOTAL_PRINTS "Total Prints" -#define MSG_INFO_FINISHED_PRINTS "Finished Prints" -#define MSG_INFO_PRINT_TIME "Total Print Time" + +#if LCD_WIDTH > 19 + #define MSG_INFO_PRINT_COUNT "Print Count " + #define MSG_INFO_FINISHED_PRINTS "Finished " + #define MSG_INFO_PRINT_TIME "Total Time " +#else + #define MSG_INFO_PRINT_COUNT "Prints " + #define MSG_INFO_FINISHED_PRINTS "Finished " + #define MSG_INFO_PRINT_TIME "Duration " +#endif #define MSG_INFO_MIN_TEMP "Min Temp" #define MSG_INFO_MAX_TEMP "Max Temp" #define MSG_INFO_PSU "Power Supply" + #define MSG_FILAMENT_CHANGE_HEADER "CHANGE FILAMENT" #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extrude more" #define MSG_FILAMENT_CHANGE_OPTION_RESUME "Resume print" #if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Wait for start" - #define MSG_FILAMENT_CHANGE_INIT_2 "of the filament" - #define MSG_FILAMENT_CHANGE_INIT_3 "change" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Wait for" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "filament unload" - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert filament" - #define MSG_FILAMENT_CHANGE_INSERT_2 "and press button" - #define MSG_FILAMENT_CHANGE_INSERT_3 "to continue..." - #define MSG_FILAMENT_CHANGE_LOAD_1 "Wait for" - #define MSG_FILAMENT_CHANGE_LOAD_2 "filament load" - #define MSG_FILAMENT_CHANGE_LOAD_3 "" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Wait for" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "filament extrude" - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Wait for print" - #define MSG_FILAMENT_CHANGE_RESUME_2 "to resume" - #define MSG_FILAMENT_CHANGE_RESUME_3 "" + #define MSG_FILAMENT_CHANGE_INIT_1 "Wait for start" + #define MSG_FILAMENT_CHANGE_INIT_2 "of the filament" + #define MSG_FILAMENT_CHANGE_INIT_3 "change" + #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Wait for" + #define MSG_FILAMENT_CHANGE_UNLOAD_2 "filament unload" + #define MSG_FILAMENT_CHANGE_UNLOAD_3 "" + #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert filament" + #define MSG_FILAMENT_CHANGE_INSERT_2 "and press button" + #define MSG_FILAMENT_CHANGE_INSERT_3 "to continue..." + #define MSG_FILAMENT_CHANGE_LOAD_1 "Wait for" + #define MSG_FILAMENT_CHANGE_LOAD_2 "filament load" + #define MSG_FILAMENT_CHANGE_LOAD_3 "" + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Wait for" + #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "filament extrude" + #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "" + #define MSG_FILAMENT_CHANGE_RESUME_1 "Wait for print" + #define MSG_FILAMENT_CHANGE_RESUME_2 "to resume" + #define MSG_FILAMENT_CHANGE_RESUME_3 "" #else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Please wait..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Ejecting..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert and Click" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Loading..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extruding..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Resuming..." + #define MSG_FILAMENT_CHANGE_INIT_1 "Please wait..." + #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Ejecting..." + #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert and Click" + #define MSG_FILAMENT_CHANGE_LOAD_1 "Loading..." + #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extruding..." + #define MSG_FILAMENT_CHANGE_RESUME_1 "Resuming..." #endif #endif // LANGUAGE_EL_H From 34da77dad3873ff75f447465d4cca45a464db9cd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 Jul 2016 09:59:42 -0700 Subject: [PATCH 4/6] Simply run M31 at the end of an SD print --- Marlin/Marlin_main.cpp | 6 ------ Marlin/cardreader.cpp | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index c5d411cf8..e60f66e09 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1170,12 +1170,6 @@ inline void get_serial_commands() { if (card_eof) { SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED); print_job_timer.stop(); - char time[30]; - millis_t t = print_job_timer.duration(); - sprintf_P(time, PSTR("%i " MSG_END_HOUR " %i " MSG_END_MINUTE), int(t / 60 / 60), int(t / 60) % 60); - SERIAL_ECHO_START; - SERIAL_ECHOLN(time); - lcd_setstatus(time, true); card.printingHasFinished(); card.checkautostart(true); } diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index c7e160481..dd6ff9f53 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -602,19 +602,19 @@ void CardReader::updir() { void CardReader::printingHasFinished() { stepper.synchronize(); + file.close(); if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure. - file.close(); file_subcall_ctr--; openFile(proc_filenames[file_subcall_ctr], true, true); setIndex(filespos[file_subcall_ctr]); startFileprint(); } else { - file.close(); sdprinting = false; if (SD_FINISHED_STEPPERRELEASE) enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); - thermalManager.autotempShutdown(); + print_job_timer.stop(); + enqueue_and_echo_commands_P(PSTR("M31")); } } From 1618870c84a402cb2dedd40c89a5a63b592cdcb9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 Jul 2016 11:19:51 -0700 Subject: [PATCH 5/6] card.printingHasFinished does print_job_timer.stop --- Marlin/Marlin_main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e60f66e09..615d89ec2 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1169,7 +1169,6 @@ inline void get_serial_commands() { ) { if (card_eof) { SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED); - print_job_timer.stop(); card.printingHasFinished(); card.checkautostart(true); } From c5e51f6b96c7450a0297afd99bc4780079a862c9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 Jul 2016 11:46:35 -0700 Subject: [PATCH 6/6] finished => completed --- Marlin/language_cz.h | 12 ++++++------ Marlin/language_de.h | 13 ++++++++++--- Marlin/language_el.h | 8 ++++---- Marlin/language_en.h | 12 ++++++------ Marlin/ultralcd.cpp | 6 +++--- 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h index 461c41a05..f8e4cec24 100644 --- a/Marlin/language_cz.h +++ b/Marlin/language_cz.h @@ -209,13 +209,13 @@ #define MSG_INFO_BAUDRATE "Rychlost" #define MSG_INFO_PROTOCOL "Protokol" #if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Pocet tisku " - #define MSG_INFO_FINISHED_PRINTS "Dokonceno " - #define MSG_INFO_PRINT_TIME "Celkovy cas " + #define MSG_INFO_PRINT_COUNT "Pocet tisku" + #define MSG_INFO_COMPLETED_PRINTS "Dokonceno " + #define MSG_INFO_PRINT_TIME "Celkovy cas" #else - #define MSG_INFO_PRINT_COUNT "Tisky " - #define MSG_INFO_FINISHED_PRINTS "Hotovo " - #define MSG_INFO_PRINT_TIME "Cas " + #define MSG_INFO_PRINT_COUNT "Tisky " + #define MSG_INFO_COMPLETED_PRINTS "Hotovo" + #define MSG_INFO_PRINT_TIME "Cas " #endif #define MSG_INFO_MIN_TEMP "Teplota min" #define MSG_INFO_MAX_TEMP "Teplota max" diff --git a/Marlin/language_de.h b/Marlin/language_de.h index f828c4a47..f9e2644aa 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -179,9 +179,16 @@ #define MSG_INFO_EXTRUDERS "Extruders" #define MSG_INFO_BAUDRATE "Baud" #define MSG_INFO_PROTOCOL "Protokol" -#define MSG_INFO_TOTAL_PRINTS "Gesamte Drucke" -#define MSG_INFO_FINISHED_PRINTS "Beendete Drucke" -#define MSG_INFO_PRINT_TIME "Gesamte Druckzeit" + +#if LCD_WIDTH > 19 + #define MSG_INFO_TOTAL_PRINTS "Gesamte Drucke " + #define MSG_INFO_COMPLETED_PRINTS "Beendete Drucke " + #define MSG_INFO_PRINT_TIME "Gesamte Druckzeit" +#else + #define MSG_INFO_PRINT_COUNT "Prints " + #define MSG_INFO_COMPLETED_PRINTS "Completed" + #define MSG_INFO_PRINT_TIME "Duration " +#endif #define MSG_INFO_MIN_TEMP "Min Temp" #define MSG_INFO_MAX_TEMP "Max Temp" #define MSG_INFO_PSU "Stromversorgung" diff --git a/Marlin/language_el.h b/Marlin/language_el.h index c62366081..f0d94db10 100644 --- a/Marlin/language_el.h +++ b/Marlin/language_el.h @@ -209,12 +209,12 @@ #define MSG_INFO_PROTOCOL "Protocol" #if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Print Count " - #define MSG_INFO_FINISHED_PRINTS "Finished " - #define MSG_INFO_PRINT_TIME "Total Time " + #define MSG_INFO_PRINT_COUNT "Print Count" + #define MSG_INFO_COMPLETED_PRINTS "Completed " + #define MSG_INFO_PRINT_TIME "Total Time " #else #define MSG_INFO_PRINT_COUNT "Prints " - #define MSG_INFO_FINISHED_PRINTS "Finished " + #define MSG_INFO_COMPLETED_PRINTS "Completed" #define MSG_INFO_PRINT_TIME "Duration " #endif #define MSG_INFO_MIN_TEMP "Min Temp" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index eb1450578..27444aebd 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -555,20 +555,20 @@ #if LCD_WIDTH > 19 #ifndef MSG_INFO_PRINT_COUNT - #define MSG_INFO_PRINT_COUNT "Print Count " + #define MSG_INFO_PRINT_COUNT "Print Count" #endif - #ifndef MSG_INFO_FINISHED_PRINTS - #define MSG_INFO_FINISHED_PRINTS "Finished " + #ifndef MSG_INFO_COMPLETED_PRINTS + #define MSG_INFO_COMPLETED_PRINTS "Completed " #endif #ifndef MSG_INFO_PRINT_TIME - #define MSG_INFO_PRINT_TIME "Total Time " + #define MSG_INFO_PRINT_TIME "Total Time " #endif #else #ifndef MSG_INFO_PRINT_COUNT #define MSG_INFO_PRINT_COUNT "Prints " #endif - #ifndef MSG_INFO_FINISHED_PRINTS - #define MSG_INFO_FINISHED_PRINTS "Finished " + #ifndef MSG_INFO_COMPLETED_PRINTS + #define MSG_INFO_COMPLETED_PRINTS "Completed" #endif #ifndef MSG_INFO_PRINT_TIME #define MSG_INFO_PRINT_TIME "Duration " diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 4a2e08e9a..09c14107a 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1971,9 +1971,9 @@ void kill_screen(const char* lcd_msg) { sprintf_P(timeString, PSTR("%i:%02i"), int(stats.printTime / 60 / 60), int(stats.printTime / 60) % 60); START_SCREEN(); // 12345678901234567890 - STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count : 999 - STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": ", false, false, itostr3left(stats.finishedPrints)); // Finished : 666 - STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, timeString); // Total Time : 123:45 + STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count: 999 + STATIC_ITEM(MSG_INFO_COMPLETED_PRINTS": ", false, false, itostr3left(stats.finishedPrints)); // Completed : 666 + STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, timeString); // Total Time : 123:45 END_SCREEN(); } #endif // PRINTCOUNTER