From e8b80d8c20423e53bdf0689d87599a0cab272a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Br=C3=A1zio?= Date: Wed, 6 Apr 2016 04:38:42 +0100 Subject: [PATCH] Implemented M75, M76, M77 to control the print timer --- Marlin/Marlin_main.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 969b59c031..63f7f5714c 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4082,6 +4082,27 @@ inline void gcode_M42() { #endif // AUTO_BED_LEVELING_FEATURE && Z_MIN_PROBE_REPEATABILITY_TEST +/** + * M75: Start print timer + */ +inline void gcode_M75() { + print_job_timer.start(); +} + +/** + * M76: Pause print timer + */ +inline void gcode_M76() { + print_job_timer.pause(); +} + +/** + * M77: Stop print timer + */ +inline void gcode_M77() { + print_job_timer.stop(); +} + /** * M104: Set hot end temperature */ @@ -6297,6 +6318,18 @@ void process_next_command() { break; #endif // AUTO_BED_LEVELING_FEATURE && Z_MIN_PROBE_REPEATABILITY_TEST + case 75: // Start print timer + gcode_M75(); + break; + + case 76: // Pause print timer + gcode_M76(); + break; + + case 77: // Stop print timer + gcode_M77(); + break; + #if ENABLED(M100_FREE_MEMORY_WATCHER) case 100: gcode_M100();