| 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 |
no test coverage detected