MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / debug

Method debug

Marlin/src/gcode/parser.cpp:399–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397#if ENABLED(DEBUG_GCODE_PARSER)
398
399 void GCodeParser::debug() {
400 SERIAL_ECHOPGM("Command: ", command_ptr, " (", command_letter);
401 SERIAL_ECHO(codenum);
402 SERIAL_ECHOLNPGM(")");
403 #if ENABLED(FASTER_GCODE_PARSER)
404 SERIAL_ECHOPGM(" args: { ");
405 for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' ');
406 SERIAL_CHAR('}');
407 #else
408 SERIAL_ECHOPGM(" args: { ", command_args, " }");
409 #endif
410 if (string_arg) {
411 SERIAL_ECHOPGM(" string: \"", string_arg);
412 SERIAL_CHAR('"');
413 }
414 SERIAL_ECHOLNPGM("\n");
415 for (char c = 'A'; c <= 'Z'; ++c) {
416 if (seen(c)) {
417 SERIAL_ECHOPGM("Code '", c); SERIAL_ECHOPGM("':");
418 if (has_value()) {
419 SERIAL_ECHOLNPGM(
420 "\n float: ", value_float(),
421 "\n long: ", value_long(),
422 "\n ulong: ", value_ulong(),
423 "\n millis: ", value_millis(),
424 "\n sec-ms: ", value_millis_from_seconds(),
425 "\n int: ", value_int(),
426 "\n ushort: ", value_ushort(),
427 "\n byte: ", value_byte(),
428 "\n bool: ", value_bool(),
429 "\n linear: ", value_linear_units(),
430 "\n celsius: ", value_celsius()
431 );
432 }
433 else
434 SERIAL_ECHOLNPGM(" (no value)");
435 }
436 }
437 }
438
439#endif // DEBUG_GCODE_PARSER

Callers 4

M420Method · 0.45
G29Method · 0.45
M413Method · 0.45

Calls 2

SERIAL_ECHOFunction · 0.50
SERIAL_CHARFunction · 0.50

Tested by

no test coverage detected