Allow SERIAL_ECHOPAIR to take up to 12 pairs (#13311)
This commit is contained in:
@@ -185,51 +185,32 @@ void PrintCounter::showStats() {
|
||||
char buffer[21];
|
||||
|
||||
SERIAL_ECHOPGM(MSG_STATS);
|
||||
SERIAL_ECHOLNPAIR(
|
||||
"Prints: ", data.totalPrints,
|
||||
", Finished: ", data.finishedPrints,
|
||||
", Failed: ", data.totalPrints - data.finishedPrints
|
||||
- ((isRunning() || isPaused()) ? 1 : 0) // Remove 1 from failures with an active counter
|
||||
);
|
||||
|
||||
SERIAL_ECHOPGM("Prints: ");
|
||||
SERIAL_ECHO(data.totalPrints);
|
||||
|
||||
SERIAL_ECHOPGM(", Finished: ");
|
||||
SERIAL_ECHO(data.finishedPrints);
|
||||
|
||||
SERIAL_ECHOPGM(", Failed: "); // Note: Removes 1 from failures with an active counter
|
||||
SERIAL_ECHO(data.totalPrints - data.finishedPrints
|
||||
- ((isRunning() || isPaused()) ? 1 : 0));
|
||||
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOPGM(MSG_STATS);
|
||||
|
||||
duration_t elapsed = data.printTime;
|
||||
elapsed.toString(buffer);
|
||||
|
||||
SERIAL_ECHOPGM("Total time: ");
|
||||
SERIAL_ECHO(buffer);
|
||||
|
||||
SERIAL_ECHOPAIR("Total time: ", buffer);
|
||||
#if ENABLED(DEBUG_PRINTCOUNTER)
|
||||
SERIAL_ECHOPGM(" (");
|
||||
SERIAL_ECHO(data.printTime);
|
||||
SERIAL_ECHOPAIR(" (", data.printTime);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
|
||||
elapsed = data.longestPrint;
|
||||
elapsed.toString(buffer);
|
||||
|
||||
SERIAL_ECHOPGM(", Longest job: ");
|
||||
SERIAL_ECHO(buffer);
|
||||
|
||||
SERIAL_ECHOPAIR(", Longest job: ", buffer);
|
||||
#if ENABLED(DEBUG_PRINTCOUNTER)
|
||||
SERIAL_ECHOPGM(" (");
|
||||
SERIAL_ECHO(data.longestPrint);
|
||||
SERIAL_ECHOPAIR(" (", data.longestPrint);
|
||||
SERIAL_CHAR(')');
|
||||
#endif
|
||||
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOPGM(MSG_STATS);
|
||||
|
||||
SERIAL_ECHOPGM("Filament used: ");
|
||||
SERIAL_ECHO(data.filamentUsed / 1000);
|
||||
SERIAL_ECHOPAIR("\n" MSG_STATS "Filament used: ", data.filamentUsed / 1000);
|
||||
SERIAL_CHAR('m');
|
||||
|
||||
SERIAL_EOL();
|
||||
|
||||
#if SERVICE_INTERVAL_1 > 0
|
||||
|
||||
Reference in New Issue
Block a user