Browse Source

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

Correct has_value() when FASTER_GCODE_PARSER is enabled
Bob-the-Kuhn 7 years ago
parent
commit
cd2ac3b759
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      Marlin/gcode.h

+ 6
- 2
Marlin/gcode.h View File

36
 //#define DEBUG_GCODE_PARSER
36
 //#define DEBUG_GCODE_PARSER
37
 
37
 
38
 #if ENABLED(DEBUG_GCODE_PARSER)
38
 #if ENABLED(DEBUG_GCODE_PARSER)
39
-  #include "hex_print_routines.h"
39
+  #if ENABLED(AUTO_BED_LEVELING_UBL)
40
+    extern char* hex_address(const void * const w);
41
+  #else  
42
+    #include "hex_print_routines.h"
43
+  #endif
40
   #include "serial.h"
44
   #include "serial.h"
41
 #endif
45
 #endif
42
 
46
 
132
       const uint8_t ind = LETTER_OFF(c);
136
       const uint8_t ind = LETTER_OFF(c);
133
       if (ind >= COUNT(param)) return false; // Only A-Z
137
       if (ind >= COUNT(param)) return false; // Only A-Z
134
       const bool b = TEST(codebits[PARAM_IND(ind)], PARAM_BIT(ind));
138
       const bool b = TEST(codebits[PARAM_IND(ind)], PARAM_BIT(ind));
135
-      if (b) value_ptr = command_ptr + param[ind];
139
+      if (b) value_ptr = param[ind] ? command_ptr + param[ind] : (char*)NULL;
136
       return b;
140
       return b;
137
     }
141
     }
138
 
142
 

Loading…
Cancel
Save