Added the S000, P000 and R000 commands in the gcode Parser to avoid the
Messages "echo:Unknown command: "S000".
This commit is contained in:
parent
56747e9ba1
commit
23250e35e0
2 changed files with 28 additions and 3 deletions
|
|
@ -262,6 +262,13 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||||
|
|
||||||
// Handle a known G, M, or T
|
// Handle a known G, M, or T
|
||||||
switch (parser.command_letter) {
|
switch (parser.command_letter) {
|
||||||
|
#if ENABLED(FULL_REPORT_TO_HOST_FEATURE)
|
||||||
|
case 'S': case 'P': case 'R': switch (parser.codenum) {
|
||||||
|
case 0: break;
|
||||||
|
default: parser.unknown_command_warning(); break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case 'G': switch (parser.codenum) {
|
case 'G': switch (parser.codenum) {
|
||||||
|
|
||||||
case 0: case 1: G0_G1( // G0: Fast Move, G1: Linear Move
|
case 0: case 1: G0_G1( // G0: Fast Move, G1: Linear Move
|
||||||
|
|
|
||||||
|
|
@ -155,10 +155,28 @@ void GCodeParser::parse(char *p) {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Bail if the letter is not S, P, or R
|
||||||
|
#if ENABLED(FULL_REPORT_TO_HOST_FEATURE)
|
||||||
|
switch (letter) {
|
||||||
|
case 'S': case 'P': case 'R':
|
||||||
|
// Bail if there's no command code number
|
||||||
|
if (!NUMERIC(*p)) break;
|
||||||
|
// Save the command letter at this point
|
||||||
|
// A '?' signifies an unknown command
|
||||||
|
command_letter = letter;
|
||||||
|
// Get the code number - integer digits only
|
||||||
|
codenum = 0;
|
||||||
|
do { codenum *= 10, codenum += *p++ - '0'; } while (NUMERIC(*p));
|
||||||
|
return;
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Bail if the letter is not G, M, or T
|
// Bail if the letter is not G, M, or T
|
||||||
// (or a valid parameter for the current motion mode)
|
// (or a valid parameter for the current motion mode)
|
||||||
switch (letter) {
|
switch (letter) {
|
||||||
|
|
||||||
case 'G': case 'M': case 'T':
|
case 'G': case 'M': case 'T':
|
||||||
#if ENABLED(CANCEL_OBJECTS)
|
#if ENABLED(CANCEL_OBJECTS)
|
||||||
case 'O':
|
case 'O':
|
||||||
|
|
@ -216,7 +234,7 @@ void GCodeParser::parse(char *p) {
|
||||||
|
|
||||||
#if ENABLED(GCODE_MOTION_MODES)
|
#if ENABLED(GCODE_MOTION_MODES)
|
||||||
#if ENABLED(ARC_SUPPORT)
|
#if ENABLED(ARC_SUPPORT)
|
||||||
case 'I': case 'J': case 'R':
|
case 'I': case 'J' : case 'R':
|
||||||
if (motion_mode_codenum != 2 && motion_mode_codenum != 3) return;
|
if (motion_mode_codenum != 2 && motion_mode_codenum != 3) return;
|
||||||
#endif
|
#endif
|
||||||
case 'P': case 'Q':
|
case 'P': case 'Q':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue