Merge pull request #7182 from Bob-the-Kuhn/has__value_fix_

Correct has_value() when FASTER_GCODE_PARSER is enabled
2.0.x
Bob-the-Kuhn 7 years ago committed by GitHub
commit cd2ac3b759

@ -36,7 +36,11 @@
//#define DEBUG_GCODE_PARSER //#define DEBUG_GCODE_PARSER
#if ENABLED(DEBUG_GCODE_PARSER) #if ENABLED(DEBUG_GCODE_PARSER)
#include "hex_print_routines.h" #if ENABLED(AUTO_BED_LEVELING_UBL)
extern char* hex_address(const void * const w);
#else
#include "hex_print_routines.h"
#endif
#include "serial.h" #include "serial.h"
#endif #endif
@ -132,7 +136,7 @@ public:
const uint8_t ind = LETTER_OFF(c); const uint8_t ind = LETTER_OFF(c);
if (ind >= COUNT(param)) return false; // Only A-Z if (ind >= COUNT(param)) return false; // Only A-Z
const bool b = TEST(codebits[PARAM_IND(ind)], PARAM_BIT(ind)); const bool b = TEST(codebits[PARAM_IND(ind)], PARAM_BIT(ind));
if (b) value_ptr = command_ptr + param[ind]; if (b) value_ptr = param[ind] ? command_ptr + param[ind] : (char*)NULL;
return b; return b;
} }

Loading…
Cancel
Save