Service interval watchdog (#13105)

This commit is contained in:
revilor
2019-02-12 22:58:56 +01:00
committed by Scott Lahteine
parent 7f1b69b0c8
commit e56c13670d
81 changed files with 1321 additions and 16 deletions

View File

@ -22,6 +22,7 @@
#include "../gcode.h"
#include "../../module/printcounter.h"
#include "../../lcd/ultralcd.h"
#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
@ -63,10 +64,21 @@ void GcodeSuite::M77() {
* M78: Show print statistics
*/
void GcodeSuite::M78() {
if (parser.intval('S') == 78) // "M78 S78" will reset the statistics
if (parser.intval('S') == 78) { // "M78 S78" will reset the statistics
print_job_timer.initStats();
else
print_job_timer.showStats();
ui.reset_status();
return;
}
#if HAS_SERVICE_INTERVALS
if (parser.seenval('R')) {
print_job_timer.resetServiceInterval(parser.value_int());
ui.reset_status();
return;
}
#endif
print_job_timer.showStats();
}
#endif // PRINTCOUNTER