Fix incorrect print stat in ExtUI (#14881)

This commit is contained in:
Marcio Teixeira 2019-08-10 18:25:30 -06:00 committed by Scott Lahteine
parent dc21e2e691
commit 13d8dc0b79

View File

@ -792,7 +792,7 @@ namespace ExtUI {
char* getTotalPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints)); return buffer; } char* getTotalPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints)); return buffer; }
char* getFinishedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().finishedPrints)); return buffer; } char* getFinishedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().finishedPrints)); return buffer; }
char* getTotalPrintTime_str(char buffer[21]) { duration_t(print_job_timer.getStats().printTime).toString(buffer); return buffer; } char* getTotalPrintTime_str(char buffer[21]) { duration_t(print_job_timer.getStats().printTime).toString(buffer); return buffer; }
char* getLongestPrint_str(char buffer[21]) { duration_t(print_job_timer.getStats().printTime).toString(buffer); return buffer; } char* getLongestPrint_str(char buffer[21]) { duration_t(print_job_timer.getStats().longestPrint).toString(buffer); return buffer; }
char* getFilamentUsed_str(char buffer[21]) { char* getFilamentUsed_str(char buffer[21]) {
printStatistics stats = print_job_timer.getStats(); printStatistics stats = print_job_timer.getStats();
sprintf_P(buffer, PSTR("%ld.%im"), long(stats.filamentUsed / 1000), int16_t(stats.filamentUsed / 100) % 10); sprintf_P(buffer, PSTR("%ld.%im"), long(stats.filamentUsed / 1000), int16_t(stats.filamentUsed / 100) % 10);