ソースを参照

Support for Debug Codes - Dnnn (#19225)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Victor Oliveira 3年前
コミット
59b6b32e6e

+ 2
- 0
Marlin/src/HAL/AVR/HAL.h ファイルの表示

@@ -120,6 +120,8 @@ void HAL_init();
120 120
 inline void HAL_clear_reset_source() { MCUSR = 0; }
121 121
 inline uint8_t HAL_get_reset_source() { return MCUSR; }
122 122
 
123
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
124
+
123 125
 #pragma GCC diagnostic push
124 126
 #pragma GCC diagnostic ignored "-Wunused-function"
125 127
 extern "C" {

+ 2
- 0
Marlin/src/HAL/DUE/HAL.h ファイルの表示

@@ -105,6 +105,8 @@ void sei();                     // Enable interrupts
105 105
 void HAL_clear_reset_source();  // clear reset reason
106 106
 uint8_t HAL_get_reset_source(); // get reset reason
107 107
 
108
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
109
+
108 110
 //
109 111
 // ADC
110 112
 //

+ 2
- 0
Marlin/src/HAL/ESP32/HAL.h ファイルの表示

@@ -96,6 +96,8 @@ void HAL_clear_reset_source();
96 96
 // reset reason
97 97
 uint8_t HAL_get_reset_source();
98 98
 
99
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
100
+
99 101
 void _delay_ms(int delay);
100 102
 
101 103
 #pragma GCC diagnostic push

+ 2
- 0
Marlin/src/HAL/LINUX/HAL.h ファイルの表示

@@ -101,6 +101,8 @@ uint16_t HAL_adc_get_result();
101 101
 inline void HAL_clear_reset_source(void) {}
102 102
 inline uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; }
103 103
 
104
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
105
+
104 106
 /* ---------------- Delay in cycles */
105 107
 FORCE_INLINE static void DELAY_CYCLES(uint64_t x) {
106 108
   Clock::delayCycles(x);

+ 2
- 0
Marlin/src/HAL/LPC1768/HAL.h ファイルの表示

@@ -200,6 +200,8 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255,
200 200
 void HAL_clear_reset_source(void);
201 201
 uint8_t HAL_get_reset_source(void);
202 202
 
203
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
204
+
203 205
 // Add strcmp_P if missing
204 206
 #ifndef strcmp_P
205 207
   #define strcmp_P(a, b) strcmp((a), (b))

+ 2
- 0
Marlin/src/HAL/SAMD51/HAL.h ファイルの表示

@@ -88,6 +88,8 @@ typedef int8_t pin_t;
88 88
 void HAL_clear_reset_source();  // clear reset reason
89 89
 uint8_t HAL_get_reset_source(); // get reset reason
90 90
 
91
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
92
+
91 93
 //
92 94
 // ADC
93 95
 //

+ 2
- 0
Marlin/src/HAL/STM32/HAL.h ファイルの表示

@@ -134,6 +134,8 @@ void HAL_clear_reset_source();
134 134
 // Reset reason
135 135
 uint8_t HAL_get_reset_source();
136 136
 
137
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
138
+
137 139
 void _delay_ms(const int delay);
138 140
 
139 141
 extern "C" char* _sbrk(int incr);

+ 2
- 0
Marlin/src/HAL/STM32F1/HAL.h ファイルの表示

@@ -185,6 +185,8 @@ void HAL_clear_reset_source();
185 185
 // Reset reason
186 186
 uint8_t HAL_get_reset_source();
187 187
 
188
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
189
+
188 190
 void _delay_ms(const int delay);
189 191
 
190 192
 #pragma GCC diagnostic push

+ 2
- 0
Marlin/src/HAL/STM32_F4_F7/HAL.h ファイルの表示

@@ -142,6 +142,8 @@ void HAL_clear_reset_source();
142 142
 // Reset reason
143 143
 uint8_t HAL_get_reset_source();
144 144
 
145
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
146
+
145 147
 void _delay_ms(const int delay);
146 148
 
147 149
 /*

+ 2
- 0
Marlin/src/HAL/TEENSY31_32/HAL.h ファイルの表示

@@ -93,6 +93,8 @@ void HAL_clear_reset_source();
93 93
 // Get the reason for the reset
94 94
 uint8_t HAL_get_reset_source();
95 95
 
96
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
97
+
96 98
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
97 99
 
98 100
 #pragma GCC diagnostic push

+ 2
- 0
Marlin/src/HAL/TEENSY35_36/HAL.h ファイルの表示

@@ -99,6 +99,8 @@ void HAL_clear_reset_source();
99 99
 // Reset reason
100 100
 uint8_t HAL_get_reset_source();
101 101
 
102
+inline void HAL_reboot() {}  // reboot the board or restart the bootloader
103
+
102 104
 FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
103 105
 
104 106
 #pragma GCC diagnostic push

+ 1
- 0
Marlin/src/core/macros.h ファイルの表示

@@ -215,6 +215,7 @@
215 215
 #define WITHIN(N,L,H)       ((N) >= (L) && (N) <= (H))
216 216
 #define NUMERIC(a)          WITHIN(a, '0', '9')
217 217
 #define DECIMAL(a)          (NUMERIC(a) || a == '.')
218
+#define HEXCHR(a)           (NUMERIC(a) ? (a) - '0' : WITHIN(a, 'a', 'f') ? ((a) - 'a' + 10)  : WITHIN(a, 'A', 'F') ? ((a) - 'A' + 10) : -1)
218 219
 #define NUMERIC_SIGNED(a)   (NUMERIC(a) || (a) == '-' || (a) == '+')
219 220
 #define DECIMAL_SIGNED(a)   (DECIMAL(a) || (a) == '-' || (a) == '+')
220 221
 #define COUNT(a)            (sizeof(a)/sizeof(*a))

+ 3
- 8
Marlin/src/feature/e_parser.h ファイルの表示

@@ -88,10 +88,8 @@ public:
88 88
 
89 89
       case EP_N:
90 90
         switch (c) {
91
-          case '0': case '1': case '2':
92
-          case '3': case '4': case '5':
93
-          case '6': case '7': case '8':
94
-          case '9': case '-': case ' ':   break;
91
+          case '0' ... '9':
92
+          case '-': case ' ':   break;
95 93
           case 'M': state = EP_M;      break;
96 94
           default:  state = EP_IGNORE;
97 95
         }
@@ -153,10 +151,7 @@ public:
153 151
       case EP_M876S:
154 152
         switch (c) {
155 153
           case ' ': break;
156
-          case '0': case '1': case '2':
157
-          case '3': case '4': case '5':
158
-          case '6': case '7': case '8':
159
-          case '9':
154
+          case '0' ... '9':
160 155
             state = EP_M876SN;
161 156
             M876_reason = (uint8_t)(c - '0');
162 157
             break;

+ 1
- 1
Marlin/src/gcode/control/T.cpp ファイルの表示

@@ -46,7 +46,7 @@
46 46
  *   Tx   Same as T?, but nozzle doesn't have to be preheated. Tc requires a preheated nozzle to finish filament load.
47 47
  *   Tc   Load to nozzle after filament was prepared by Tc and nozzle is already heated.
48 48
  */
49
-void GcodeSuite::T(const uint8_t tool_index) {
49
+void GcodeSuite::T(const int8_t tool_index) {
50 50
 
51 51
   DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING));
52 52
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("...(", tool_index, ")");

+ 4
- 0
Marlin/src/gcode/gcode.cpp ファイルの表示

@@ -923,6 +923,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
923 923
 
924 924
     case 'T': T(parser.codenum); break;                           // Tn: Tool Change
925 925
 
926
+    #if ENABLED(MARLIN_DEV_MODE)
927
+      case 'D': D(parser.codenum); break;                         // Dn: Debug codes
928
+    #endif
929
+
926 930
     default:
927 931
       #if ENABLED(WIFI_CUSTOM_COMMAND)
928 932
         if (wifi_custom_command(parser.command_ptr)) break;

+ 4
- 1
Marlin/src/gcode/gcode.h ファイルの表示

@@ -285,6 +285,7 @@
285 285
  * M995 - Touch screen calibration for TFT display
286 286
  * M997 - Perform in-application firmware update
287 287
  * M999 - Restart after being stopped by error
288
+ * D... - Custom Development G-code. Add hooks to 'gcode_D.cpp' for developers to test features. (Requires MARLIN_DEV_MODE)
288 289
  *
289 290
  * "T" Codes
290 291
  *
@@ -408,6 +409,8 @@ public:
408 409
 
409 410
 private:
410 411
 
412
+  TERN_(MARLIN_DEV_MODE, static void D(const int16_t dcode));
413
+
411 414
   static void G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move=false));
