Merge pull request #4327 from thinkyhead/rc_petrzjr_long_print

LCD Longer print
master
Scott Lahteine 8 years ago committed by GitHub
commit cc3ef73583

@ -189,6 +189,9 @@
#define MSG_ERR_MINTEMP_BED "NIZ. TEPL. PODL." #define MSG_ERR_MINTEMP_BED "NIZ. TEPL. PODL."
#define MSG_HALTED "TISK. ZASTAVENA" #define MSG_HALTED "TISK. ZASTAVENA"
#define MSG_PLEASE_RESET "Provedte reset" #define MSG_PLEASE_RESET "Provedte reset"
#define MSG_SHORT_DAY "d"
#define MSG_SHORT_HOUR "h"
#define MSG_SHORT_MINUTE "m"
#define MSG_HEATING "Zahrivani..." #define MSG_HEATING "Zahrivani..."
#define MSG_HEATING_COMPLETE "Zahrati hotovo." #define MSG_HEATING_COMPLETE "Zahrati hotovo."
#define MSG_BED_HEATING "Zahrivani podl." #define MSG_BED_HEATING "Zahrivani podl."

@ -488,8 +488,14 @@
#ifndef MSG_PLEASE_RESET #ifndef MSG_PLEASE_RESET
#define MSG_PLEASE_RESET "Please reset" #define MSG_PLEASE_RESET "Please reset"
#endif #endif
#ifndef MSG_END_DAY #ifndef MSG_SHORT_DAY
#define MSG_END_DAY "days" #define MSG_SHORT_DAY "d" // One character only
#endif
#ifndef MSG_SHORT_HOUR
#define MSG_SHORT_HOUR "h" // One character only
#endif
#ifndef MSG_SHORT_MINUTE
#define MSG_SHORT_MINUTE "m" // One character only
#endif #endif
#ifndef MSG_PRINT_TIME #ifndef MSG_PRINT_TIME
#define MSG_PRINT_TIME "Print time" #define MSG_PRINT_TIME "Print time"

@ -1969,13 +1969,19 @@ void kill_screen(const char* lcd_msg) {
print_job_counter.loadStats(); print_job_counter.loadStats();
printStatistics stats = print_job_counter.getStats(); printStatistics stats = print_job_counter.getStats();
char timeString[8]; char timeString[14];
sprintf_P(timeString, PSTR("%i:%02i"), int(stats.printTime / 60 / 60), int(stats.printTime / 60) % 60); sprintf_P(timeString,
PSTR("%i" MSG_SHORT_DAY " %i" MSG_SHORT_HOUR " %i" MSG_SHORT_MINUTE),
int(stats.printTime / 60 / 60 / 24),
int((stats.printTime / 60 / 60) % 24),
int((stats.printTime / 60) % 60)
);
START_SCREEN(); // 12345678901234567890 START_SCREEN(); // 12345678901234567890
STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count: 999 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_COMPLETED_PRINTS": ", false, false, itostr3left(stats.finishedPrints)); // Completed : 666
STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, timeString); // Total Time : 123:45 STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false); // Total Time :
STATIC_ITEM(" ", false, false, timeString); // 12345d 12h 34m
END_SCREEN(); END_SCREEN();
} }
#endif // PRINTCOUNTER #endif // PRINTCOUNTER

Loading…
Cancel
Save