🎨 Fewer serial macros
This commit is contained in:
@@ -333,7 +333,7 @@ void GCodeParser::parse(char *p) {
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) {
|
||||
SERIAL_ECHOPAIR("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1);
|
||||
SERIAL_ECHOPGM("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1);
|
||||
if (has_val) SERIAL_ECHOPGM(" (has_val)");
|
||||
}
|
||||
#endif
|
||||
@@ -341,7 +341,7 @@ void GCodeParser::parse(char *p) {
|
||||
if (!has_val && !string_arg) { // No value? First time, keep as string_arg
|
||||
string_arg = p - 1;
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ void GCodeParser::parse(char *p) {
|
||||
else if (!string_arg) { // Not A-Z? First time, keep as the string_arg
|
||||
string_arg = p - 1;
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ void GCodeParser::unknown_command_warning() {
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
|
||||
void GCodeParser::debug() {
|
||||
SERIAL_ECHOPAIR("Command: ", command_ptr, " (", command_letter);
|
||||
SERIAL_ECHOPGM("Command: ", command_ptr, " (", command_letter);
|
||||
SERIAL_ECHO(codenum);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
#if ENABLED(FASTER_GCODE_PARSER)
|
||||
@@ -398,18 +398,18 @@ void GCodeParser::unknown_command_warning() {
|
||||
for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' ');
|
||||
SERIAL_CHAR('}');
|
||||
#else
|
||||
SERIAL_ECHOPAIR(" args: { ", command_args, " }");
|
||||
SERIAL_ECHOPGM(" args: { ", command_args, " }");
|
||||
#endif
|
||||
if (string_arg) {
|
||||
SERIAL_ECHOPAIR(" string: \"", string_arg);
|
||||
SERIAL_ECHOPGM(" string: \"", string_arg);
|
||||
SERIAL_CHAR('"');
|
||||
}
|
||||
SERIAL_ECHOLNPGM("\n");
|
||||
for (char c = 'A'; c <= 'Z'; ++c) {
|
||||
if (seen(c)) {
|
||||
SERIAL_ECHOPAIR("Code '", c); SERIAL_ECHOPGM("':");
|
||||
SERIAL_ECHOPGM("Code '", c); SERIAL_ECHOPGM("':");
|
||||
if (has_value()) {
|
||||
SERIAL_ECHOLNPAIR(
|
||||
SERIAL_ECHOLNPGM(
|
||||
"\n float: ", value_float(),
|
||||
"\n long: ", value_long(),
|
||||
"\n ulong: ", value_ulong(),
|
||||
|
||||
Reference in New Issue
Block a user