Move M301 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 03:07:35 -05:00
parent 4f14849675
commit 609c4eea32
3 changed files with 12 additions and 10 deletions

View File

@ -352,10 +352,6 @@ bool pin_is_protected(const int8_t pin) {
return false; return false;
} }
#if ENABLED(PIDTEMP)
#include "gcode/config/M301.h"
#endif
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
#include "gcode/config/M304.h" #include "gcode/config/M304.h"
#endif #endif

View File

@ -20,6 +20,13 @@
* *
*/ */
#include "../../inc/MarlinConfig.h"
#if ENABLED(PIDTEMP)
#include "../gcode.h"
#include "../../module/temperature.h"
/** /**
* M301: Set PID parameters P I D (and optionally C, L) * M301: Set PID parameters P I D (and optionally C, L)
* *
@ -32,7 +39,7 @@
* C[float] Kc term * C[float] Kc term
* L[float] LPQ length * L[float] LPQ length
*/ */
void gcode_M301() { void GcodeSuite::M301() {
// multi-extruder PID patch: M301 updates or prints a single extruder's PID values // multi-extruder PID patch: M301 updates or prints a single extruder's PID values
// default behaviour (omitting E parameter) is to update for extruder 0 only // default behaviour (omitting E parameter) is to update for extruder 0 only
@ -67,3 +74,5 @@ void gcode_M301() {
SERIAL_ERRORLN(MSG_INVALID_EXTRUDER); SERIAL_ERRORLN(MSG_INVALID_EXTRUDER);
} }
} }
#endif // PIDTEMP

View File

@ -121,7 +121,6 @@ extern void gcode_M164();
extern void gcode_M165(); extern void gcode_M165();
extern void gcode_M240(); extern void gcode_M240();
extern void gcode_M250(); extern void gcode_M250();
extern void gcode_M301();
extern void gcode_M302(); extern void gcode_M302();
extern void gcode_M304(); extern void gcode_M304();
extern void gcode_M350(); extern void gcode_M350();
@ -570,10 +569,8 @@ void GcodeSuite::process_next_command() {
#endif #endif
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
case 301: // M301: Set hotend PID parameters case 301: M301(); break; // M301: Set hotend PID parameters
gcode_M301(); #endif
break;
#endif // PIDTEMP
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
case 304: // M304: Set bed PID parameters case 304: // M304: Set bed PID parameters