From 4c5618c371be9e3dbbb55e0331c8faf5b576dda3 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Wed, 31 Jan 2018 15:09:36 +0100 Subject: [PATCH] failstats - reset "last print" counters card - new member variable "paused" (bool) --- Firmware/Marlin_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 2e3dc82a0..f541743f9 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -690,6 +690,13 @@ void crashdet_cancel() tmc2130_sg_stop_on_crash = true; } +void failstats_reset_print() +{ + eeprom_update_byte((uint8_t *)EEPROM_CRASH_COUNT_X, 0); + eeprom_update_byte((uint8_t *)EEPROM_CRASH_COUNT_Y, 0); + eeprom_update_byte((uint8_t *)EEPROM_FERROR_COUNT, 0); + eeprom_update_byte((uint8_t *)EEPROM_POWER_COUNT, 0); +} #ifdef MESH_BED_LEVELING @@ -3993,6 +4000,8 @@ void process_commands() card.openFile(strchr_pointer + 4,true); break; case 24: //M24 - Start SD print + if (!card.paused) + failstats_reset_print(); card.startFileprint(); starttime=millis(); break;