Przeglądaj źródła

correct value_bool() when FASTER_GCODE_PARSER is enabled

Also corrected compile issue when DEBUG_GCODE_PARSER and
AUTO_BED_LEVELING_UBL are both enabled.
Bob-the-Kuhn 7 lat temu
rodzic
commit
bfbf5f8200
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6
    2
      Marlin/gcode.h

+ 6
- 2
Marlin/gcode.h Wyświetl plik

@@ -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
 

Ładowanie…
Anuluj
Zapisz