Sfoglia il codice sorgente

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

Correct has_value() when FASTER_GCODE_PARSER is enabled
Bob-the-Kuhn 7 anni fa
parent
commit
cd2ac3b759
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6
    2
      Marlin/gcode.h

+ 6
- 2
Marlin/gcode.h Vedi File

@@ -36,7 +36,11 @@
36 36
 //#define DEBUG_GCODE_PARSER
37 37
 
38 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 44
   #include "serial.h"
41 45
 #endif
42 46
 
@@ -132,7 +136,7 @@ public:
132 136
       const uint8_t ind = LETTER_OFF(c);
133 137
       if (ind >= COUNT(param)) return false; // Only A-Z
134 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 140
       return b;
137 141
     }
138 142
 

Loading…
Annulla
Salva