Move M118 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 00:42:42 -05:00
parent 811c32b85a
commit 379f16558e
3 changed files with 5 additions and 6 deletions

View file

@ -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"

View file

@ -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;

View file

@ -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);