From 3aca1271edc81f7779d74e5cd13eb602b7b29618 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Fri, 22 Dec 2017 18:54:55 +0100 Subject: [PATCH 1/2] serial resend request always contains OK --- Firmware/Marlin_main.cpp | 7 ++++--- Firmware/cmdqueue.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 602c413d4..4ce3da8c7 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1703,7 +1703,7 @@ void homeaxis(int axis) feedrate = homing_feedrate[axis]; #ifdef TMC2130 - tmc2130_home_enter(X_AXIS_MASK << axis); + tmc2130_home_enter(X_AXIS_MASK << axis); #endif // Move right a bit, so that the print head does not touch the left end position, @@ -6159,14 +6159,15 @@ void FlushSerialRequestResend() MYSERIAL.flush(); SERIAL_PROTOCOLRPGM(MSG_RESEND); SERIAL_PROTOCOLLN(gcode_LastN + 1); - ClearToSend(); + previous_millis_cmd = millis(); + SERIAL_PROTOCOLLNRPGM(MSG_OK); } // Confirm the execution of a command, if sent from a serial line. // Execution of a command from a SD card will not be confirmed. void ClearToSend() { - previous_millis_cmd = millis(); + previous_millis_cmd = millis(); if (CMDBUFFER_CURRENT_TYPE == CMDBUFFER_CURRENT_TYPE_USB) SERIAL_PROTOCOLLNRPGM(MSG_OK); } diff --git a/Firmware/cmdqueue.cpp b/Firmware/cmdqueue.cpp index 2819d610d..d813cfaf5 100644 --- a/Firmware/cmdqueue.cpp +++ b/Firmware/cmdqueue.cpp @@ -480,7 +480,7 @@ void get_command() kill("", 2); // Store the current line into buffer, move to the next line. - cmdbuffer[bufindw] = CMDBUFFER_CURRENT_TYPE_USB; + cmdbuffer[bufindw] = CMDBUFFER_CURRENT_TYPE_USB; #ifdef CMDBUFFER_DEBUG SERIAL_ECHO_START; SERIAL_ECHOPGM("Storing a command line to buffer: "); From 711477278491acffc7ac43ca0ec2178ef506c7a7 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Fri, 22 Dec 2017 19:23:11 +0100 Subject: [PATCH 2/2] whitespace --- Firmware/Marlin_main.cpp | 2 +- Firmware/cmdqueue.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 4ce3da8c7..124a910b9 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -6167,7 +6167,7 @@ void FlushSerialRequestResend() // Execution of a command from a SD card will not be confirmed. void ClearToSend() { - previous_millis_cmd = millis(); + previous_millis_cmd = millis(); if (CMDBUFFER_CURRENT_TYPE == CMDBUFFER_CURRENT_TYPE_USB) SERIAL_PROTOCOLLNRPGM(MSG_OK); } diff --git a/Firmware/cmdqueue.cpp b/Firmware/cmdqueue.cpp index d813cfaf5..f2f376a1f 100644 --- a/Firmware/cmdqueue.cpp +++ b/Firmware/cmdqueue.cpp @@ -480,7 +480,7 @@ void get_command() kill("", 2); // Store the current line into buffer, move to the next line. - cmdbuffer[bufindw] = CMDBUFFER_CURRENT_TYPE_USB; + cmdbuffer[bufindw] = CMDBUFFER_CURRENT_TYPE_USB; #ifdef CMDBUFFER_DEBUG SERIAL_ECHO_START; SERIAL_ECHOPGM("Storing a command line to buffer: ");