Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial: Indicate gcode cmd length longer than allowed. #4168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Marlin/Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
#define MSG_STATS "Stats: "
#define MSG_FILE_SAVED "Done saving file."
#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
#define MSG_ERR_LINE_LENGTH "Line exceeds max buffer length. Last Line: "
#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
#define MSG_FILE_PRINTED "Done printing file"
Expand Down
1 change: 1 addition & 0 deletions lib/Marlin/Marlin/src/gcode/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ void GCodeQueue::get_serial_commands() {
else if (serial_count[i] >= MAX_CMD_SIZE - 1) {
// Keep fetching, but ignore normal characters beyond the max length
// The command will be injected when EOL is reached
gcode_line_error(PSTR(MSG_ERR_LINE_LENGTH), i);
}
else if (serial_char == '\\') { // Handle escapes
// if we have one more character, copy it over
Expand Down