Move M75-M78 to cpp
This commit is contained in:
parent
fc52fc72ac
commit
2c1eda9e00
@ -370,14 +370,6 @@ bool pin_is_protected(const int8_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "gcode/stats/M75.h"
|
||||
#include "gcode/stats/M76.h"
|
||||
#include "gcode/stats/M77.h"
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#include "gcode/stats/M78.h"
|
||||
#endif
|
||||
|
||||
#include "gcode/temperature/M105.h"
|
||||
|
||||
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
|
||||
|
@ -117,10 +117,6 @@ void GcodeSuite::dwell(millis_t time) {
|
||||
// Placeholders for non-migrated codes
|
||||
//
|
||||
extern void gcode_M18_M84();
|
||||
extern void gcode_M75();
|
||||
extern void gcode_M76();
|
||||
extern void gcode_M77();
|
||||
extern void gcode_M78();
|
||||
extern void gcode_M80();
|
||||
extern void gcode_M81();
|
||||
extern void gcode_M82();
|
||||
@ -444,16 +440,12 @@ void GcodeSuite::process_next_command() {
|
||||
case 49: M49(); break; // M49: Turn on or off G26 debug flag for verbose output
|
||||
#endif
|
||||
|
||||
case 75: // M75: Start print timer
|
||||
gcode_M75(); break;
|
||||
case 76: // M76: Pause print timer
|
||||
gcode_M76(); break;
|
||||
case 77: // M77: Stop print timer
|
||||
gcode_M77(); break;
|
||||
case 75: M75(); break; // M75: Start print timer
|
||||
case 76: M76(); break; // M76: Pause print timer
|
||||
case 77: M77(); break; // M77: Stop print timer
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
case 78: // M78: Show print statistics
|
||||
gcode_M78(); break;
|
||||
case 78: M78(); break; // M78: Show print statistics
|
||||
#endif
|
||||
|
||||
#if ENABLED(M100_FREE_MEMORY_WATCHER)
|
||||
|
@ -20,7 +20,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/printcounter.h"
|
||||
|
||||
/**
|
||||
* M75: Start print timer
|
||||
*/
|
||||
void gcode_M75() { print_job_timer.start(); }
|
||||
void GcodeSuite::M75() { print_job_timer.start(); }
|
||||
|
||||
/**
|
||||
* M76: Pause print timer
|
||||
*/
|
||||
void GcodeSuite::M76() { print_job_timer.pause(); }
|
||||
|
||||
/**
|
||||
* M77: Stop print timer
|
||||
*/
|
||||
void GcodeSuite::M77() { print_job_timer.stop(); }
|
@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* M76: Pause print timer
|
||||
*/
|
||||
void gcode_M76() { print_job_timer.pause(); }
|
@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* M77: Stop print timer
|
||||
*/
|
||||
void gcode_M77() { print_job_timer.stop(); }
|
@ -20,12 +20,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/printcounter.h"
|
||||
|
||||
/**
|
||||
* M78: Show print statistics
|
||||
*/
|
||||
void gcode_M78() {
|
||||
void GcodeSuite::M78() {
|
||||
if (parser.intval('S') == 78) // "M78 S78" will reset the statistics
|
||||
print_job_timer.initStats();
|
||||
else
|
||||
print_job_timer.showStats();
|
||||
}
|
||||
|
||||
#endif // PRINTCOUNTER
|
Loading…
Reference in New Issue
Block a user