From 890879e7ee5a9424542d6d8968b4ce30da0d69ba Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Tue, 22 Sep 2015 13:09:09 -0400 Subject: [PATCH] Messages: more newlines needed. The recent switch to send 'ok' postponed requires also sending a newline in a few places, because this 'ok' is no longer at the start of the line. Now it appears in its own line. A recent commit tried to correct this already, but it missed a few locations. Also remove the comments promising a forthcoming newline from gcode_parse. --- gcode_process.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/gcode_process.c b/gcode_process.c index 8addb87..2c79498 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -335,7 +335,6 @@ void process_gcode_command() { // unknown gcode: spit an error default: sersendf_P(PSTR("E: Bad G-code %d\n"), next_target.G); - // newline is sent from gcode_parse after we return return; } } @@ -634,7 +633,6 @@ void process_gcode_command() { print_queue(); } - // newline is sent from gcode_parse after we return break; case 115: @@ -650,7 +648,6 @@ void process_gcode_command() { //? sersendf_P(PSTR("FIRMWARE_NAME:Teacup FIRMWARE_URL:http://github.com/traumflug/Teacup_Firmware/ PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:%d TEMP_SENSOR_COUNT:%d HEATER_COUNT:%d\n"), 1, NUM_TEMP_SENSORS, NUM_HEATERS); - // newline is sent from gcode_parse after we return break; case 116: @@ -802,8 +799,7 @@ void process_gcode_command() { //? Disable echo. //? This command is only available in DEBUG builds. debug_flags &= ~DEBUG_ECHO; - serial_writestr_P(PSTR("Echo off")); - // newline is sent from gcode_parse after we return + serial_writestr_P(PSTR("Echo off\n")); break; case 241: @@ -811,15 +807,13 @@ void process_gcode_command() { //? Enable echo. //? This command is only available in DEBUG builds. debug_flags |= DEBUG_ECHO; - serial_writestr_P(PSTR("Echo on")); - // newline is sent from gcode_parse after we return + serial_writestr_P(PSTR("Echo on\n")); break; #endif /* DEBUG */ // unknown mcode: spit an error default: - sersendf_P(PSTR("E: Bad M-code %d"), next_target.M); - // newline is sent from gcode_parse after we return + sersendf_P(PSTR("E: Bad M-code %d\n"), next_target.M); } // switch (next_target.M) } // else if (next_target.seen_M) } // process_gcode_command()