From 379f16558e5ebdfc2c005463e40211ac295fb28b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 Sep 2017 00:42:42 -0500 Subject: [PATCH] Move M118 to cpp --- Marlin/src/Marlin.cpp | 1 - Marlin/src/gcode/gcode.cpp | 6 ++---- Marlin/src/gcode/host/{M118.h => M118.cpp} | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) rename Marlin/src/gcode/host/{M118.h => M118.cpp} (95%) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index e20b55ad6..e7e92242f 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -355,7 +355,6 @@ bool pin_is_protected(const int8_t pin) { return false; } -#include "gcode/host/M118.h" #include "gcode/host/M119.h" #include "gcode/control/M120_M121.h" diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index b2145675a..3c3f1cd80 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) { // // Placeholders for non-migrated codes // -extern void gcode_M118(); extern void gcode_M119(); extern void gcode_M120(); extern void gcode_M121(); @@ -498,9 +497,8 @@ void GcodeSuite::process_next_command() { case 115: M115(); break; // M115: Report capabilities case 117: M117(); break; // M117: Set LCD message text, if possible - case 118: // M118: Display a message in the host console - gcode_M118(); - break; + case 118: M118(); break; // M118: Display a message in the host console + case 119: // M119: Report endstop states gcode_M119(); break; diff --git a/Marlin/src/gcode/host/M118.h b/Marlin/src/gcode/host/M118.cpp similarity index 95% rename from Marlin/src/gcode/host/M118.h rename to Marlin/src/gcode/host/M118.cpp index 70e8c5f5d..30a41876f 100644 --- a/Marlin/src/gcode/host/M118.h +++ b/Marlin/src/gcode/host/M118.cpp @@ -20,13 +20,15 @@ * */ +#include "../gcode.h" + /** * M118: Display a message in the host console. * * A Append '// ' for an action command, as in OctoPrint * E Have the host 'echo:' the text */ -void gcode_M118() { +void GcodeSuite::M118() { if (parser.boolval('E')) SERIAL_ECHO_START(); if (parser.boolval('A')) SERIAL_ECHOPGM("// "); SERIAL_ECHOLN(parser.string_arg);