From bc4fa3984b7dde97607c14ddc58c981791e83ab1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 24 Jan 2018 00:29:04 -0600 Subject: [PATCH] Prettier codebits debugging --- Marlin/gcode.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Marlin/gcode.h b/Marlin/gcode.h index eb2d304c9..069beec1f 100644 --- a/Marlin/gcode.h +++ b/Marlin/gcode.h @@ -123,10 +123,9 @@ public: param[ind] = ptr ? ptr - command_ptr : 0; // parameter offset or 0 #if ENABLED(DEBUG_GCODE_PARSER) if (codenum == 800) { - const uint16_t * const adr = (uint16_t*)&codebits; SERIAL_ECHOPAIR("Set bit ", (int)ind); - SERIAL_ECHOPAIR(" of codebits (", hex_address((void*)adr[1])); - print_hex_word(adr[0]); + SERIAL_ECHOPAIR(" of codebits (", hex_address((void*)(codebits >> 16))); + print_hex_word((uint16_t)(codebits & 0xFFFF)); SERIAL_ECHOLNPAIR(") | param = ", (int)param[ind]); } #endif