Tweak parser warning
This commit is contained in:
parent
ffcbba4447
commit
38873596ec
@ -260,8 +260,8 @@ extern uint8_t marlin_debug_flags;
|
||||
#define SERIAL_ERROR_START() serial_error_start()
|
||||
#define SERIAL_EOL() SERIAL_CHAR('\n')
|
||||
|
||||
#define SERIAL_ECHO_MSG(S) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(S); }while(0)
|
||||
#define SERIAL_ERROR_MSG(S) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPGM(S); }while(0)
|
||||
#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0)
|
||||
#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(V); }while(0)
|
||||
|
||||
#define SERIAL_ECHO_SP(C) serial_spaces(C)
|
||||
|
||||
@ -292,7 +292,6 @@ void serialprint_truefalse(const bool tf);
|
||||
void serial_spaces(uint8_t count);
|
||||
|
||||
void print_bin(const uint16_t val);
|
||||
|
||||
void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr);
|
||||
|
||||
inline void print_xyz(const xyz_pos_t &xyz, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr) {
|
||||
|
@ -353,7 +353,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 800: parser.debug(); break; // G800: GCode Parser Test for G
|
||||
#endif
|
||||
|
||||
default: parser.unknown_command_error(); break;
|
||||
default: parser.unknown_command_warning(); break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -856,7 +856,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 7219: M7219(); break; // M7219: Set LEDs, columns, and rows
|
||||
#endif
|
||||
|
||||
default: parser.unknown_command_error(); break;
|
||||
default: parser.unknown_command_warning(); break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -866,7 +866,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
#if ENABLED(WIFI_CUSTOM_COMMAND)
|
||||
if (wifi_custom_command(parser.command_ptr)) break;
|
||||
#endif
|
||||
parser.unknown_command_error();
|
||||
parser.unknown_command_warning();
|
||||
}
|
||||
|
||||
if (!no_ok) queue.ok_to_send();
|
||||
|
@ -333,9 +333,8 @@ void GCodeParser::parse(char *p) {
|
||||
|
||||
#endif // CNC_COORDINATE_SYSTEMS
|
||||
|
||||
void GCodeParser::unknown_command_error() {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR(MSG_UNKNOWN_COMMAND, command_ptr, "\"");
|
||||
void GCodeParser::unknown_command_warning() {
|
||||
SERIAL_ECHO_MSG(MSG_UNKNOWN_COMMAND, command_ptr, "\"");
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
@ -351,7 +350,10 @@ void GCodeParser::unknown_command_error() {
|
||||
#else
|
||||
SERIAL_ECHOPAIR(" args: { ", command_args, " }");
|
||||
#endif
|
||||
if (string_arg) SERIAL_ECHOPAIR(" string: \"", string_arg, "\"");
|
||||
if (string_arg) {
|
||||
SERIAL_ECHOPAIR(" string: \"", string_arg);
|
||||
SERIAL_CHAR('"');
|
||||
}
|
||||
SERIAL_ECHOLNPGM("\n");
|
||||
for (char c = 'A'; c <= 'Z'; ++c) {
|
||||
if (seen(c)) {
|
||||
|
@ -366,7 +366,7 @@ public:
|
||||
|
||||
static inline feedRate_t value_feedrate() { return MMM_TO_MMS(value_linear_units()); }
|
||||
|
||||
void unknown_command_error();
|
||||
void unknown_command_warning();
|
||||
|
||||
// Provide simple value accessors with default option
|
||||
static inline float floatval(const char c, const float dval=0.0) { return seenval(c) ? value_float() : dval; }
|
||||
|
Loading…
Reference in New Issue
Block a user