From 5611852e1b9ec51d6110ae7d6deb557bfe5a7560 Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Thu, 29 Jun 2017 14:12:35 -0400 Subject: [PATCH] Fix/implement M110 command. Allow colons in command - don't treat as EOL. --- Firmware/Marlin_main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 30035559d..3a33aeedd 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1379,7 +1379,6 @@ void get_command() continue; if(serial_char == '\n' || serial_char == '\r' || - (serial_char == ':' && comment_mode == false) || serial_count >= (MAX_CMD_SIZE - 1) ) { if(!serial_count) { //if empty line @@ -1388,7 +1387,6 @@ void get_command() } cmdbuffer[bufindw+serial_count+1] = 0; //terminate string if(!comment_mode){ - comment_mode = false; //for new command if ((strchr_pointer = strstr(cmdbuffer+bufindw+1, "PRUSA")) == NULL && (strchr_pointer = strchr(cmdbuffer+bufindw+1, 'N')) != NULL) { if ((strchr_pointer = strchr(cmdbuffer+bufindw+1, 'N')) != NULL) { @@ -4336,6 +4334,12 @@ Sigma_Exit: } } break; + case 110: // M110 - reset line pos + if (code_seen('N')) + gcode_LastN = code_value_long(); + else + gcode_LastN = 0; + break; case 115: // M115 if (code_seen('V')) { // Report the Prusa version number.