412 415
 
413 416
   TERN_(ARC_SUPPORT, static void G2_G3(const bool clockwise));
@@ -882,7 +885,7 @@ private:
882 885
 
883 886
   TERN_(CONTROLLER_FAN_EDITABLE, static void M710());
884 887
 
885
-  static void T(const uint8_t tool_index);
888
+  static void T(const int8_t tool_index);
886 889
 
887 890
 };
888 891
 

+ 173
- 0
Marlin/src/gcode/gcode_d.cpp ファイルの表示

@@ -0,0 +1,173 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#include "../inc/MarlinConfigPre.h"
23
+
24
+#if ENABLED(MARLIN_DEV_MODE)
25
+
26
+  #include "gcode.h"
27
+  #include "../module/settings.h"
28
+  #include "../libs/hex_print.h"
29
+  #include "../HAL/shared/eeprom_if.h"
30
+
31
+  /**
32
+   * Dn: G-code for development and testing
33
+   *
34
+   * See https://reprap.org/wiki/G-code#D:_Debug_codes
35
+   *
36
+   * Put whatever else you need here to test ongoing development.
37
+   */
38
+  void GcodeSuite::D(const int16_t dcode) {
39
+    switch (dcode) {
40
+
41
+      case -1:
42
+        for (;;); // forever
43
+
44
+      case 0:
45
+        HAL_reboot();
46
+        break;
47
+
48
+      case 1: {
49
+        // Zero or pattern-fill the EEPROM data
50
+        #if ENABLED(EEPROM_SETTINGS)
51
+          persistentStore.access_start();
52
+          size_t total = persistentStore.capacity();
53
+          int pos = 0;
54
+          const uint8_t value = 0x0;
55
+          while(total--) {
56
+            persistentStore.write_data(pos, &value, 1);
57
+          }
58
+          persistentStore.access_finish();
59
+        #else
60
+          settings.reset();
61
+          settings.save();
62
+        #endif
63
+        HAL_reboot();
64
+      } break;
65
+
66
+      case 2: { // D2 Read / Write SRAM
67
+        #define SRAM_SIZE 8192
68
+        uint8_t *pointer = parser.hex_adr_val('A');
69
+        uint16_t len = parser.ushortval('C', 1);
70
+        uintptr_t addr = (uintptr_t)pointer;
71
+        NOMORE(addr, (size_t)(SRAM_SIZE - 1));
72
+        NOMORE(len, SRAM_SIZE - addr);
73
+        if (parser.seenval('X')) {
74
+          // Write the hex bytes after the X
75
+          uint16_t val = parser.hex_val('X');
76
+          while (len--) {
77
+            *pointer = val;
78
+            pointer++;
79
+          }
80
+        }
81
+        else {
82
+          while (len--) print_hex_byte(*(pointer++));
83
+          SERIAL_EOL();
84
+        }
85
+      } break;
86
+
87
+      case 3: { // D3 Read / Write EEPROM
88
+        uint8_t *pointer = parser.hex_adr_val('A');
89
+        uint16_t len = parser.ushortval('C', 1);
90
+        uintptr_t addr = (uintptr_t)pointer;
91
+        #ifndef MARLIN_EEPROM_SIZE
92
+          #define MARLIN_EEPROM_SIZE size_t(E2END + 1)
93
+        #endif
94
+        NOMORE(addr, (size_t)(MARLIN_EEPROM_SIZE - 1));
95
+        NOMORE(len, MARLIN_EEPROM_SIZE - addr);
96
+        if (parser.seenval('X')) {
97
+          uint16_t val = parser.hex_val('X');
98
+          #if ENABLED(EEPROM_SETTINGS)
99
+            persistentStore.access_start();
100
+            while(len--) {
101
+              int pos = 0;
102
+              persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val));
103
+            }
104
+            SERIAL_EOL();
105
+            persistentStore.access_finish();
106
+          #else
107
+            SERIAL_ECHOLN("NO EEPROM");
108
+          #endif
109
+        }
110
+        else {
111
+          while (len--) {
112
+            // Read bytes from EEPROM
113
+            #if ENABLED(EEPROM_SETTINGS)
114
+              persistentStore.access_start();
115
+              uint8_t val;
116
+              while(len--) {
117
+                int pos = 0;
118
+                if (!persistentStore.read_data(pos, (uint8_t *)&val, sizeof(val))) {
119
+                  print_hex_byte(val);
120
+                }
121
+              }
122
+              SERIAL_EOL();
123
+              persistentStore.access_finish();
124
+            #else
125
+              SERIAL_ECHOLN("NO EEPROM");
126
+            #endif
127
+          }
128
+          SERIAL_EOL();
129
+        }
130
+      } break;
131
+
132
+      case 4: { // D4 Read / Write PIN
133
+        // const uint8_t pin = parser.byteval('P');
134
+        // const bool is_out = parser.boolval('F'),
135
+        //            val = parser.byteval('V', LOW);
136
+        if (parser.seenval('X')) {
137
+          // TODO: Write the hex bytes after the X
138
+          //while (len--) {
139
+          //}
140
+        }
141
+        else {
142
+          // while (len--) {
143
+            // TODO: Read bytes from EEPROM
144
+            // print_hex_byte(eeprom_read_byte(*(adr++));
145
+          // }
146
+          SERIAL_EOL();
147
+        }
148
+      } break;
149
+
150
+      case 5: { // D4 Read / Write onboard Flash
151
+        #define FLASH_SIZE 1024
152
+        uint8_t *pointer = parser.hex_adr_val('A');
153
+        uint16_t len = parser.ushortval('C', 1);
154
+        uintptr_t addr = (uintptr_t)pointer;
155
+        NOMORE(addr, (size_t)(FLASH_SIZE - 1));
156
+        NOMORE(len, FLASH_SIZE - addr);
157
+        if (parser.seenval('X')) {
158
+          // TODO: Write the hex bytes after the X
159
+          //while (len--) {
160
+          //}
161
+        }
162
+        else {
163
+          // while (len--) {
164
+            // TODO: Read bytes from EEPROM
165
+            // print_hex_byte(eeprom_read_byte(adr++));
166
+          // }
167
+          SERIAL_EOL();
168
+        }
169
+      } break;
170
+    }
171
+  }
172
+
173
+#endif

