diff --git a/src/ArduinoAVR/Repetier/Commands.cpp b/src/ArduinoAVR/Repetier/Commands.cpp index d70be8f..43a26a5 100644 --- a/src/ArduinoAVR/Repetier/Commands.cpp +++ b/src/ArduinoAVR/Repetier/Commands.cpp @@ -1308,6 +1308,12 @@ void Commands::processMCode(GCode *com) UI_STATUS_UPD_RAM(com->text); } break; + case 118: // M118 message to host + if(com->hasString()) + { + Com::printFLN(com->text); + } + break; case 119: // M119 Commands::waitUntilEndOfAllMoves(); #if (X_MIN_PIN > -1) && MIN_HARDWARE_ENDSTOP_X diff --git a/src/ArduinoAVR/Repetier/Repetier.ino b/src/ArduinoAVR/Repetier/Repetier.ino index ae050ae..2f3f76d 100644 --- a/src/ArduinoAVR/Repetier/Repetier.ino +++ b/src/ArduinoAVR/Repetier/Repetier.ino @@ -91,6 +91,7 @@ Custom M Codes - M115- Capabilities string - M116 - Wait for all temperatures in a +/- 1 degree range - M117 - Write message in status row on lcd +- M118 - Write message to host - M119 - Report endstop status - M140 S F1 - Set bed target temp, F1 makes a beep when temperature is reached the first time - M163 S P - Set weight for this mixing extruder drive diff --git a/src/ArduinoAVR/Repetier/gcode.cpp b/src/ArduinoAVR/Repetier/gcode.cpp index a17fa89..2670cdb 100644 --- a/src/ArduinoAVR/Repetier/gcode.cpp +++ b/src/ArduinoAVR/Repetier/gcode.cpp @@ -665,7 +665,7 @@ bool GCode::parseAscii(char *line,bool fromSerial) params |=2; if(M > 255) params |= 4096; // handle non standard text arguments that some M codes have - if (M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 117) + if (M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 117 || M == 118) { // after M command we got a filename or text char digit; @@ -683,7 +683,7 @@ bool GCode::parseAscii(char *line,bool fromSerial) text = pos; while (*pos) { - if((M != 117 && *pos==' ') || *pos=='*') break; + if((M != 117 && M != 20 && M != 118 && *pos==' ') || *pos=='*') break; pos++; // find a space as file name end } *pos = 0; // truncate filename by erasing space with nul, also skips checksum diff --git a/src/ArduinoDUE/Repetier/Commands.cpp b/src/ArduinoDUE/Repetier/Commands.cpp index fc48854..f2ffae5 100644 --- a/src/ArduinoDUE/Repetier/Commands.cpp +++ b/src/ArduinoDUE/Repetier/Commands.cpp @@ -2052,6 +2052,11 @@ void Commands::processMCode(GCode *com) { UI_STATUS_UPD_RAM(com->text); } break; + case 118: // M118 message to host + if(com->hasString()) { + Com::printFLN(com->text); + } + break; case 119: // M119 Commands::waitUntilEndOfAllMoves(); Endstops::update(); diff --git a/src/ArduinoDUE/Repetier/Repetier.ino b/src/ArduinoDUE/Repetier/Repetier.ino index 9c6adae..af44af2 100644 --- a/src/ArduinoDUE/Repetier/Repetier.ino +++ b/src/ArduinoDUE/Repetier/Repetier.ino @@ -124,6 +124,7 @@ Custom M Codes - M115- Capabilities string - M116 - Wait for all temperatures in a +/- 1 degree range - M117 - Write message in status row on lcd +- M118 - Write message to host - M119 - Report endstop status - M120 - Report beeper status - M121 - Report sensors status diff --git a/src/ArduinoDUE/Repetier/gcode.cpp b/src/ArduinoDUE/Repetier/gcode.cpp index 778e3ca..6996abd 100644 --- a/src/ArduinoDUE/Repetier/gcode.cpp +++ b/src/ArduinoDUE/Repetier/gcode.cpp @@ -773,7 +773,7 @@ bool GCode::parseAscii(char *line,bool fromSerial) params |= 2; if(M > 255) params |= 4096; // handle non standard text arguments that some M codes have - if (M == 20 || M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 36 || M == 117) + if (M == 20 || M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 36 || M == 117 || M == 118) { // after M command we got a filename or text char digit; @@ -791,7 +791,7 @@ bool GCode::parseAscii(char *line,bool fromSerial) text = pos; while (*pos) { - if((M != 117 && M != 20 && *pos==' ') || *pos=='*') break; + if((M != 117 && M != 20 && M != 118 && *pos==' ') || *pos=='*') break; pos++; // find a space as file name end } *pos = 0; // truncate filename by erasing space with null, also skips checksum