+ 25
- 24
Marlin/src/gcode/parser.cpp ファイルの表示

@@ -147,22 +147,15 @@ void GCodeParser::parse(char *p) {
147 147
     starpos[1] = '\0';
148 148
   }
149 149
 
150
-  #if ENABLED(GCODE_MOTION_MODES)
151
-    #if ENABLED(ARC_SUPPORT)
152
-      #define GTOP 3
153
-    #else
154
-      #define GTOP 1
155
-    #endif
150
+  #if ANY(MARLIN_DEV_MODE, SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
151
+    #define SIGNED_CODENUM 1
156 152
   #endif
157 153
 
158 154
   // Bail if the letter is not G, M, or T
159 155
   // (or a valid parameter for the current motion mode)
160 156
   switch (letter) {
161 157
 
162
-    case 'G': case 'M': case 'T':
163
-    #if ENABLED(CANCEL_OBJECTS)
164
-      case 'O':
165
-    #endif
158
+    case 'G': case 'M': case 'T': TERN_(MARLIN_DEV_MODE, case 'D':)
166 159
       // Skip spaces to get the numeric part
167 160
       while (*p == ' ') p++;
168 161
 
@@ -178,22 +171,33 @@ void GCodeParser::parse(char *p) {
178 171
       #endif
179 172
 
180 173
       // Bail if there's no command code number
181
-      if (!NUMERIC(*p)) return;
174
+      if (!TERN(SIGNED_CODENUM, NUMERIC_SIGNED(*p), NUMERIC(*p))) return;
182 175
 
183 176
       // Save the command letter at this point
184 177
       // A '?' signifies an unknown command
185 178
       command_letter = letter;
186 179
 
187
-      // Get the code number - integer digits only
188
-      codenum = 0;
189
-      do { codenum *= 10, codenum += *p++ - '0'; } while (NUMERIC(*p));
180
+      {
181
+        #if ENABLED(SIGNED_CODENUM)
182
+          int sign = 1; // Allow for a negative code like D-1 or T-1
183
+          if (*p == '-') { sign = -1; ++p; }
184
+        #endif
185
+
186
+        // Get the code number - integer digits only
187
+        codenum = 0;
188
+
189
+        do { codenum = codenum * 10 + *p++ - '0'; } while (NUMERIC(*p));
190
+
191
+        // Apply the sign, if any
192
+        TERN_(SIGNED_CODENUM, codenum *= sign);
193
+      }
190 194
 
191 195
       // Allow for decimal point in command
192 196
       #if ENABLED(USE_GCODE_SUBCODES)
193 197
         if (*p == '.') {
194 198
           p++;
195 199
           while (NUMERIC(*p))
196
-          subcode *= 10, subcode += *p++ - '0';
200
+            subcode = subcode * 10 + *p++ - '0';
197 201
         }
198 202
       #endif
199 203
 
@@ -201,11 +205,8 @@ void GCodeParser::parse(char *p) {
201 205
       while (*p == ' ') p++;
202 206
 
203 207
       #if ENABLED(GCODE_MOTION_MODES)
204
-        if (letter == 'G' && (codenum <= GTOP || codenum == 5
205
-                                #if ENABLED(G38_PROBE_TARGET)
206
-                                  || codenum == 38
207
-                                #endif
208
-                             )
208
+        if (letter == 'G'
209
+          && (codenum <= TERN(ARC_SUPPORT, 3, 1) || codenum == 5 || TERN0(G38_PROBE_TARGET, codenum == 38))
209 210
         ) {
210 211
           motion_mode_codenum = codenum;
211 212
           TERN_(USE_GCODE_SUBCODES, motion_mode_subcode = subcode);
@@ -216,12 +217,12 @@ void GCodeParser::parse(char *p) {
216 217
 
217 218
     #if ENABLED(GCODE_MOTION_MODES)
218 219
       #if ENABLED(ARC_SUPPORT)
219
-        case 'I': case 'J': case 'R':
220
+        case 'I' ... 'J': case 'R':
220 221
           if (motion_mode_codenum != 2 && motion_mode_codenum != 3) return;
221 222
       #endif
222
-      case 'P': case 'Q':
223
+      case 'P' ... 'Q':
223 224
         if (motion_mode_codenum != 5) return;
224
-      case 'X': case 'Y': case 'Z': case 'E': case 'F':
225
+      case 'X' ... 'Z': case 'E' ... 'F':
225 226
         if (motion_mode_codenum < 0) return;
226 227
         command_letter = 'G';
227 228
         codenum = motion_mode_codenum;
@@ -247,7 +248,7 @@ void GCodeParser::parse(char *p) {
247 248
     #if ENABLED(EXPECTED_PRINTER_CHECK)
248 249
       case 16:
249 250
     #endif
250
-    case 23: case 28: case 30: case 33: case 117: case 118: case 928:
251
+    case 23: case 28: case 30: case 117 ... 118: case 928:
251 252
       string_arg = unescape_string(p);
252 253
       return;
253 254
     default: break;

+ 31
- 3
Marlin/src/gcode/parser.h ファイルの表示

@@ -114,6 +114,11 @@ public:
114 114
     return valid_signless(p) || ((p[0] == '-' || p[0] == '+') && valid_signless(&p[1])); // [-+]?.?[0-9]
115 115
   }
116 116
 
117
+  FORCE_INLINE static bool valid_number(const char * const p) {
118
+    // TODO: With MARLIN_DEV_MODE allow HEX values starting with "x"
119
+    return valid_float(p);
120
+  }
121
+
117 122
   #if ENABLED(FASTER_GCODE_PARSER)
118 123
 
119 124
     FORCE_INLINE static bool valid_int(const char * const p) {
@@ -142,8 +147,12 @@ public:
142 147
       if (ind >= COUNT(param)) return false; // Only A-Z
143 148
       const bool b = TEST32(codebits, ind);
144 149
       if (b) {
145
-        char * const ptr = command_ptr + param[ind];
146
-        value_ptr = param[ind] && valid_float(ptr) ? ptr : nullptr;
150
+        if (param[ind]) {
151
+          char * const ptr = command_ptr + param[ind];
152
+          value_ptr = valid_number(ptr) ? ptr : nullptr;
153
+        }
154
+        else
155
+          value_ptr = nullptr;
147 156
       }
148 157
       return b;
149 158
     }
@@ -198,7 +207,7 @@ public:
198 207
     static inline bool seen(const char c) {
199 208
       char *p = strgchr(command_args, c);
200 209
       const bool b = !!p;
201
-      if (b) value_ptr = valid_float(&p[1]) ? &p[1] : nullptr;
210
+      if (b) value_ptr = valid_number(&p[1]) ? &p[1] : nullptr;
202 211
       return b;
203 212
     }
204 213
 
@@ -401,6 +410,25 @@ public:
401 410
   static inline float    linearval(const char c, const float dval=0)    { return seenval(c) ? value_linear_units() : dval; }
402 411
   static inline float    celsiusval(const char c, const float dval=0)   { return seenval(c) ? value_celsius()      : dval; }
403 412
 
413
+  #if ENABLED(MARLIN_DEV_MODE)
414
+
415
+    static inline uint8_t* hex_adr_val(const char c, uint8_t * const dval=nullptr) {
416
+      if (!seen(c) || *value_ptr != 'x') return dval;
417
+      uint8_t *out = nullptr;
418
+      for (char *vp = value_ptr + 1; HEXCHR(*vp) >= 0; vp++)
419
+        out = (uint8_t*)((uintptr_t(out) << 8) | HEXCHR(*vp));
420
+      return out;
421
+    }
422
+
423
+    static inline uint16_t hex_val(const char c, uint16_t const dval=0) {
424
+      if (!seen(c) || *value_ptr != 'x') return dval;
425
+      uint16_t out = 0;
426
+      for (char *vp = value_ptr + 1; HEXCHR(*vp) >= 0; vp++)
427
+        out = ((out) << 8) | HEXCHR(*vp);
428
+      return out;
429
+    }
430
+
431
+  #endif
404 432
 };
405 433
 
406 434
 extern GCodeParser parser;

+ 5
- 1
Marlin/src/lcd/ultralcd.cpp ファイルの表示

@@ -123,11 +123,15 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
123 123
 #include "lcdprint.h"
124 124
 
125 125
 #include "../sd/cardreader.h"
126
-#include "../module/settings.h"
126
+
127 127
 #include "../module/temperature.h"
128 128
 #include "../module/planner.h"
129 129
 #include "../module/motion.h"
130 130
 
131
+#if HAS_LCD_MENU
132
+  #include "../module/settings.h"
133
+#endif
134
+
131 135
 #if ENABLED(AUTO_BED_LEVELING_UBL)
132 136
   #include "../feature/bedlevel/bedlevel.h"
133 137
 #endif

読み込み中…
キャンセル
保存