Просмотр исходного кода

Merge pull request #4414 from thinkyhead/rc_split_conditionals

Split up Conditionals.h into two files
Scott Lahteine 9 лет назад
Родитель
Сommit
5597400cda
62 измененных файлов: 1853 добавлений и 2177 удалений
  1. 2
    902
      Marlin/Conditionals.h
  2. 270
    0
      Marlin/Conditionals_LCD.h
  3. 669
    0
      Marlin/Conditionals_post.h
  4. 1
    17
      Marlin/Configuration.h
  5. 1
    6
      Marlin/Configuration_adv.h
  6. 11
    33
      Marlin/Marlin.h
  7. 1
    2
      Marlin/Marlin.ino
  8. 39
    0
      Marlin/MarlinConfig.h
  9. 729
    0
      Marlin/SanityCheck.cpp
  10. 2
    706
      Marlin/SanityCheck.h
  11. 56
    48
      Marlin/Version.h
  12. 1
    1
      Marlin/configuration_store.h
  13. 1
    2
      Marlin/dac_mcp4728.h
  14. 1
    1
      Marlin/digipot_mcp4451.cpp
  15. 1
    16
      Marlin/example_configurations/Cartesio/Configuration.h
  16. 1
    6
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  17. 1
    1
      Marlin/example_configurations/Cartesio/_Bootscreen.h
  18. 1
    16
      Marlin/example_configurations/Felix/Configuration.h
  19. 1
    6
      Marlin/example_configurations/Felix/Configuration_adv.h
  20. 1
    16
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  21. 1
    16
      Marlin/example_configurations/Hephestos/Configuration.h
  22. 1
    6
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  23. 1
    17
      Marlin/example_configurations/Hephestos_2/Configuration.h
  24. 1
    6
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  25. 1
    16
      Marlin/example_configurations/K8200/Configuration.h
  26. 1
    6
      Marlin/example_configurations/K8200/Configuration_adv.h
  27. 1
    16
      Marlin/example_configurations/K8400/Configuration.h
  28. 1
    6
      Marlin/example_configurations/K8400/Configuration_adv.h
  29. 1
    16
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  30. 1
    16
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  31. 1
    16
      Marlin/example_configurations/RigidBot/Configuration.h
  32. 1
    6
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  33. 1
    16
      Marlin/example_configurations/SCARA/Configuration.h
  34. 1
    6
      Marlin/example_configurations/SCARA/Configuration_adv.h
  35. 1
    16
      Marlin/example_configurations/TAZ4/Configuration.h
  36. 1
    6
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  37. 1
    17
      Marlin/example_configurations/WITBOX/Configuration.h
  38. 1
    6
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  39. 1
    16
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  40. 1
    16
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  41. 1
    6
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  42. 1
    16
      Marlin/example_configurations/delta/generic/Configuration.h
  43. 1
    6
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  44. 1
    16
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  45. 1
    6
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  46. 1
    16
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  47. 1
    6
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  48. 1
    16
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  49. 1
    6
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  50. 1
    16
      Marlin/example_configurations/makibox/Configuration.h
  51. 1
    6
      Marlin/example_configurations/makibox/Configuration_adv.h
  52. 1
    17
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  53. 1
    6
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  54. 1
    7
      Marlin/language.h
  55. 14
    0
      Marlin/macros.h
  56. 1
    1
      Marlin/qr_solve.h
  57. 1
    1
      Marlin/servo.cpp
  58. 1
    1
      Marlin/stepper_indirection.cpp
  59. 1
    1
      Marlin/stepper_indirection.h
  60. 1
    0
      Marlin/temperature.cpp
  61. 1
    0
      Marlin/temperature.h
  62. 9
    6
      Marlin/ultralcd_impl_DOGM.h

+ 2
- 902
Marlin/Conditionals.h Просмотреть файл

@@ -22,906 +22,6 @@
22 22
 
23 23
 /**
24 24
  * Conditionals.h
25
- * Defines that depend on configuration but are not editable.
25
+ * OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h
26 26
  */
27
-
28
-#ifndef CONDITIONALS_H
29
-
30
-/**
31
-* Miscellaneous
32
-*/
33
-#ifndef M_PI
34
-  #define M_PI 3.1415926536
35
-#endif
36
-
37
-/**
38
- * This value is used by M109 when tying to calculate a ballpark safe margin
39
- * to prevent wait-forever situation.
40
- */
41
-#ifndef EXTRUDE_MINTEMP
42
- #define EXTRUDE_MINTEMP 170
43
-#endif
44
-
45
-#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
46
-#define CONFIGURATION_LCD
47
-
48
-  #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
49
-
50
-  #if ENABLED(CARTESIO_UI)
51
-    #define DOGLCD
52
-    #define ULTIPANEL
53
-    #define NEWPANEL
54
-    #define DEFAULT_LCD_CONTRAST 90
55
-    #define LCD_CONTRAST_MIN 60
56
-    #define LCD_CONTRAST_MAX 140
57
-  #endif
58
-
59
-  #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
60
-    #define DOGLCD
61
-    #define ULTIPANEL
62
-    #define NEWPANEL
63
-    #define DEFAULT_LCD_CONTRAST 17
64
-  #endif
65
-
66
-  #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
67
-    #define ULTRA_LCD  //general LCD support, also 16x2
68
-    #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
69
-    #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
70
-
71
-    #if ENABLED(miniVIKI)
72
-      #define LCD_CONTRAST_MIN  75
73
-      #define LCD_CONTRAST_MAX 115
74
-      #define DEFAULT_LCD_CONTRAST 95
75
-    #elif ENABLED(VIKI2)
76
-      #define DEFAULT_LCD_CONTRAST 40
77
-    #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
78
-      #define LCD_CONTRAST_MIN  90
79
-      #define LCD_CONTRAST_MAX 130
80
-      #define DEFAULT_LCD_CONTRAST 110
81
-      #define U8GLIB_LM6059_AF
82
-      #define SD_DETECT_INVERTED
83
-    #endif
84
-
85
-    #define ENCODER_PULSES_PER_STEP 4
86
-    #define ENCODER_STEPS_PER_MENU_ITEM 1
87
-  #endif
88
-
89
-  // Generic support for SSD1306 / SH1106 OLED based LCDs.
90
-  #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
91
-    #define ULTRA_LCD  //general LCD support, also 16x2
92
-    #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
93
-  #endif
94
-
95
-  #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
96
-    #define ULTIMAKERCONTROLLER
97
-  #endif
98
-
99
-  #if ENABLED(BQ_LCD_SMART_CONTROLLER)
100
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
101
-
102
-    #ifndef ENCODER_PULSES_PER_STEP
103
-      #define ENCODER_PULSES_PER_STEP 4
104
-    #endif
105
-
106
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
107
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
108
-    #endif
109
-
110
-    #ifndef LONG_FILENAME_HOST_SUPPORT
111
-      #define LONG_FILENAME_HOST_SUPPORT
112
-    #endif
113
-  #endif
114
-
115
-  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
116
-    #define DOGLCD
117
-    #define U8GLIB_ST7920
118
-    #define REPRAP_DISCOUNT_SMART_CONTROLLER
119
-  #endif
120
-
121
-  #if ENABLED(ULTIMAKERCONTROLLER)              \
122
-   || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
123
-   || ENABLED(G3D_PANEL)                        \
124
-   || ENABLED(RIGIDBOT_PANEL)                   \
125
-   || ENABLED(REPRAPWORLD_KEYPAD)
126
-    #define ULTIPANEL
127
-    #define NEWPANEL
128
-  #endif
129
-
130
-  #if ENABLED(RA_CONTROL_PANEL)
131
-    #define LCD_I2C_TYPE_PCA8574
132
-    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
133
-    #define ULTIPANEL
134
-    #define NEWPANEL
135
-  #endif
136
-
137
-  #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
138
-    #define DOGLCD
139
-    #define U8GLIB_ST7920
140
-    #define ULTIPANEL
141
-    #define NEWPANEL
142
-  #endif
143
-
144
-  /**
145
-   * I2C PANELS
146
-   */
147
-
148
-  #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
149
-    // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
150
-    // Make sure it is placed in the Arduino libraries directory.
151
-    #define LCD_I2C_TYPE_PCF8575
152
-    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
153
-    #define ULTIPANEL
154
-    #define NEWPANEL
155
-  #endif
156
-
157
-  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
158
-  #if ENABLED(LCD_I2C_PANELOLU2)
159
-    #define LCD_I2C_TYPE_MCP23017
160
-    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
161
-    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
162
-
163
-    #ifndef ENCODER_PULSES_PER_STEP
164
-      #define ENCODER_PULSES_PER_STEP 4
165
-    #endif
166
-
167
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
168
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
169
-    #endif
170
-
171
-    #define ULTIPANEL
172
-    #define NEWPANEL
173
-  #endif
174
-
175
-  // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
176
-  #if ENABLED(LCD_I2C_VIKI)
177
-    // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
178
-    // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
179
-    // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
180
-    //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
181
-    #define LCD_I2C_TYPE_MCP23017
182
-    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
183
-    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
184
-    #define ULTIPANEL
185
-    #define NEWPANEL
186
-  #endif
187
-
188
-  // Shift register panels
189
-  // ---------------------
190
-  // 2 wire Non-latching LCD SR from:
191
-  // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
192
-
193
-  #if ENABLED(SAV_3DLCD)
194
-    #define SR_LCD_2W_NL    // Non latching 2 wire shift register
195
-    #define ULTIPANEL
196
-    #define NEWPANEL
197
-  #endif
198
-
199
-  #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
200
-    #ifndef LCD_WIDTH
201
-      #define LCD_WIDTH 22
202
-    #endif
203
-    #ifndef LCD_HEIGHT
204
-      #define LCD_HEIGHT 5
205
-    #endif
206
-  #endif
207
-
208
-  #if ENABLED(ULTIPANEL)
209
-    #define NEWPANEL  //enable this if you have a click-encoder panel
210
-    #define ULTRA_LCD
211
-    #ifndef LCD_WIDTH
212
-      #define LCD_WIDTH 20
213
-    #endif
214
-    #ifndef LCD_HEIGHT
215
-      #define LCD_HEIGHT 4
216
-    #endif
217
-  #else //no panel but just LCD
218
-    #if ENABLED(ULTRA_LCD)
219
-      #ifndef LCD_WIDTH
220
-        #define LCD_WIDTH 16
221
-      #endif
222
-      #ifndef LCD_HEIGHT
223
-        #define LCD_HEIGHT 2
224
-      #endif
225
-    #endif
226
-  #endif
227
-
228
-  #if ENABLED(DOGLCD)
229
-    /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
230
-    // \x00 intentionally skipped to avoid problems in strings
231
-    #define LCD_STR_REFRESH     "\x01"
232
-    #define LCD_STR_FOLDER      "\x02"
233
-    #define LCD_STR_ARROW_RIGHT "\x03"
234
-    #define LCD_STR_UPLEVEL     "\x04"
235
-    #define LCD_STR_CLOCK       "\x05"
236
-    #define LCD_STR_FEEDRATE    "\x06"
237
-    #define LCD_STR_BEDTEMP     "\x07"
238
-    #define LCD_STR_THERMOMETER "\x08"
239
-    #define LCD_STR_DEGREE      "\x09"
240
-
241
-    #define LCD_STR_SPECIAL_MAX '\x09'
242
-    // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
243
-    // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
244
-  #else
245
-    /* Custom characters defined in the first 8 characters of the LCD */
246
-    #define LCD_STR_BEDTEMP     "\x00"  // Print only as a char. This will have 'unexpected' results when used in a string!
247
-    #define LCD_STR_DEGREE      "\x01"
248
-    #define LCD_STR_THERMOMETER "\x02"
249
-    #define LCD_STR_UPLEVEL     "\x03"
250
-    #define LCD_STR_REFRESH     "\x04"
251
-    #define LCD_STR_FOLDER      "\x05"
252
-    #define LCD_STR_FEEDRATE    "\x06"
253
-    #define LCD_STR_CLOCK       "\x07"
254
-    #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
255
-  #endif
256
-
257
-  /**
258
-   * Default LCD contrast for dogm-like LCD displays
259
-   */
260
-  #if ENABLED(DOGLCD)
261
-
262
-    #define HAS_LCD_CONTRAST ( \
263
-        ENABLED(MAKRPANEL) \
264
-     || ENABLED(CARTESIO_UI) \
265
-     || ENABLED(VIKI2) \
266
-     || ENABLED(miniVIKI) \
267
-     || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
268
-    )
269
-
270
-    #if HAS_LCD_CONTRAST
271
-      #ifndef LCD_CONTRAST_MIN
272
-        #define LCD_CONTRAST_MIN 0
273
-      #endif
274
-      #ifndef LCD_CONTRAST_MAX
275
-        #define LCD_CONTRAST_MAX 63
276
-      #endif
277
-      #ifndef DEFAULT_LCD_CONTRAST
278
-        #define DEFAULT_LCD_CONTRAST 32
279
-      #endif
280
-    #endif
281
-  #endif
282
-
283
-  #ifndef BOOTSCREEN_TIMEOUT
284
-    #define BOOTSCREEN_TIMEOUT 2500
285
-  #endif
286
-
287
-#else // CONFIGURATION_LCD
288
-
289
-  #define CONDITIONALS_H
290
-
291
-  #include "pins.h"
292
-
293
-  #ifndef USBCON
294
-    #define HardwareSerial_h // trick to disable the standard HWserial
295
-  #endif
296
-
297
-  #if ENABLED(EMERGENCY_PARSER)
298
-    #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410"
299
-  #else
300
-    #define EMERGENCY_PARSER_CAPABILITIES ""
301
-  #endif
302
-
303
-  #include "Arduino.h"
304
-
305
-  /**
306
-   * Set ENDSTOPPULLUPS for unused endstop switches
307
-   */
308
-  #if ENABLED(ENDSTOPPULLUPS)
309
-    #if ENABLED(USE_XMAX_PLUG)
310
-      #define ENDSTOPPULLUP_XMAX
311
-    #endif
312
-    #if ENABLED(USE_YMAX_PLUG)
313
-      #define ENDSTOPPULLUP_YMAX
314
-    #endif
315
-    #if ENABLED(USE_ZMAX_PLUG)
316
-      #define ENDSTOPPULLUP_ZMAX
317
-    #endif
318
-    #if ENABLED(USE_XMIN_PLUG)
319
-      #define ENDSTOPPULLUP_XMIN
320
-    #endif
321
-    #if ENABLED(USE_YMIN_PLUG)
322
-      #define ENDSTOPPULLUP_YMIN
323
-    #endif
324
-    #if ENABLED(USE_ZMIN_PLUG)
325
-      #define ENDSTOPPULLUP_ZMIN
326
-    #endif
327
-    #if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
328
-      #define ENDSTOPPULLUP_ZMIN_PROBE
329
-    #endif
330
-  #endif
331
-
332
-  /**
333
-   * Axis lengths
334
-   */
335
-  #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
336
-  #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
337
-  #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
338
-
339
-  /**
340
-   * CoreXY and CoreXZ
341
-   */
342
-  #if ENABLED(COREXY)
343
-    #define CORE_AXIS_1 A_AXIS // XY from A + B
344
-    #define CORE_AXIS_2 B_AXIS
345
-    #define NORMAL_AXIS Z_AXIS
346
-  #elif ENABLED(COREXZ)
347
-    #define CORE_AXIS_1 A_AXIS // XZ from A + C
348
-    #define CORE_AXIS_2 C_AXIS
349
-    #define NORMAL_AXIS Y_AXIS
350
-  #elif ENABLED(COREYZ)
351
-    #define CORE_AXIS_1 B_AXIS // YZ from B + C
352
-    #define CORE_AXIS_2 C_AXIS
353
-    #define NORMAL_AXIS X_AXIS
354
-  #endif
355
-
356
-  /**
357
-   * SCARA
358
-   */
359
-  #if ENABLED(SCARA)
360
-    #undef SLOWDOWN
361
-    #define QUICK_HOME //SCARA needs Quickhome
362
-  #endif
363
-
364
-  /**
365
-   * AUTOSET LOCATIONS OF LIMIT SWITCHES
366
-   */
367
-  #if ENABLED(MANUAL_HOME_POSITIONS)  // Use manual limit switch locations
368
-    #define X_HOME_POS MANUAL_X_HOME_POS
369
-    #define Y_HOME_POS MANUAL_Y_HOME_POS
370
-    #define Z_HOME_POS MANUAL_Z_HOME_POS
371
-  #else //!MANUAL_HOME_POSITIONS – Use home switch positions based on homing direction and travel limits
372
-    #if ENABLED(BED_CENTER_AT_0_0)
373
-      #define X_HOME_POS (X_MAX_LENGTH) * (X_HOME_DIR) * 0.5
374
-      #define Y_HOME_POS (Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5
375
-    #else
376
-      #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
377
-      #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
378
-    #endif
379
-    #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS)
380
-  #endif //!MANUAL_HOME_POSITIONS
381
-
382
-  /**
383
-   * The BLTouch Probe emulates a servo probe
384
-   */
385
-  #if ENABLED(BLTOUCH)
386
-    #undef Z_ENDSTOP_SERVO_NR
387
-    #undef Z_SERVO_ANGLES
388
-    #define Z_ENDSTOP_SERVO_NR 0
389
-    #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract
390
-    #undef DEACTIVATE_SERVOS_AFTER_MOVE
391
-    #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
392
-      #undef Z_MIN_ENDSTOP_INVERTING
393
-      #define Z_MIN_ENDSTOP_INVERTING false
394
-    #endif
395
-  #endif
396
-
397
-  /**
398
-   * Auto Bed Leveling and Z Probe Repeatability Test
399
-   */
400
-  #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
401
-
402
-  // Boundaries for probing based on set limits
403
-  #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
404
-  #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
405
-  #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
406
-  #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
407
-
408
-  #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
409
-
410
-  /**
411
-   * Z Sled Probe requires Z_SAFE_HOMING
412
-   */
413
-  #if ENABLED(Z_PROBE_SLED)
414
-    #define Z_SAFE_HOMING
415
-  #endif
416
-
417
-  /**
418
-   * Safe Homing Options
419
-   */
420
-  #if ENABLED(Z_SAFE_HOMING)
421
-    #ifndef Z_SAFE_HOMING_X_POINT
422
-      #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
423
-    #endif
424
-    #ifndef Z_SAFE_HOMING_Y_POINT
425
-      #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
426
-    #endif
427
-  #endif
428
-
429
-  /**
430
-   * Host keep alive
431
-   */
432
-  #ifndef DEFAULT_KEEPALIVE_INTERVAL
433
-    #define DEFAULT_KEEPALIVE_INTERVAL 2
434
-  #endif
435
-
436
-  /**
437
-   * MAX_STEP_FREQUENCY differs for TOSHIBA
438
-   */
439
-  #if ENABLED(CONFIG_STEPPERS_TOSHIBA)
440
-    #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
441
-  #else
442
-    #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
443
-  #endif
444
-
445
-  // MS1 MS2 Stepper Driver Microstepping mode table
446
-  #define MICROSTEP1 LOW,LOW
447
-  #define MICROSTEP2 HIGH,LOW
448
-  #define MICROSTEP4 LOW,HIGH
449
-  #define MICROSTEP8 HIGH,HIGH
450
-  #define MICROSTEP16 HIGH,HIGH
451
-
452
-  /**
453
-   * Advance calculated values
454
-   */
455
-  #if ENABLED(ADVANCE)
456
-    #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
457
-    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS] / (EXTRUSION_AREA))
458
-  #endif
459
-
460
-  #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
461
-    #undef SD_DETECT_INVERTED
462
-  #endif
463
-
464
-  /**
465
-   * Set defaults for missing (newer) options
466
-   */
467
-  #ifndef DISABLE_INACTIVE_X
468
-    #define DISABLE_INACTIVE_X DISABLE_X
469
-  #endif
470
-  #ifndef DISABLE_INACTIVE_Y
471
-    #define DISABLE_INACTIVE_Y DISABLE_Y
472
-  #endif
473
-  #ifndef DISABLE_INACTIVE_Z
474
-    #define DISABLE_INACTIVE_Z DISABLE_Z
475
-  #endif
476
-  #ifndef DISABLE_INACTIVE_E
477
-    #define DISABLE_INACTIVE_E DISABLE_E
478
-  #endif
479
-
480
-  // Power Signal Control Definitions
481
-  // By default use ATX definition
482
-  #ifndef POWER_SUPPLY
483
-    #define POWER_SUPPLY 1
484
-  #endif
485
-  #if (POWER_SUPPLY == 1)     // 1 = ATX
486
-    #define PS_ON_AWAKE  LOW
487
-    #define PS_ON_ASLEEP HIGH
488
-  #elif (POWER_SUPPLY == 2)   // 2 = X-Box 360 203W
489
-    #define PS_ON_AWAKE  HIGH
490
-    #define PS_ON_ASLEEP LOW
491
-  #endif
492
-  #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON))
493
-
494
-  /**
495
-   * Temp Sensor defines
496
-   */
497
-  #if TEMP_SENSOR_0 == -3
498
-    #define HEATER_0_USES_MAX6675
499
-    #define MAX6675_IS_MAX31855
500
-  #elif TEMP_SENSOR_0 == -2
501
-    #define HEATER_0_USES_MAX6675
502
-  #elif TEMP_SENSOR_0 == -1
503
-    #define HEATER_0_USES_AD595
504
-  #elif TEMP_SENSOR_0 == 0
505
-    #undef HEATER_0_MINTEMP
506
-    #undef HEATER_0_MAXTEMP
507
-  #elif TEMP_SENSOR_0 > 0
508
-    #define THERMISTORHEATER_0 TEMP_SENSOR_0
509
-    #define HEATER_0_USES_THERMISTOR
510
-  #endif
511
-
512
-  #if TEMP_SENSOR_1 <= -2
513
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1"
514
-  #elif TEMP_SENSOR_1 == -1
515
-    #define HEATER_1_USES_AD595
516
-  #elif TEMP_SENSOR_1 == 0
517
-    #undef HEATER_1_MINTEMP
518
-    #undef HEATER_1_MAXTEMP
519
-  #elif TEMP_SENSOR_1 > 0
520
-    #define THERMISTORHEATER_1 TEMP_SENSOR_1
521
-    #define HEATER_1_USES_THERMISTOR
522
-  #endif
523
-
524
-  #if TEMP_SENSOR_2 <= -2
525
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2"
526
-  #elif TEMP_SENSOR_2 == -1
527
-    #define HEATER_2_USES_AD595
528
-  #elif TEMP_SENSOR_2 == 0
529
-    #undef HEATER_2_MINTEMP
530
-    #undef HEATER_2_MAXTEMP
531
-  #elif TEMP_SENSOR_2 > 0
532
-    #define THERMISTORHEATER_2 TEMP_SENSOR_2
533
-    #define HEATER_2_USES_THERMISTOR
534
-  #endif
535
-
536
-  #if TEMP_SENSOR_3 <= -2
537
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3"
538
-  #elif TEMP_SENSOR_3 == -1
539
-    #define HEATER_3_USES_AD595
540
-  #elif TEMP_SENSOR_3 == 0
541
-    #undef HEATER_3_MINTEMP
542
-    #undef HEATER_3_MAXTEMP
543
-  #elif TEMP_SENSOR_3 > 0
544
-    #define THERMISTORHEATER_3 TEMP_SENSOR_3
545
-    #define HEATER_3_USES_THERMISTOR
546
-  #endif
547
-
548
-  #if TEMP_SENSOR_BED <= -2
549
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
550
-  #elif TEMP_SENSOR_BED == -1
551
-    #define BED_USES_AD595
552
-  #elif TEMP_SENSOR_BED == 0
553
-    #undef BED_MINTEMP
554
-    #undef BED_MAXTEMP
555
-  #elif TEMP_SENSOR_BED > 0
556
-    #define THERMISTORBED TEMP_SENSOR_BED
557
-    #define BED_USES_THERMISTOR
558
-  #endif
559
-
560
-  /**
561
-   * Flags for PID handling
562
-   */
563
-  #define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED))
564
-  #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED))
565
-
566
-  /**
567
-   * Extruders have some combination of stepper motors and hotends
568
-   * so we separate these concepts into the defines:
569
-   *
570
-   *  EXTRUDERS    - Number of Selectable Tools
571
-   *  HOTENDS      - Number of hotends, whether connected or separate
572
-   *  E_STEPPERS   - Number of actual E stepper motors
573
-   *  TOOL_E_INDEX - Index to use when getting/setting the tool state
574
-   *  
575
-   */
576
-  #if ENABLED(SINGLENOZZLE)             // One hotend, multi-extruder
577
-    #define HOTENDS      1
578
-    #define E_STEPPERS   EXTRUDERS
579
-    #define TOOL_E_INDEX current_block->active_extruder
580
-    #undef TEMP_SENSOR_1_AS_REDUNDANT
581
-    #undef HOTEND_OFFSET_X
582
-    #undef HOTEND_OFFSET_Y
583
-  #elif ENABLED(SWITCHING_EXTRUDER)     // One E stepper, unified E axis, two hotends
584
-    #define HOTENDS      EXTRUDERS
585
-    #define E_STEPPERS   1
586
-    #define TOOL_E_INDEX 0
587
-    #ifndef HOTEND_OFFSET_Z
588
-      #define HOTEND_OFFSET_Z { 0 }
589
-    #endif
590
-  #elif ENABLED(MIXING_EXTRUDER)        // Multi-stepper, unified E axis, one hotend
591
-    #define HOTENDS      1
592
-    #define E_STEPPERS   MIXING_STEPPERS
593
-    #define TOOL_E_INDEX 0
594
-  #else                                 // One stepper, E axis, and hotend per tool
595
-    #define HOTENDS      EXTRUDERS
596
-    #define E_STEPPERS   EXTRUDERS
597
-    #define TOOL_E_INDEX current_block->active_extruder
598
-  #endif
599
-
600
-  /**
601
-   * Default hotend offsets, if not defined
602
-   */
603
-  #if HOTENDS > 1
604
-    #ifndef HOTEND_OFFSET_X
605
-      #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
606
-    #endif
607
-    #ifndef HOTEND_OFFSET_Y
608
-      #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
609
-    #endif
610
-    #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER))
611
-      #define HOTEND_OFFSET_Z { 0 }
612
-    #endif
613
-  #endif
614
-
615
-  /**
616
-   * ARRAY_BY_EXTRUDERS based on EXTRUDERS
617
-   */
618
-  #define ARRAY_BY_EXTRUDERS(args...) ARRAY_N(EXTRUDERS, args)
619
-  #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1)
620
-
621
-  /**
622
-   * ARRAY_BY_HOTENDS based on HOTENDS
623
-   */
624
-  #define ARRAY_BY_HOTENDS(args...) ARRAY_N(HOTENDS, args)
625
-  #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
626
-
627
-  /**
628
-   * Z_DUAL_ENDSTOPS endstop reassignment
629
-   */
630
-  #if ENABLED(Z_DUAL_ENDSTOPS)
631
-    #define _XMIN_ 100
632
-    #define _YMIN_ 200
633
-    #define _ZMIN_ 300
634
-    #define _XMAX_ 101
635
-    #define _YMAX_ 201
636
-    #define _ZMAX_ 301
637
-    #if Z2_USE_ENDSTOP == _XMAX_
638
-      #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
639
-      #define Z2_MAX_PIN X_MAX_PIN
640
-      #undef USE_XMAX_PLUG
641
-    #elif Z2_USE_ENDSTOP == _YMAX_
642
-      #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
643
-      #define Z2_MAX_PIN Y_MAX_PIN
644
-      #undef USE_YMAX_PLUG
645
-    #elif Z2_USE_ENDSTOP == _ZMAX_
646
-      #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
647
-      #define Z2_MAX_PIN Z_MAX_PIN
648
-      #undef USE_ZMAX_PLUG
649
-    #elif Z2_USE_ENDSTOP == _XMIN_
650
-      #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
651
-      #define Z2_MAX_PIN X_MIN_PIN
652
-      #undef USE_XMIN_PLUG
653
-    #elif Z2_USE_ENDSTOP == _YMIN_
654
-      #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
655
-      #define Z2_MAX_PIN Y_MIN_PIN
656
-      #undef USE_YMIN_PLUG
657
-    #elif Z2_USE_ENDSTOP == _ZMIN_
658
-      #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
659
-      #define Z2_MAX_PIN Z_MIN_PIN
660
-      #undef USE_ZMIN_PLUG
661
-    #else
662
-      #define Z2_MAX_ENDSTOP_INVERTING false
663
-    #endif
664
-  #endif
665
-
666
-  /**
667
-   * Shorthand for pin tests, used wherever needed
668
-   */
669
-  #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2)
670
-  #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
671
-  #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
672
-  #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
673
-  #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
674
-  #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
675
-  #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
676
-  #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
677
-  #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
678
-  #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
679
-  #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN))
680
-  #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN))
681
-  #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
682
-  #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
683
-  #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
684
-  #define HAS_FAN0 (PIN_EXISTS(FAN))
685
-  #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN1_PIN)
686
-  #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN2_PIN)
687
-  #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
688
-  #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
689
-  #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
690
-  #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
691
-  #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
692
-  #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
693
-  #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
694
-  #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT))
695
-  #define HAS_HOME (PIN_EXISTS(HOME))
696
-  #define HAS_KILL (PIN_EXISTS(KILL))
697
-  #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
698
-  #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
699
-  #define HAS_X_MIN (PIN_EXISTS(X_MIN))
700
-  #define HAS_X_MAX (PIN_EXISTS(X_MAX))
701
-  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN))
702
-  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX))
703
-  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN))
704
-  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
705
-  #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
706
-  #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
707
-  #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
708
-  #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
709
-  #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
710
-  #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
711
-  #define HAS_MICROSTEPS (PIN_EXISTS(X_MS1))
712
-  #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
713
-  #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
714
-  #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
715
-  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
716
-  #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
717
-  #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
718
-  #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
719
-  #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
720
-  #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
721
-  #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
722
-  #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
723
-  #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
724
-  #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
725
-  #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
726
-  #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
727
-  #define HAS_X_DIR (PIN_EXISTS(X_DIR))
728
-  #define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
729
-  #define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
730
-  #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
731
-  #define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
732
-  #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
733
-  #define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
734
-  #define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
735
-  #define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
736
-  #define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
737
-  #define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
738
-  #define HAS_X_STEP (PIN_EXISTS(X_STEP))
739
-  #define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
740
-  #define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
741
-  #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
742
-  #define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
743
-  #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
744
-  #define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
745
-  #define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
746
-  #define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
747
-  #define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
748
-  #define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
749
-  #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
750
-
751
-  #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
752
-
753
-  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
754
-
755
-  #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED))
756
-
757
-  /**
758
-   * Helper Macros for heaters and extruder fan
759
-   */
760
-  #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
761
-  #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
762
-    #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v)
763
-    #if HOTENDS > 2
764
-      #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
765
-      #if HOTENDS > 3
766
-        #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
767
-      #endif
768
-    #endif
769
-  #endif
770
-  #if ENABLED(HEATERS_PARALLEL)
771
-    #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
772
-  #else
773
-    #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
774
-  #endif
775
-  #if HAS_HEATER_BED
776
-    #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
777
-  #endif
778
-
779
-  /**
780
-   * Up to 3 PWM fans
781
-   */
782
-  #if HAS_FAN2
783
-    #define FAN_COUNT 3
784
-  #elif HAS_FAN1
785
-    #define FAN_COUNT 2
786
-  #elif HAS_FAN0
787
-    #define FAN_COUNT 1
788
-  #else
789
-    #define FAN_COUNT 0
790
-  #endif
791
-
792
-  #if HAS_FAN0
793
-    #define WRITE_FAN(v) WRITE(FAN_PIN, v)
794
-    #define WRITE_FAN0(v) WRITE_FAN(v)
795
-  #endif
796
-  #if HAS_FAN1
797
-    #define WRITE_FAN1(v) WRITE(FAN1_PIN, v)
798
-  #endif
799
-  #if HAS_FAN2
800
-    #define WRITE_FAN2(v) WRITE(FAN2_PIN, v)
801
-  #endif
802
-  #define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
803
-
804
-  #define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
805
-
806
-  #if HAS_SERVOS
807
-    #ifndef Z_ENDSTOP_SERVO_NR
808
-      #define Z_ENDSTOP_SERVO_NR -1
809
-    #endif
810
-  #endif
811
-
812
-  #define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
813
-
814
-  #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
815
-
816
-  #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED)
817
-
818
-  #if ENABLED(Z_PROBE_ALLEN_KEY)
819
-    #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
820
-  #endif
821
-
822
-  /**
823
-   * Bed Probe dependencies
824
-   */
825
-  #if HAS_BED_PROBE
826
-    #ifndef X_PROBE_OFFSET_FROM_EXTRUDER
827
-      #define X_PROBE_OFFSET_FROM_EXTRUDER 0
828
-    #endif
829
-    #ifndef Y_PROBE_OFFSET_FROM_EXTRUDER
830
-      #define Y_PROBE_OFFSET_FROM_EXTRUDER 0
831
-    #endif
832
-    #ifndef Z_PROBE_OFFSET_FROM_EXTRUDER
833
-      #define Z_PROBE_OFFSET_FROM_EXTRUDER 0
834
-    #endif
835
-    #ifndef Z_PROBE_OFFSET_RANGE_MIN
836
-      #define Z_PROBE_OFFSET_RANGE_MIN -20
837
-    #endif
838
-    #ifndef Z_PROBE_OFFSET_RANGE_MAX
839
-      #define Z_PROBE_OFFSET_RANGE_MAX 20
840
-    #endif
841
-    #ifndef XY_PROBE_SPEED
842
-      #ifdef HOMING_FEEDRATE_XY
843
-        #define XY_PROBE_SPEED HOMING_FEEDRATE_XY
844
-      #else
845
-        #define XY_PROBE_SPEED 4000
846
-      #endif
847
-    #endif
848
-    #if Z_RAISE_BETWEEN_PROBINGS > Z_RAISE_PROBE_DEPLOY_STOW
849
-      #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_BETWEEN_PROBINGS
850
-    #else
851
-      #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_PROBE_DEPLOY_STOW
852
-    #endif
853
-  #endif
854
-
855
-  /**
856
-   * Delta radius/rod trimmers
857
-   */
858
-  #if ENABLED(DELTA)
859
-    #ifndef DELTA_RADIUS_TRIM_TOWER_1
860
-      #define DELTA_RADIUS_TRIM_TOWER_1 0.0
861
-    #endif
862
-    #ifndef DELTA_RADIUS_TRIM_TOWER_2
863
-      #define DELTA_RADIUS_TRIM_TOWER_2 0.0
864
-    #endif
865
-    #ifndef DELTA_RADIUS_TRIM_TOWER_3
866
-      #define DELTA_RADIUS_TRIM_TOWER_3 0.0
867
-    #endif
868
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_1
869
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
870
-    #endif
871
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_2
872
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
873
-    #endif
874
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3
875
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
876
-    #endif
877
-    #if ENABLED(AUTO_BED_LEVELING_GRID)
878
-      #define DELTA_BED_LEVELING_GRID
879
-    #endif
880
-  #endif
881
-
882
-  /**
883
-   * When not using other bed leveling...
884
-   */
885
-  #if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(AUTO_BED_LEVELING_GRID) && DISABLED(DELTA_BED_LEVELING_GRID)
886
-    #define AUTO_BED_LEVELING_3POINT
887
-  #endif
888
-
889
-  /**
890
-   * Buzzer/Speaker
891
-   */
892
-  #if ENABLED(LCD_USE_I2C_BUZZER)
893
-    #ifndef LCD_FEEDBACK_FREQUENCY_HZ
894
-      #define LCD_FEEDBACK_FREQUENCY_HZ 1000
895
-    #endif
896
-    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
897
-      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
898
-    #endif
899
-  #elif PIN_EXISTS(BEEPER)
900
-    #ifndef LCD_FEEDBACK_FREQUENCY_HZ
901
-      #define LCD_FEEDBACK_FREQUENCY_HZ 5000
902
-    #endif
903
-    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
904
-      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
905
-    #endif
906
-  #else
907
-    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
908
-      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
909
-    #endif
910
-  #endif
911
-
912
-  /**
913
-   * MIN_Z_HEIGHT_FOR_HOMING / Z_RAISE_BETWEEN_PROBINGS
914
-   */
915
-  #ifndef MIN_Z_HEIGHT_FOR_HOMING
916
-    #ifndef Z_RAISE_BETWEEN_PROBINGS
917
-      #define MIN_Z_HEIGHT_FOR_HOMING 0
918
-    #else
919
-      #define MIN_Z_HEIGHT_FOR_HOMING Z_RAISE_BETWEEN_PROBINGS
920
-    #endif
921
-  #endif
922
-  #ifndef Z_RAISE_BETWEEN_PROBINGS
923
-    #define Z_RAISE_BETWEEN_PROBING MIN_Z_HEIGHT_FOR_HOMING
924
-  #endif
925
-
926
-#endif //CONFIGURATION_LCD
927
-#endif //CONDITIONALS_H
27
+#include "SanityCheck.h"

+ 270
- 0
Marlin/Conditionals_LCD.h Просмотреть файл

@@ -0,0 +1,270 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Conditionals_LCD.h
25
+ * LCD Defines that depend on configuration but are not editable.
26
+ */
27
+
28
+#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
29
+#define CONDITIONALS_LCD_H
30
+
31
+  #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
32
+
33
+  #if ENABLED(CARTESIO_UI)
34
+    #define DOGLCD
35
+    #define ULTIPANEL
36
+    #define NEWPANEL
37
+    #define DEFAULT_LCD_CONTRAST 90
38
+    #define LCD_CONTRAST_MIN 60
39
+    #define LCD_CONTRAST_MAX 140
40
+  #endif
41
+
42
+  #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
43
+    #define DOGLCD
44
+    #define ULTIPANEL
45
+    #define NEWPANEL
46
+    #define DEFAULT_LCD_CONTRAST 17
47
+  #endif
48
+
49
+  #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
50
+    #define ULTRA_LCD  //general LCD support, also 16x2
51
+    #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
52
+    #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
53
+
54
+    #if ENABLED(miniVIKI)
55
+      #define LCD_CONTRAST_MIN  75
56
+      #define LCD_CONTRAST_MAX 115
57
+      #define DEFAULT_LCD_CONTRAST 95
58
+    #elif ENABLED(VIKI2)
59
+      #define DEFAULT_LCD_CONTRAST 40
60
+    #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
61
+      #define LCD_CONTRAST_MIN  90
62
+      #define LCD_CONTRAST_MAX 130
63
+      #define DEFAULT_LCD_CONTRAST 110
64
+      #define U8GLIB_LM6059_AF
65
+      #define SD_DETECT_INVERTED
66
+    #endif
67
+
68
+    #define ENCODER_PULSES_PER_STEP 4
69
+    #define ENCODER_STEPS_PER_MENU_ITEM 1
70
+  #endif
71
+
72
+  // Generic support for SSD1306 / SH1106 OLED based LCDs.
73
+  #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
74
+    #define ULTRA_LCD  //general LCD support, also 16x2
75
+    #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
76
+  #endif
77
+
78
+  #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
79
+    #define ULTIMAKERCONTROLLER
80
+  #endif
81
+
82
+  #if ENABLED(BQ_LCD_SMART_CONTROLLER)
83
+    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
84
+
85
+    #ifndef ENCODER_PULSES_PER_STEP
86
+      #define ENCODER_PULSES_PER_STEP 4
87
+    #endif
88
+
89
+    #ifndef ENCODER_STEPS_PER_MENU_ITEM
90
+      #define ENCODER_STEPS_PER_MENU_ITEM 1
91
+    #endif
92
+
93
+    #ifndef LONG_FILENAME_HOST_SUPPORT
94
+      #define LONG_FILENAME_HOST_SUPPORT
95
+    #endif
96
+  #endif
97
+
98
+  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
99
+    #define DOGLCD
100
+    #define U8GLIB_ST7920
101
+    #define REPRAP_DISCOUNT_SMART_CONTROLLER
102
+  #endif
103
+
104
+  #if ENABLED(ULTIMAKERCONTROLLER)              \
105
+   || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
106
+   || ENABLED(G3D_PANEL)                        \
107
+   || ENABLED(RIGIDBOT_PANEL)                   \
108
+   || ENABLED(REPRAPWORLD_KEYPAD)
109
+    #define ULTIPANEL
110
+    #define NEWPANEL
111
+  #endif
112
+
113
+  #if ENABLED(RA_CONTROL_PANEL)
114
+    #define LCD_I2C_TYPE_PCA8574
115
+    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
116
+    #define ULTIPANEL
117
+    #define NEWPANEL
118
+  #endif
119
+
120
+  #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
121
+    #define DOGLCD
122
+    #define U8GLIB_ST7920
123
+    #define ULTIPANEL
124
+    #define NEWPANEL
125
+  #endif
126
+
127
+  /**
128
+   * I2C PANELS
129
+   */
130
+
131
+  #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
132
+    // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
133
+    // Make sure it is placed in the Arduino libraries directory.
134
+    #define LCD_I2C_TYPE_PCF8575
135
+    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
136
+    #define ULTIPANEL
137
+    #define NEWPANEL
138
+  #endif
139
+
140
+  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
141
+  #if ENABLED(LCD_I2C_PANELOLU2)
142
+    #define LCD_I2C_TYPE_MCP23017
143
+    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
144
+    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
145
+
146
+    #ifndef ENCODER_PULSES_PER_STEP
147
+      #define ENCODER_PULSES_PER_STEP 4
148
+    #endif
149
+
150
+    #ifndef ENCODER_STEPS_PER_MENU_ITEM
151
+      #define ENCODER_STEPS_PER_MENU_ITEM 1
152
+    #endif
153
+
154
+    #define ULTIPANEL
155
+    #define NEWPANEL
156
+  #endif
157
+
158
+  // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
159
+  #if ENABLED(LCD_I2C_VIKI)
160
+    // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
161
+    // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
162
+    // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
163
+    //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
164
+    #define LCD_I2C_TYPE_MCP23017
165
+    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
166
+    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
167
+    #define ULTIPANEL
168
+    #define NEWPANEL
169
+  #endif
170
+
171
+  // Shift register panels
172
+  // ---------------------
173
+  // 2 wire Non-latching LCD SR from:
174
+  // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
175
+
176
+  #if ENABLED(SAV_3DLCD)
177
+    #define SR_LCD_2W_NL    // Non latching 2 wire shift register
178
+    #define ULTIPANEL
179
+    #define NEWPANEL
180
+  #endif
181
+
182
+  #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
183
+    #ifndef LCD_WIDTH
184
+      #define LCD_WIDTH 22
185
+    #endif
186
+    #ifndef LCD_HEIGHT
187
+      #define LCD_HEIGHT 5
188
+    #endif
189
+  #endif
190
+
191
+  #if ENABLED(ULTIPANEL)
192
+    #define NEWPANEL  //enable this if you have a click-encoder panel
193
+    #define ULTRA_LCD
194
+    #ifndef LCD_WIDTH
195
+      #define LCD_WIDTH 20
196
+    #endif
197
+    #ifndef LCD_HEIGHT
198
+      #define LCD_HEIGHT 4
199
+    #endif
200
+  #else //no panel but just LCD
201
+    #if ENABLED(ULTRA_LCD)
202
+      #ifndef LCD_WIDTH
203
+        #define LCD_WIDTH 16
204
+      #endif
205
+      #ifndef LCD_HEIGHT
206
+        #define LCD_HEIGHT 2
207
+      #endif
208
+    #endif
209
+  #endif
210
+
211
+  #if ENABLED(DOGLCD)
212
+    /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
213
+    // \x00 intentionally skipped to avoid problems in strings
214
+    #define LCD_STR_REFRESH     "\x01"
215
+    #define LCD_STR_FOLDER      "\x02"
216
+    #define LCD_STR_ARROW_RIGHT "\x03"
217
+    #define LCD_STR_UPLEVEL     "\x04"
218
+    #define LCD_STR_CLOCK       "\x05"
219
+    #define LCD_STR_FEEDRATE    "\x06"
220
+    #define LCD_STR_BEDTEMP     "\x07"
221
+    #define LCD_STR_THERMOMETER "\x08"
222
+    #define LCD_STR_DEGREE      "\x09"
223
+
224
+    #define LCD_STR_SPECIAL_MAX '\x09'
225
+    // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
226
+    // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
227
+  #else
228
+    /* Custom characters defined in the first 8 characters of the LCD */
229
+    #define LCD_STR_BEDTEMP     "\x00"  // Print only as a char. This will have 'unexpected' results when used in a string!
230
+    #define LCD_STR_DEGREE      "\x01"
231
+    #define LCD_STR_THERMOMETER "\x02"
232
+    #define LCD_STR_UPLEVEL     "\x03"
233
+    #define LCD_STR_REFRESH     "\x04"
234
+    #define LCD_STR_FOLDER      "\x05"
235
+    #define LCD_STR_FEEDRATE    "\x06"
236
+    #define LCD_STR_CLOCK       "\x07"
237
+    #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
238
+  #endif
239
+
240
+  /**
241
+   * Default LCD contrast for dogm-like LCD displays
242
+   */
243
+  #if ENABLED(DOGLCD)
244
+
245
+    #define HAS_LCD_CONTRAST ( \
246
+        ENABLED(MAKRPANEL) \
247
+     || ENABLED(CARTESIO_UI) \
248
+     || ENABLED(VIKI2) \
249
+     || ENABLED(miniVIKI) \
250
+     || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
251
+    )
252
+
253
+    #if HAS_LCD_CONTRAST
254
+      #ifndef LCD_CONTRAST_MIN
255
+        #define LCD_CONTRAST_MIN 0
256
+      #endif
257
+      #ifndef LCD_CONTRAST_MAX
258
+        #define LCD_CONTRAST_MAX 63
259
+      #endif
260
+      #ifndef DEFAULT_LCD_CONTRAST
261
+        #define DEFAULT_LCD_CONTRAST 32
262
+      #endif
263
+    #endif
264
+  #endif
265
+
266
+  #ifndef BOOTSCREEN_TIMEOUT
267
+    #define BOOTSCREEN_TIMEOUT 2500
268
+  #endif
269
+
270
+#endif //CONDITIONALS_LCD_H

+ 669
- 0
Marlin/Conditionals_post.h Просмотреть файл

@@ -0,0 +1,669 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Conditionals_post.h
25
+ * Defines that depend on configuration but are not editable.
26
+ */
27
+
28
+#ifndef CONDITIONALS_POST_H
29
+#define CONDITIONALS_POST_H
30
+
31
+  #if ENABLED(EMERGENCY_PARSER)
32
+    #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410"
33
+  #else
34
+    #define EMERGENCY_PARSER_CAPABILITIES ""
35
+  #endif
36
+
37
+  /**
38
+   * Set ENDSTOPPULLUPS for unused endstop switches
39
+   */
40
+  #if ENABLED(ENDSTOPPULLUPS)
41
+    #if ENABLED(USE_XMAX_PLUG)
42
+      #define ENDSTOPPULLUP_XMAX
43
+    #endif
44
+    #if ENABLED(USE_YMAX_PLUG)
45
+      #define ENDSTOPPULLUP_YMAX
46
+    #endif
47
+    #if ENABLED(USE_ZMAX_PLUG)
48
+      #define ENDSTOPPULLUP_ZMAX
49
+    #endif
50
+    #if ENABLED(USE_XMIN_PLUG)
51
+      #define ENDSTOPPULLUP_XMIN
52
+    #endif
53
+    #if ENABLED(USE_YMIN_PLUG)
54
+      #define ENDSTOPPULLUP_YMIN
55
+    #endif
56
+    #if ENABLED(USE_ZMIN_PLUG)
57
+      #define ENDSTOPPULLUP_ZMIN
58
+    #endif
59
+    #if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
60
+      #define ENDSTOPPULLUP_ZMIN_PROBE
61
+    #endif
62
+  #endif
63
+
64
+  /**
65
+   * Axis lengths
66
+   */
67
+  #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
68
+  #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
69
+  #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
70
+
71
+  /**
72
+   * CoreXY and CoreXZ
73
+   */
74
+  #if ENABLED(COREXY)
75
+    #define CORE_AXIS_1 A_AXIS // XY from A + B
76
+    #define CORE_AXIS_2 B_AXIS
77
+    #define NORMAL_AXIS Z_AXIS
78
+  #elif ENABLED(COREXZ)
79
+    #define CORE_AXIS_1 A_AXIS // XZ from A + C
80
+    #define CORE_AXIS_2 C_AXIS
81
+    #define NORMAL_AXIS Y_AXIS
82
+  #elif ENABLED(COREYZ)
83
+    #define CORE_AXIS_1 B_AXIS // YZ from B + C
84
+    #define CORE_AXIS_2 C_AXIS
85
+    #define NORMAL_AXIS X_AXIS
86
+  #endif
87
+
88
+  /**
89
+   * SCARA
90
+   */
91
+  #if ENABLED(SCARA)
92
+    #undef SLOWDOWN
93
+    #define QUICK_HOME //SCARA needs Quickhome
94
+  #endif
95
+
96
+  /**
97
+   * AUTOSET LOCATIONS OF LIMIT SWITCHES
98
+   */
99
+  #if ENABLED(MANUAL_HOME_POSITIONS)  // Use manual limit switch locations
100
+    #define X_HOME_POS MANUAL_X_HOME_POS
101
+    #define Y_HOME_POS MANUAL_Y_HOME_POS
102
+    #define Z_HOME_POS MANUAL_Z_HOME_POS
103
+  #else //!MANUAL_HOME_POSITIONS – Use home switch positions based on homing direction and travel limits
104
+    #if ENABLED(BED_CENTER_AT_0_0)
105
+      #define X_HOME_POS (X_MAX_LENGTH) * (X_HOME_DIR) * 0.5
106
+      #define Y_HOME_POS (Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5
107
+    #else
108
+      #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
109
+      #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
110
+    #endif
111
+    #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS)
112
+  #endif //!MANUAL_HOME_POSITIONS
113
+
114
+  /**
115
+   * The BLTouch Probe emulates a servo probe
116
+   */
117
+  #if ENABLED(BLTOUCH)
118
+    #undef Z_ENDSTOP_SERVO_NR
119
+    #undef Z_SERVO_ANGLES
120
+    #define Z_ENDSTOP_SERVO_NR 0
121
+    #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract
122
+    #undef DEACTIVATE_SERVOS_AFTER_MOVE
123
+    #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
124
+      #undef Z_MIN_ENDSTOP_INVERTING
125
+      #define Z_MIN_ENDSTOP_INVERTING false
126
+    #endif
127
+  #endif
128
+
129
+  /**
130
+   * Auto Bed Leveling and Z Probe Repeatability Test
131
+   */
132
+  #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
133
+
134
+  // Boundaries for probing based on set limits
135
+  #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
136
+  #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
137
+  #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
138
+  #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
139
+
140
+  #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
141
+
142
+  /**
143
+   * Z Sled Probe requires Z_SAFE_HOMING
144
+   */
145
+  #if ENABLED(Z_PROBE_SLED)
146
+    #define Z_SAFE_HOMING
147
+  #endif
148
+
149
+  /**
150
+   * Safe Homing Options
151
+   */
152
+  #if ENABLED(Z_SAFE_HOMING)
153
+    #ifndef Z_SAFE_HOMING_X_POINT
154
+      #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
155
+    #endif
156
+    #ifndef Z_SAFE_HOMING_Y_POINT
157
+      #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
158
+    #endif
159
+  #endif
160
+
161
+  /**
162
+   * Host keep alive
163
+   */
164
+  #ifndef DEFAULT_KEEPALIVE_INTERVAL
165
+    #define DEFAULT_KEEPALIVE_INTERVAL 2
166
+  #endif
167
+
168
+  /**
169
+   * MAX_STEP_FREQUENCY differs for TOSHIBA
170
+   */
171
+  #if ENABLED(CONFIG_STEPPERS_TOSHIBA)
172
+    #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
173
+  #else
174
+    #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
175
+  #endif
176
+
177
+  // MS1 MS2 Stepper Driver Microstepping mode table
178
+  #define MICROSTEP1 LOW,LOW
179
+  #define MICROSTEP2 HIGH,LOW
180
+  #define MICROSTEP4 LOW,HIGH
181
+  #define MICROSTEP8 HIGH,HIGH
182
+  #define MICROSTEP16 HIGH,HIGH
183
+
184
+  /**
185
+   * Advance calculated values
186
+   */
187
+  #if ENABLED(ADVANCE)
188
+    #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
189
+    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS] / (EXTRUSION_AREA))
190
+  #endif
191
+
192
+  #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
193
+    #undef SD_DETECT_INVERTED
194
+  #endif
195
+
196
+  /**
197
+   * Set defaults for missing (newer) options
198
+   */
199
+  #ifndef DISABLE_INACTIVE_X
200
+    #define DISABLE_INACTIVE_X DISABLE_X
201
+  #endif
202
+  #ifndef DISABLE_INACTIVE_Y
203
+    #define DISABLE_INACTIVE_Y DISABLE_Y
204
+  #endif
205
+  #ifndef DISABLE_INACTIVE_Z
206
+    #define DISABLE_INACTIVE_Z DISABLE_Z
207
+  #endif
208
+  #ifndef DISABLE_INACTIVE_E
209
+    #define DISABLE_INACTIVE_E DISABLE_E
210
+  #endif
211
+
212
+  // Power Signal Control Definitions
213
+  // By default use ATX definition
214
+  #ifndef POWER_SUPPLY
215
+    #define POWER_SUPPLY 1
216
+  #endif
217
+  #if (POWER_SUPPLY == 1)     // 1 = ATX
218
+    #define PS_ON_AWAKE  LOW
219
+    #define PS_ON_ASLEEP HIGH
220
+  #elif (POWER_SUPPLY == 2)   // 2 = X-Box 360 203W
221
+    #define PS_ON_AWAKE  HIGH
222
+    #define PS_ON_ASLEEP LOW
223
+  #endif
224
+  #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON))
225
+
226
+  /**
227
+   * Temp Sensor defines
228
+   */
229
+  #if TEMP_SENSOR_0 == -3
230
+    #define HEATER_0_USES_MAX6675
231
+    #define MAX6675_IS_MAX31855
232
+  #elif TEMP_SENSOR_0 == -2
233
+    #define HEATER_0_USES_MAX6675
234
+  #elif TEMP_SENSOR_0 == -1
235
+    #define HEATER_0_USES_AD595
236
+  #elif TEMP_SENSOR_0 == 0
237
+    #undef HEATER_0_MINTEMP
238
+    #undef HEATER_0_MAXTEMP
239
+  #elif TEMP_SENSOR_0 > 0
240
+    #define THERMISTORHEATER_0 TEMP_SENSOR_0
241
+    #define HEATER_0_USES_THERMISTOR
242
+  #endif
243
+
244
+  #if TEMP_SENSOR_1 <= -2
245
+    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1"
246
+  #elif TEMP_SENSOR_1 == -1
247
+    #define HEATER_1_USES_AD595
248
+  #elif TEMP_SENSOR_1 == 0
249
+    #undef HEATER_1_MINTEMP
250
+    #undef HEATER_1_MAXTEMP
251
+  #elif TEMP_SENSOR_1 > 0
252
+    #define THERMISTORHEATER_1 TEMP_SENSOR_1
253
+    #define HEATER_1_USES_THERMISTOR
254
+  #endif
255
+
256
+  #if TEMP_SENSOR_2 <= -2
257
+    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2"
258
+  #elif TEMP_SENSOR_2 == -1
259
+    #define HEATER_2_USES_AD595
260
+  #elif TEMP_SENSOR_2 == 0
261
+    #undef HEATER_2_MINTEMP
262
+    #undef HEATER_2_MAXTEMP
263
+  #elif TEMP_SENSOR_2 > 0
264
+    #define THERMISTORHEATER_2 TEMP_SENSOR_2
265
+    #define HEATER_2_USES_THERMISTOR
266
+  #endif
267
+
268
+  #if TEMP_SENSOR_3 <= -2
269
+    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3"
270
+  #elif TEMP_SENSOR_3 == -1
271
+    #define HEATER_3_USES_AD595
272
+  #elif TEMP_SENSOR_3 == 0
273
+    #undef HEATER_3_MINTEMP
274
+    #undef HEATER_3_MAXTEMP
275
+  #elif TEMP_SENSOR_3 > 0
276
+    #define THERMISTORHEATER_3 TEMP_SENSOR_3
277
+    #define HEATER_3_USES_THERMISTOR
278
+  #endif
279
+
280
+  #if TEMP_SENSOR_BED <= -2
281
+    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
282
+  #elif TEMP_SENSOR_BED == -1
283
+    #define BED_USES_AD595
284
+  #elif TEMP_SENSOR_BED == 0
285
+    #undef BED_MINTEMP
286
+    #undef BED_MAXTEMP
287
+  #elif TEMP_SENSOR_BED > 0
288
+    #define THERMISTORBED TEMP_SENSOR_BED
289
+    #define BED_USES_THERMISTOR
290
+  #endif
291
+
292
+  /**
293
+   * Flags for PID handling
294
+   */
295
+  #define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED))
296
+  #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED))
297
+
298
+  /**
299
+   * Extruders have some combination of stepper motors and hotends
300
+   * so we separate these concepts into the defines:
301
+   *
302
+   *  EXTRUDERS    - Number of Selectable Tools
303
+   *  HOTENDS      - Number of hotends, whether connected or separate
304
+   *  E_STEPPERS   - Number of actual E stepper motors
305
+   *  TOOL_E_INDEX - Index to use when getting/setting the tool state
306
+   *  
307
+   */
308
+  #if ENABLED(SINGLENOZZLE)             // One hotend, multi-extruder
309
+    #define HOTENDS      1
310
+    #define E_STEPPERS   EXTRUDERS
311
+    #define TOOL_E_INDEX current_block->active_extruder
312
+    #undef TEMP_SENSOR_1_AS_REDUNDANT
313
+    #undef HOTEND_OFFSET_X
314
+    #undef HOTEND_OFFSET_Y
315
+  #elif ENABLED(SWITCHING_EXTRUDER)     // One E stepper, unified E axis, two hotends
316
+    #define HOTENDS      EXTRUDERS
317
+    #define E_STEPPERS   1
318
+    #define TOOL_E_INDEX 0
319
+    #ifndef HOTEND_OFFSET_Z
320
+      #define HOTEND_OFFSET_Z { 0 }
321
+    #endif
322
+  #elif ENABLED(MIXING_EXTRUDER)        // Multi-stepper, unified E axis, one hotend
323
+    #define HOTENDS      1
324
+    #define E_STEPPERS   MIXING_STEPPERS
325
+    #define TOOL_E_INDEX 0
326
+  #else                                 // One stepper, E axis, and hotend per tool
327
+    #define HOTENDS      EXTRUDERS
328
+    #define E_STEPPERS   EXTRUDERS
329
+    #define TOOL_E_INDEX current_block->active_extruder
330
+  #endif
331
+
332
+  /**
333
+   * Default hotend offsets, if not defined
334
+   */
335
+  #if HOTENDS > 1
336
+    #ifndef HOTEND_OFFSET_X
337
+      #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
338
+    #endif
339
+    #ifndef HOTEND_OFFSET_Y
340
+      #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
341
+    #endif
342
+    #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER))
343
+      #define HOTEND_OFFSET_Z { 0 }
344
+    #endif
345
+  #endif
346
+
347
+  /**
348
+   * ARRAY_BY_EXTRUDERS based on EXTRUDERS
349
+   */
350
+  #define ARRAY_BY_EXTRUDERS(args...) ARRAY_N(EXTRUDERS, args)
351
+  #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1)
352
+
353
+  /**
354
+   * ARRAY_BY_HOTENDS based on HOTENDS
355
+   */
356
+  #define ARRAY_BY_HOTENDS(args...) ARRAY_N(HOTENDS, args)
357
+  #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
358
+
359
+  /**
360
+   * Z_DUAL_ENDSTOPS endstop reassignment
361
+   */
362
+  #if ENABLED(Z_DUAL_ENDSTOPS)
363
+    #define _XMIN_ 100
364
+    #define _YMIN_ 200
365
+    #define _ZMIN_ 300
366
+    #define _XMAX_ 101
367
+    #define _YMAX_ 201
368
+    #define _ZMAX_ 301
369
+    #if Z2_USE_ENDSTOP == _XMAX_
370
+      #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
371
+      #define Z2_MAX_PIN X_MAX_PIN
372
+      #undef USE_XMAX_PLUG
373
+    #elif Z2_USE_ENDSTOP == _YMAX_
374
+      #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
375
+      #define Z2_MAX_PIN Y_MAX_PIN
376
+      #undef USE_YMAX_PLUG
377
+    #elif Z2_USE_ENDSTOP == _ZMAX_
378
+      #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
379
+      #define Z2_MAX_PIN Z_MAX_PIN
380
+      #undef USE_ZMAX_PLUG
381
+    #elif Z2_USE_ENDSTOP == _XMIN_
382
+      #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
383
+      #define Z2_MAX_PIN X_MIN_PIN
384
+      #undef USE_XMIN_PLUG
385
+    #elif Z2_USE_ENDSTOP == _YMIN_
386
+      #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
387
+      #define Z2_MAX_PIN Y_MIN_PIN
388
+      #undef USE_YMIN_PLUG
389
+    #elif Z2_USE_ENDSTOP == _ZMIN_
390
+      #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
391
+      #define Z2_MAX_PIN Z_MIN_PIN
392
+      #undef USE_ZMIN_PLUG
393
+    #else
394
+      #define Z2_MAX_ENDSTOP_INVERTING false
395
+    #endif
396
+  #endif
397
+
398
+  /**
399
+   * Shorthand for pin tests, used wherever needed
400
+   */
401
+  #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2)
402
+  #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
403
+  #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
404
+  #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
405
+  #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
406
+  #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
407
+  #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
408
+  #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
409
+  #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
410
+  #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
411
+  #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN))
412
+  #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN))
413
+  #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
414
+  #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
415
+  #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
416
+  #define HAS_FAN0 (PIN_EXISTS(FAN))
417
+  #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN1_PIN)
418
+  #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN2_PIN)
419
+  #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
420
+  #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
421
+  #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
422
+  #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
423
+  #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
424
+  #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
425
+  #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
426
+  #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT))
427
+  #define HAS_HOME (PIN_EXISTS(HOME))
428
+  #define HAS_KILL (PIN_EXISTS(KILL))
429
+  #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
430
+  #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
431
+  #define HAS_X_MIN (PIN_EXISTS(X_MIN))
432
+  #define HAS_X_MAX (PIN_EXISTS(X_MAX))
433
+  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN))
434
+  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX))
435
+  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN))
436
+  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
437
+  #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
438
+  #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
439
+  #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
440
+  #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
441
+  #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
442
+  #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
443
+  #define HAS_MICROSTEPS (PIN_EXISTS(X_MS1))
444
+  #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
445
+  #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
446
+  #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
447
+  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
448
+  #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
449
+  #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
450
+  #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
451
+  #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
452
+  #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
453
+  #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
454
+  #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
455
+  #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
456
+  #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
457
+  #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
458
+  #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
459
+  #define HAS_X_DIR (PIN_EXISTS(X_DIR))
460
+  #define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
461
+  #define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
462
+  #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
463
+  #define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
464
+  #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
465
+  #define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
466
+  #define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
467
+  #define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
468
+  #define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
469
+  #define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
470
+  #define HAS_X_STEP (PIN_EXISTS(X_STEP))
471
+  #define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
472
+  #define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
473
+  #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
474
+  #define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
475
+  #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
476
+  #define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
477
+  #define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
478
+  #define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
479
+  #define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
480
+  #define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
481
+  #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
482
+  #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
483
+
484
+  #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
485
+
486
+  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
487
+
488
+  #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED))
489
+
490
+  /**
491
+   * This value is used by M109 when trying to calculate a ballpark safe margin
492
+   * to prevent wait-forever situation.
493
+   */
494
+  #ifndef EXTRUDE_MINTEMP
495
+   #define EXTRUDE_MINTEMP 170
496
+  #endif
497
+
498
+  /**
499
+   * Helper Macros for heaters and extruder fan
500
+   */
501
+  #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
502
+  #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
503
+    #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v)
504
+    #if HOTENDS > 2
505
+      #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
506
+      #if HOTENDS > 3
507
+        #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
508
+      #endif
509
+    #endif
510
+  #endif
511
+  #if ENABLED(HEATERS_PARALLEL)
512
+    #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
513
+  #else
514
+    #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
515
+  #endif
516
+  #if HAS_HEATER_BED
517
+    #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
518
+  #endif
519
+
520
+  /**
521
+   * Up to 3 PWM fans
522
+   */
523
+  #if HAS_FAN2
524
+    #define FAN_COUNT 3
525
+  #elif HAS_FAN1
526
+    #define FAN_COUNT 2
527
+  #elif HAS_FAN0
528
+    #define FAN_COUNT 1
529
+  #else
530
+    #define FAN_COUNT 0
531
+  #endif
532
+
533
+  #if HAS_FAN0
534
+    #define WRITE_FAN(v) WRITE(FAN_PIN, v)
535
+    #define WRITE_FAN0(v) WRITE_FAN(v)
536
+  #endif
537
+  #if HAS_FAN1
538
+    #define WRITE_FAN1(v) WRITE(FAN1_PIN, v)
539
+  #endif
540
+  #if HAS_FAN2
541
+    #define WRITE_FAN2(v) WRITE(FAN2_PIN, v)
542
+  #endif
543
+  #define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
544
+
545
+  /**
546
+   * Servos and probes
547
+   */
548
+
549
+  #if HAS_SERVOS
550
+    #ifndef Z_ENDSTOP_SERVO_NR
551
+      #define Z_ENDSTOP_SERVO_NR -1
552
+    #endif
553
+  #endif
554
+
555
+  #define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
556
+
557
+  #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
558
+
559
+  #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED)
560
+
561
+  #if ENABLED(Z_PROBE_ALLEN_KEY)
562
+    #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
563
+  #endif
564
+
565
+  /**
566
+   * Bed Probe dependencies
567
+   */
568
+  #if HAS_BED_PROBE
569
+    #ifndef X_PROBE_OFFSET_FROM_EXTRUDER
570
+      #define X_PROBE_OFFSET_FROM_EXTRUDER 0
571
+    #endif
572
+    #ifndef Y_PROBE_OFFSET_FROM_EXTRUDER
573
+      #define Y_PROBE_OFFSET_FROM_EXTRUDER 0
574
+    #endif
575
+    #ifndef Z_PROBE_OFFSET_FROM_EXTRUDER
576
+      #define Z_PROBE_OFFSET_FROM_EXTRUDER 0
577
+    #endif
578
+    #ifndef Z_PROBE_OFFSET_RANGE_MIN
579
+      #define Z_PROBE_OFFSET_RANGE_MIN -20
580
+    #endif
581
+    #ifndef Z_PROBE_OFFSET_RANGE_MAX
582
+      #define Z_PROBE_OFFSET_RANGE_MAX 20
583
+    #endif
584
+    #ifndef XY_PROBE_SPEED
585
+      #ifdef HOMING_FEEDRATE_XY
586
+        #define XY_PROBE_SPEED HOMING_FEEDRATE_XY
587
+      #else
588
+        #define XY_PROBE_SPEED 4000
589
+      #endif
590
+    #endif
591
+    #if Z_RAISE_BETWEEN_PROBINGS > Z_RAISE_PROBE_DEPLOY_STOW
592
+      #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_BETWEEN_PROBINGS
593
+    #else
594
+      #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_PROBE_DEPLOY_STOW
595
+    #endif
596
+  #endif
597
+
598
+  /**
599
+   * Delta radius/rod trimmers
600
+   */
601
+  #if ENABLED(DELTA)
602
+    #ifndef DELTA_RADIUS_TRIM_TOWER_1
603
+      #define DELTA_RADIUS_TRIM_TOWER_1 0.0
604
+    #endif
605
+    #ifndef DELTA_RADIUS_TRIM_TOWER_2
606
+      #define DELTA_RADIUS_TRIM_TOWER_2 0.0
607
+    #endif
608
+    #ifndef DELTA_RADIUS_TRIM_TOWER_3
609
+      #define DELTA_RADIUS_TRIM_TOWER_3 0.0
610
+    #endif
611
+    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_1
612
+      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
613
+    #endif
614
+    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_2
615
+      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
616
+    #endif
617
+    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3
618
+      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
619
+    #endif
620
+    #if ENABLED(AUTO_BED_LEVELING_GRID)
621
+      #define DELTA_BED_LEVELING_GRID
622
+    #endif
623
+  #endif
624
+
625
+  /**
626
+   * When not using other bed leveling...
627
+   */
628
+  #if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(AUTO_BED_LEVELING_GRID) && DISABLED(DELTA_BED_LEVELING_GRID)
629
+    #define AUTO_BED_LEVELING_3POINT
630
+  #endif
631
+
632
+  /**
633
+   * Buzzer/Speaker
634
+   */
635
+  #if ENABLED(LCD_USE_I2C_BUZZER)
636
+    #ifndef LCD_FEEDBACK_FREQUENCY_HZ
637
+      #define LCD_FEEDBACK_FREQUENCY_HZ 1000
638
+    #endif
639
+    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
640
+      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
641
+    #endif
642
+  #elif PIN_EXISTS(BEEPER)
643
+    #ifndef LCD_FEEDBACK_FREQUENCY_HZ
644
+      #define LCD_FEEDBACK_FREQUENCY_HZ 5000
645
+    #endif
646
+    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
647
+      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
648
+    #endif
649
+  #else
650
+    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
651
+      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
652
+    #endif
653
+  #endif
654
+
655
+  /**
656
+   * MIN_Z_HEIGHT_FOR_HOMING / Z_RAISE_BETWEEN_PROBINGS
657
+   */
658
+  #ifndef MIN_Z_HEIGHT_FOR_HOMING
659
+    #ifndef Z_RAISE_BETWEEN_PROBINGS
660
+      #define MIN_Z_HEIGHT_FOR_HOMING 0
661
+    #else
662
+      #define MIN_Z_HEIGHT_FOR_HOMING Z_RAISE_BETWEEN_PROBINGS
663
+    #endif
664
+  #endif
665
+  #ifndef Z_RAISE_BETWEEN_PROBINGS
666
+    #define Z_RAISE_BETWEEN_PROBING MIN_Z_HEIGHT_FOR_HOMING
667
+  #endif
668
+
669
+#endif // CONDITIONALS_POST_H

+ 1
- 17
Marlin/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,10 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_Bootscreen.h"
117
-#endif
118
-
119 106
 // @section machine
120 107
 
121 108
 // SERIAL_PORT selects which serial port should be used for communication with the host.
@@ -1343,7 +1330,4 @@
1343 1330
   //#define FILAMENT_LCD_DISPLAY
1344 1331
 #endif
1345 1332
 
1346
-#include "Configuration_adv.h"
1347
-#include "thermistortables.h"
1348
-
1349
-#endif //CONFIGURATION_H
1333
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 11
- 33
Marlin/Marlin.h Просмотреть файл

@@ -22,12 +22,6 @@
22 22
 #ifndef MARLIN_H
23 23
 #define MARLIN_H
24 24
 
25
-#define  FORCE_INLINE __attribute__((always_inline)) inline
26
-/**
27
- * Compiler warning on unused variable.
28
- */
29
-#define UNUSED(x) (void) (x)
30
-
31 25
 #include <math.h>
32 26
 #include <stdio.h>
33 27
 #include <stdlib.h>
@@ -39,28 +33,27 @@
39 33
 #include <avr/eeprom.h>
40 34
 #include <avr/interrupt.h>
41 35
 
42
-#include "fastio.h"
43
-#include "Configuration.h"
44
-#include "pins.h"
45
-
46
-#include "utility.h"
47
-
48
-#ifndef SANITYCHECK_H
49
-  #error "Your Configuration.h and Configuration_adv.h files are outdated!"
50
-#endif
36
+#include "MarlinConfig.h"
51 37
 
52
-#include "Arduino.h"
38
+#include "fastio.h"
53 39
 
54 40
 #include "enum.h"
41
+#include "utility.h"
55 42
 
56 43
 typedef unsigned long millis_t;
57 44
 
58 45
 #ifdef USBCON
59 46
   #include "HardwareSerial.h"
47
+  #if ENABLED(BLUETOOTH)
48
+    #define MYSERIAL bluetoothSerial
49
+  #else
50
+    #define MYSERIAL Serial
51
+  #endif // BLUETOOTH
52
+#else
53
+  #include "MarlinSerial.h"
54
+  #define MYSERIAL customizedSerial
60 55
 #endif
61 56
 
62
-#include "MarlinSerial.h"
63
-
64 57
 #include "WString.h"
65 58
 
66 59
 #if ENABLED(PRINTCOUNTER)
@@ -69,16 +62,6 @@ typedef unsigned long millis_t;
69 62
   #include "stopwatch.h"
70 63
 #endif
71 64
 
72
-#ifdef USBCON
73
-  #if ENABLED(BLUETOOTH)
74
-    #define MYSERIAL bluetoothSerial
75
-  #else
76
-    #define MYSERIAL Serial
77
-  #endif // BLUETOOTH
78
-#else
79
-  #define MYSERIAL customizedSerial
80
-#endif
81
-
82 65
 #define SERIAL_CHAR(x) MYSERIAL.write(x)
83 66
 #define SERIAL_EOL SERIAL_CHAR('\n')
84 67
 
@@ -272,11 +255,6 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
272 255
   void setPwmFrequency(uint8_t pin, int val);
273 256
 #endif
274 257
 
275
-#ifndef CRITICAL_SECTION_START
276
-  #define CRITICAL_SECTION_START  unsigned char _sreg = SREG; cli();
277
-  #define CRITICAL_SECTION_END    SREG = _sreg;
278
-#endif
279
-
280 258
 /**
281 259
  * Feedrate scaling and conversion
282 260
  */

+ 1
- 2
Marlin/Marlin.ino Просмотреть файл

@@ -34,8 +34,7 @@
34 34
 /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */
35 35
 /* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */
36 36
 
37
-#include "Configuration.h"
38
-#include "pins.h"
37
+#include "MarlinConfig.h"
39 38
 
40 39
 #if ENABLED(ULTRA_LCD)
41 40
   #if ENABLED(LCD_I2C_TYPE_PCF8575)

+ 39
- 0
Marlin/MarlinConfig.h Просмотреть файл

@@ -0,0 +1,39 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#ifndef MARLIN_CONFIG_H
24
+#define MARLIN_CONFIG_H
25
+
26
+#include "macros.h"
27
+#include "boards.h"
28
+#include "Version.h"
29
+#include "Configuration.h"
30
+#include "Conditionals_LCD.h"
31
+#include "Configuration_adv.h"
32
+#include "pins.h"
33
+#ifndef USBCON
34
+  #define HardwareSerial_h // trick to disable the standard HWserial
35
+#endif
36
+#include "Arduino.h"
37
+#include "Conditionals_post.h"
38
+
39
+#endif // MARLIN_CONFIG_H

+ 729
- 0
Marlin/SanityCheck.cpp Просмотреть файл

@@ -0,0 +1,729 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * SanityCheck.cpp
25
+ *
26
+ * Test configuration values for errors at compile-time.
27
+ * This is done only once, here, to speed up compilation time.
28
+ */
29
+#include "MarlinConfig.h"
30
+
31
+/**
32
+ * Due to the high number of issues related with old versions of Arduino IDE
33
+ * we are now warning our users to update their toolkits. In a future Marlin
34
+ * release we will stop supporting old IDE versions and will require user
35
+ * action to proceed with compilation in such environments.
36
+ */
37
+#if !defined(ARDUINO) || ARDUINO < 10600
38
+  #error "Versions of Arduino IDE prior to 1.6.0 are no longer supported, please update your toolkit."
39
+#endif
40
+
41
+/**
42
+ * We try our best to include sanity checks for all the changes configuration
43
+ * directives because people have a tendency to use outdated config files with
44
+ * the bleding edge source code, but sometimes this is not enough. This check
45
+ * will force a minimum config file revision, otherwise Marlin will not build.
46
+ */
47
+#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION
48
+  #error "You are using an old Configuration.h file, update it before building Marlin."
49
+#endif
50
+
51
+#if ! defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION
52
+  #error "You are using an old Configuration_adv.h file, update it before building Marlin."
53
+#endif
54
+
55
+/**
56
+ * Marlin release, version and default string
57
+ */
58
+#ifndef SHORT_BUILD_VERSION
59
+  #error "SHORT_BUILD_VERSION must be specified."
60
+#elif !defined(DETAILED_BUILD_VERSION)
61
+  #error "BUILD_VERSION must be specified."
62
+#elif !defined(STRING_DISTRIBUTION_DATE)
63
+  #error "STRING_DISTRIBUTION_DATE must be specified."
64
+#elif !defined(PROTOCOL_VERSION)
65
+  #error "PROTOCOL_VERSION must be specified."
66
+#elif !defined(MACHINE_NAME)
67
+  #error "MACHINE_NAME must be specified."
68
+#elif !defined(SOURCE_CODE_URL)
69
+  #error "SOURCE_CODE_URL must be specified."
70
+#elif !defined(DEFAULT_MACHINE_UUID)
71
+  #error "DEFAULT_MACHINE_UUID must be specified."
72
+#elif !defined(WEBSITE_URL)
73
+  #error "WEBSITE_URL must be specified."
74
+#endif
75
+
76
+/**
77
+ * Dual Stepper Drivers
78
+ */
79
+#if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
80
+  #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
81
+#elif ENABLED(X_DUAL_STEPPER_DRIVERS) && (!HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR)
82
+  #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
83
+#elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && (!HAS_Y2_ENABLE || !HAS_Y2_STEP || !HAS_Y2_DIR)
84
+  #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)."
85
+#elif ENABLED(Z_DUAL_STEPPER_DRIVERS) && (!HAS_Z2_ENABLE || !HAS_Z2_STEP || !HAS_Z2_DIR)
86
+  #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."
87
+#endif
88
+
89
+/**
90
+ * Progress Bar
91
+ */
92
+#if ENABLED(LCD_PROGRESS_BAR)
93
+  #if DISABLED(SDSUPPORT)
94
+    #error "LCD_PROGRESS_BAR requires SDSUPPORT."
95
+  #endif
96
+  #if ENABLED(DOGLCD)
97
+    #error "LCD_PROGRESS_BAR does not apply to graphical displays."
98
+  #endif
99
+  #if ENABLED(FILAMENT_LCD_DISPLAY)
100
+    #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
101
+  #endif
102
+#endif
103
+
104
+/**
105
+ * Babystepping
106
+ */
107
+#if ENABLED(BABYSTEPPING)
108
+  #if DISABLED(ULTRA_LCD)
109
+    #error "BABYSTEPPING requires an LCD controller."
110
+  #endif
111
+  #if ENABLED(SCARA)
112
+    #error "BABYSTEPPING is not implemented for SCARA yet."
113
+  #endif
114
+  #if ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
115
+    #error "BABYSTEPPING only implemented for Z axis on deltabots."
116
+  #endif
117
+#endif
118
+
119
+/**
120
+ * Filament Runout needs a pin and either SD Support or Auto print start detection
121
+ */
122
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
123
+  #if !HAS_FIL_RUNOUT
124
+    #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
125
+  #elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART)
126
+    #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
127
+  #endif
128
+#endif
129
+
130
+/**
131
+ * Filament Change with Extruder Runout Prevention
132
+ */
133
+#if ENABLED(FILAMENT_CHANGE_FEATURE) && ENABLED(EXTRUDER_RUNOUT_PREVENT)
134
+  #error "EXTRUDER_RUNOUT_PREVENT is incompatible with FILAMENT_CHANGE_FEATURE."
135
+#endif
136
+
137
+/**
138
+ * Individual axis homing is useless for DELTAS
139
+ */
140
+#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA)
141
+  #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
142
+#endif
143
+
144
+/**
145
+ * Options only for EXTRUDERS > 1
146
+ */
147
+#if EXTRUDERS > 1
148
+
149
+  #if EXTRUDERS > 4
150
+    #error "The maximum number of EXTRUDERS in Marlin is 4."
151
+  #endif
152
+
153
+  #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
154
+    #error "EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
155
+  #endif
156
+
157
+  #if ENABLED(HEATERS_PARALLEL)
158
+    #error "EXTRUDERS must be 1 with HEATERS_PARALLEL."
159
+  #endif
160
+
161
+#elif ENABLED(SINGLENOZZLE)
162
+  #error "SINGLENOZZLE requires 2 or more EXTRUDERS."
163
+#endif
164
+
165
+/**
166
+ * Only one type of extruder allowed
167
+ */
168
+#if (ENABLED(SWITCHING_EXTRUDER) && (ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER))) \
169
+  || (ENABLED(SINGLENOZZLE) && ENABLED(MIXING_EXTRUDER))
170
+    #error "Please define only one type of extruder: SINGLENOZZLE, SWITCHING_EXTRUDER, or MIXING_EXTRUDER."
171
+#endif
172
+
173
+/**
174
+ * Single Stepper Dual Extruder with switching servo
175
+ */
176
+#if ENABLED(SWITCHING_EXTRUDER)
177
+  #if ENABLED(DUAL_X_CARRIAGE)
178
+    #error "SWITCHING_EXTRUDER and DUAL_X_CARRIAGE are incompatible."
179
+  #elif EXTRUDERS != 2
180
+    #error "SWITCHING_EXTRUDER requires exactly 2 EXTRUDERS."
181
+  #elif NUM_SERVOS < 1
182
+    #error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
183
+  #endif
184
+#endif
185
+
186
+/**
187
+ * Mixing Extruder requirements
188
+ */
189
+#if ENABLED(MIXING_EXTRUDER)
190
+  #if EXTRUDERS > 1
191
+    #error "MIXING_EXTRUDER currently only supports one extruder."
192
+  #endif
193
+  #if MIXING_STEPPERS < 2
194
+    #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
195
+  #endif
196
+  #if ENABLED(FILAMENT_SENSOR)
197
+    #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway."
198
+  #endif
199
+#endif
200
+
201
+/**
202
+ * Limited number of servos
203
+ */
204
+#if defined(NUM_SERVOS) && NUM_SERVOS > 0
205
+  #if NUM_SERVOS > 4
206
+    #error "The maximum number of SERVOS in Marlin is 4."
207
+  #elif HAS_Z_SERVO_ENDSTOP && Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
208
+    #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS."
209
+  #endif
210
+#endif
211
+
212
+/**
213
+ * Servo deactivation depends on servo endstops
214
+ */
215
+#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP
216
+  #error "Z_ENDSTOP_SERVO_NR is required for DEACTIVATE_SERVOS_AFTER_MOVE."
217
+#endif
218
+
219
+/**
220
+ * Required LCD language
221
+ */
222
+#if DISABLED(DOGLCD) && ENABLED(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780)
223
+  #error "You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller."
224
+#endif
225
+
226
+/**
227
+ * Bed Heating Options - PID vs Limit Switching
228
+ */
229
+#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
230
+  #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
231
+#endif
232
+
233
+/**
234
+ * Mesh Bed Leveling
235
+ */
236
+#if ENABLED(MESH_BED_LEVELING)
237
+  #if ENABLED(DELTA)
238
+    #error "MESH_BED_LEVELING does not yet support DELTA printers."
239
+  #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
240
+    #error "Select AUTO_BED_LEVELING_FEATURE or MESH_BED_LEVELING, not both."
241
+  #elif MESH_NUM_X_POINTS > 9 || MESH_NUM_Y_POINTS > 9
242
+    #error "MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS must be less than 10."
243
+  #endif
244
+#elif ENABLED(MANUAL_BED_LEVELING)
245
+  #error "MESH_BED_LEVELING is required for MANUAL_BED_LEVELING."
246
+#endif
247
+
248
+/**
249
+ * Probes
250
+ */
251
+
252
+#if PROBE_SELECTED
253
+
254
+  #if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA)
255
+    #error "You cannot use Z_PROBE_SLED with DELTA."
256
+  #endif
257
+
258
+  /**
259
+   * NUM_SERVOS is required for a Z servo probe
260
+   */
261
+  #if HAS_Z_SERVO_ENDSTOP
262
+    #ifndef NUM_SERVOS
263
+      #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
264
+    #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
265
+      #error "Z_ENDSTOP_SERVO_NR must be less than NUM_SERVOS."
266
+    #endif
267
+  #endif
268
+
269
+  /**
270
+   * A probe needs a pin
271
+   */
272
+  #if !PROBE_PIN_CONFIGURED
273
+    #error "A probe needs a pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
274
+  #endif
275
+
276
+  /**
277
+   * Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
278
+   */
279
+  #if HAS_Z_MIN && HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
280
+    #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
281
+  #endif
282
+
283
+  /**
284
+   * Make sure the plug is enabled if it's used
285
+   */
286
+  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && DISABLED(USE_ZMIN_PLUG)
287
+    #error "You must enable USE_ZMIN_PLUG if any probe or endstop is connected to the ZMIN plug."
288
+  #endif
289
+
290
+  /**
291
+   * Only allow one probe option to be defined
292
+   */
293
+  #if (ENABLED(FIX_MOUNTED_PROBE) && (ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
294
+       || (ENABLED(Z_PROBE_ALLEN_KEY) && (HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
295
+       || (HAS_Z_SERVO_ENDSTOP && ENABLED(Z_PROBE_SLED))
296
+    #error "Please define only one type of probe: Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
297
+  #endif
298
+
299
+  /**
300
+   * Don't allow nonsense probe-pin settings
301
+   */
302
+  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && ENABLED(Z_MIN_PROBE_ENDSTOP)
303
+    #error "You can't enable both Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN and Z_MIN_PROBE_ENDSTOP."
304
+  #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
305
+    #error "Don't enable DISABLE_Z_MIN_PROBE_ENDSTOP with Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN."
306
+  #elif ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) && DISABLED(Z_MIN_PROBE_ENDSTOP)
307
+    #error "DISABLE_Z_MIN_PROBE_ENDSTOP requires Z_MIN_PROBE_ENDSTOP to be set."
308
+  #endif
309
+
310
+  /**
311
+   * Require a Z probe pin if Z_MIN_PROBE_ENDSTOP is enabled.
312
+   */
313
+  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
314
+    #if !HAS_Z_MIN_PROBE_PIN
315
+      #error "Z_MIN_PROBE_ENDSTOP requires a Z_MIN_PROBE_PIN in your board's pins_XXXX.h file."
316
+    #endif
317
+    // Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment.
318
+    //#ifndef NUM_SERVOS
319
+    //  #error "You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_MIN_PROBE_ENDSTOP."
320
+    //#endif
321
+    //#if defined(NUM_SERVOS) && NUM_SERVOS < 1
322
+    //  #error "You must have at least 1 servo defined for NUM_SERVOS to use Z_MIN_PROBE_ENDSTOP."
323
+    //#endif
324
+    //#if Z_ENDSTOP_SERVO_NR < 0
325
+    //  #error "You must have Z_ENDSTOP_SERVO_NR set to at least 0 or above to use Z_MIN_PROBE_ENDSTOP."
326
+    //#endif
327
+    //#ifndef Z_SERVO_ANGLES
328
+    //  #error "You must have Z_SERVO_ANGLES defined for Z Extend and Retract to use Z_MIN_PROBE_ENDSTOP."
329
+    //#endif
330
+  #endif
331
+
332
+  /**
333
+   * Make sure Z raise values are set
334
+   */
335
+  #if defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
336
+    #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_RAISE_PROBE_DEPLOY_STOW instead."
337
+  #elif !defined(Z_RAISE_PROBE_DEPLOY_STOW)
338
+    #error "You must set Z_RAISE_PROBE_DEPLOY_STOW in your configuration."
339
+  #elif !defined(Z_RAISE_BETWEEN_PROBINGS)
340
+    #error "You must set Z_RAISE_BETWEEN_PROBINGS in your configuration."
341
+  #elif Z_RAISE_PROBE_DEPLOY_STOW < 1
342
+    #error "Probes need Z_RAISE_PROBE_DEPLOY_STOW >= 1."
343
+  #elif Z_RAISE_BETWEEN_PROBINGS < 1
344
+    #error "Probes need Z_RAISE_BETWEEN_PROBINGS >= 1."
345
+  #endif
346
+
347
+#else
348
+
349
+  /**
350
+   * Require some kind of probe for bed leveling and probe testing
351
+   */
352
+  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
353
+    #error "AUTO_BED_LEVELING_FEATURE requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
354
+  #elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
355
+    #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
356
+  #elif ENABLED(Z_SAFE_HOMING)
357
+    #error "Z_SAFE_HOMING currently requires a probe."
358
+  #endif
359
+
360
+#endif
361
+
362
+/**
363
+ * Make sure Z_SAFE_HOMING point is reachable
364
+ */
365
+#if ENABLED(Z_SAFE_HOMING)
366
+  #if Z_SAFE_HOMING_X_POINT < MIN_PROBE_X || Z_SAFE_HOMING_X_POINT > MAX_PROBE_X
367
+    #error "The given Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
368
+  #elif Z_SAFE_HOMING_Y_POINT < MIN_PROBE_Y || Z_SAFE_HOMING_Y_POINT > MAX_PROBE_Y
369
+    #error "The given Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe."
370
+  #endif
371
+#endif // Z_SAFE_HOMING
372
+
373
+/**
374
+ * Auto Bed Leveling
375
+ */
376
+#if ENABLED(AUTO_BED_LEVELING_FEATURE)
377
+
378
+  /**
379
+   * Delta has limited bed leveling options
380
+   */
381
+  #if ENABLED(DELTA) && DISABLED(AUTO_BED_LEVELING_GRID)
382
+    #error "You must use AUTO_BED_LEVELING_GRID for DELTA bed leveling."
383
+  #endif
384
+
385
+  /**
386
+   * Require a Z min pin
387
+   */
388
+  #if !PIN_EXISTS(Z_MIN)
389
+    #if !PIN_EXISTS(Z_MIN_PROBE) || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z probe, but not enable it.
390
+      #error "AUTO_BED_LEVELING_FEATURE requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin."
391
+    #endif
392
+  #endif
393
+
394
+  /**
395
+   * Check if Probe_Offset * Grid Points is greater than Probing Range
396
+   */
397
+  #if ENABLED(AUTO_BED_LEVELING_GRID)
398
+    #ifndef DELTA_PROBEABLE_RADIUS
399
+      // Be sure points are in the right order
400
+      #if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION
401
+        #error "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION."
402
+      #elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION
403
+        #error "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION."
404
+      #endif
405
+      // Make sure probing points are reachable
406
+      #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
407
+        #error "The given LEFT_PROBE_BED_POSITION can't be reached by the Z probe."
408
+      #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
409
+        #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the Z probe."
410
+      #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
411
+        #error "The given FRONT_PROBE_BED_POSITION can't be reached by the Z probe."
412
+      #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
413
+        #error "The given BACK_PROBE_BED_POSITION can't be reached by the Z probe."
414
+      #endif
415
+    #endif
416
+  #else // !AUTO_BED_LEVELING_GRID
417
+
418
+    // Check the triangulation points
419
+    #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
420
+      #error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe."
421
+    #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
422
+      #error "The given ABL_PROBE_PT_2_X can't be reached by the Z probe."
423
+    #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
424
+      #error "The given ABL_PROBE_PT_3_X can't be reached by the Z probe."
425
+    #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
426
+      #error "The given ABL_PROBE_PT_1_Y can't be reached by the Z probe."
427
+    #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
428
+      #error "The given ABL_PROBE_PT_2_Y can't be reached by the Z probe."
429
+    #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
430
+      #error "The given ABL_PROBE_PT_3_Y can't be reached by the Z probe."
431
+    #endif
432
+
433
+  #endif // !AUTO_BED_LEVELING_GRID
434
+
435
+#endif // AUTO_BED_LEVELING_FEATURE
436
+
437
+/**
438
+ * Advance Extrusion
439
+ */
440
+#if ENABLED(ADVANCE) && ENABLED(LIN_ADVANCE)
441
+  #error "You can enable ADVANCE or LIN_ADVANCE, but not both."
442
+#endif
443
+
444
+/**
445
+ * Filament Width Sensor
446
+ */
447
+#if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR
448
+  #error "FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined."
449
+#endif
450
+
451
+/**
452
+ * ULTIPANEL encoder
453
+ */
454
+#if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
455
+  #error "ULTIPANEL requires some kind of encoder."
456
+#endif
457
+
458
+#if ENCODER_PULSES_PER_STEP < 0
459
+  #error "ENCODER_PULSES_PER_STEP should not be negative, use REVERSE_MENU_DIRECTION instead."
460
+#endif
461
+
462
+/**
463
+ * SAV_3DGLCD display options
464
+ */
465
+#if ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106)
466
+  #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
467
+#endif
468
+
469
+/**
470
+ * Don't set more than one kinematic type
471
+ */
472
+#if (ENABLED(DELTA) && (ENABLED(SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
473
+ || (ENABLED(SCARA) && (ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
474
+ || (ENABLED(COREXY) && (ENABLED(COREXZ) || ENABLED(COREYZ))) \
475
+ || (ENABLED(COREXZ) && ENABLED(COREYZ))
476
+  #error "Please enable only one of DELTA, SCARA, COREXY, COREXZ, or COREYZ."
477
+#endif
478
+
479
+/**
480
+ * Allen Key
481
+ * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis.
482
+ */
483
+#if ENABLED(Z_PROBE_ALLEN_KEY) && (Z_HOME_DIR < 0) && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
484
+  #error "You can't home to a z min endstop with a Z_PROBE_ALLEN_KEY"
485
+#endif
486
+
487
+/**
488
+ * Dual X Carriage requirements
489
+ */
490
+#if ENABLED(DUAL_X_CARRIAGE)
491
+  #if EXTRUDERS == 1
492
+    #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
493
+  #elif ENABLED(COREXY) || ENABLED(COREXZ)
494
+    #error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ."
495
+  #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
496
+    #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
497
+  #elif !HAS_X_MAX
498
+    #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
499
+  #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
500
+    #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
501
+  #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
502
+    #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
503
+  #endif
504
+#endif // DUAL_X_CARRIAGE
505
+
506
+/**
507
+ * Make sure auto fan pins don't conflict with the fan pin
508
+ */
509
+#if HAS_AUTO_FAN
510
+  #if HAS_FAN0
511
+    #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
512
+      #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN."
513
+    #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
514
+      #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN."
515
+    #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
516
+      #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN."
517
+    #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
518
+      #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN."
519
+    #endif
520
+  #endif
521
+#endif
522
+
523
+#if HAS_FAN0 && CONTROLLERFAN_PIN == FAN_PIN
524
+  #error "You cannot set CONTROLLERFAN_PIN equal to FAN_PIN."
525
+#endif
526
+
527
+#if HAS_CONTROLLERFAN
528
+  #if EXTRUDER_0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
529
+    #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
530
+  #elif EXTRUDER_1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
531
+    #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
532
+  #elif EXTRUDER_2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
533
+    #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
534
+  #elif EXTRUDER_3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
535
+    #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
536
+  #endif
537
+#endif
538
+
539
+/**
540
+ * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
541
+ */
542
+#if !HAS_HEATER_0
543
+  #error "HEATER_0_PIN not defined for this board."
544
+#elif !PIN_EXISTS(TEMP_0)
545
+  #error "TEMP_0_PIN not defined for this board."
546
+#elif !PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)
547
+  #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
548
+#elif TEMP_SENSOR_0 == 0
549
+  #error "TEMP_SENSOR_0 is required."
550
+#endif
551
+
552
+#if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
553
+  #if !HAS_HEATER_1
554
+    #error "HEATER_1_PIN not defined for this board."
555
+  #endif
556
+#endif
557
+
558
+#if HOTENDS > 1
559
+  #if TEMP_SENSOR_1 == 0
560
+    #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
561
+  #elif !PIN_EXISTS(TEMP_1)
562
+    #error "TEMP_1_PIN not defined for this board."
563
+  #endif
564
+  #if HOTENDS > 2
565
+    #if TEMP_SENSOR_2 == 0
566
+      #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
567
+    #elif !HAS_HEATER_2
568
+      #error "HEATER_2_PIN not defined for this board."
569
+    #elif !PIN_EXISTS(TEMP_2)
570
+      #error "TEMP_2_PIN not defined for this board."
571
+    #endif
572
+    #if HOTENDS > 3
573
+      #if TEMP_SENSOR_3 == 0
574
+        #error "TEMP_SENSOR_3 is required with 4 HOTENDS."
575
+      #elif !HAS_HEATER_3
576
+        #error "HEATER_3_PIN not defined for this board."
577
+      #elif !PIN_EXISTS(TEMP_3)
578
+        #error "TEMP_3_PIN not defined for this board."
579
+      #endif
580
+    #elif TEMP_SENSOR_3 != 0
581
+      #error "TEMP_SENSOR_3 shouldn't be set with only 3 extruders."
582
+    #endif
583
+  #elif TEMP_SENSOR_2 != 0
584
+    #error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders."
585
+  #elif TEMP_SENSOR_3 != 0
586
+    #error "TEMP_SENSOR_3 shouldn't be set with only 2 extruders."
587
+  #endif
588
+#elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
589
+  #error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder."
590
+#elif TEMP_SENSOR_2 != 0
591
+  #error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder."
592
+#elif TEMP_SENSOR_3 != 0
593
+  #error "TEMP_SENSOR_3 shouldn't be set with only 1 extruder."
594
+#endif
595
+
596
+#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
597
+  #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
598
+#endif
599
+
600
+/**
601
+ * Basic 2-nozzle duplication mode
602
+ */
603
+#if ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
604
+  #if HOTENDS != 2
605
+    #error "DUAL_NOZZLE_DUPLICATION_MODE requires exactly 2 hotends."
606
+  #elif ENABLED(DUAL_X_CARRIAGE)
607
+    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with DUAL_X_CARRIAGE."
608
+  #elif ENABLED(SINGLENOZZLE)
609
+    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SINGLENOZZLE."
610
+  #elif ENABLED(MIXING_EXTRUDER)
611
+    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with MIXING_EXTRUDER."
612
+  #elif ENABLED(SWITCHING_EXTRUDER)
613
+    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SWITCHING_EXTRUDER."
614
+  #endif
615
+#endif
616
+
617
+/**
618
+ * Test Extruder Pins
619
+ */
620
+#if EXTRUDERS > 3
621
+  #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
622
+    #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
623
+  #endif
624
+#elif EXTRUDERS > 2
625
+  #if !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
626
+    #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
627
+  #endif
628
+#elif EXTRUDERS > 1
629
+  #if !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
630
+    #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
631
+  #endif
632
+#endif
633
+
634
+/**
635
+ * Endstops
636
+ */
637
+#if DISABLED(USE_XMIN_PLUG) && DISABLED(USE_XMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _XMAX_ && Z2_USE_ENDSTOP <= _XMIN_)
638
+ #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG"
639
+#elif DISABLED(USE_YMIN_PLUG) && DISABLED(USE_YMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _YMAX_ && Z2_USE_ENDSTOP <= _YMIN_)
640
+ #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG"
641
+#elif DISABLED(USE_ZMIN_PLUG) && DISABLED(USE_ZMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _ZMAX_ && Z2_USE_ENDSTOP <= _ZMIN_)
642
+ #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG"
643
+#elif ENABLED(Z_DUAL_ENDSTOPS) && !Z2_USE_ENDSTOP
644
+ #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS"
645
+#endif
646
+
647
+/**
648
+ * emergency-command parser
649
+ */
650
+#if ENABLED(EMERGENCY_PARSER) && ENABLED(USBCON)
651
+  #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
652
+#endif
653
+
654
+ /**
655
+ * Warnings for old configurations
656
+ */
657
+#if WATCH_TEMP_PERIOD > 500
658
+  #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
659
+#elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
660
+  #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS."
661
+#elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD)
662
+  #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED."
663
+#elif ENABLED(COREXZ) && ENABLED(Z_LATE_ENABLE)
664
+  #error "Z_LATE_ENABLE can't be used with COREXZ."
665
+#elif defined(X_HOME_RETRACT_MM)
666
+  #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
667
+#elif defined(BEEPER)
668
+  #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
669
+#elif defined(SDCARDDETECT)
670
+  #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
671
+#elif defined(SDCARDDETECTINVERTED)
672
+  #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
673
+#elif defined(BTENABLED)
674
+  #error "BTENABLED is now BLUETOOTH. Please update your configuration."
675
+#elif defined(CUSTOM_MENDEL_NAME)
676
+  #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration."
677
+#elif defined(HAS_AUTOMATIC_VERSIONING)
678
+  #error "HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration."
679
+#elif defined(ENABLE_AUTO_BED_LEVELING)
680
+  #error "ENABLE_AUTO_BED_LEVELING is now AUTO_BED_LEVELING_FEATURE. Please update your configuration."
681
+#elif defined(SDSLOW)
682
+  #error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead."
683
+#elif defined(SDEXTRASLOW)
684
+  #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead."
685
+#elif defined(Z_RAISE_BEFORE_HOMING)
686
+  #error "Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead."
687
+#elif defined(FILAMENT_SENSOR)
688
+  #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead."
689
+#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
690
+  #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
691
+#elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP)
692
+  #error "Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2"
693
+#elif defined(LANGUAGE_INCLUDE)
694
+  #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
695
+#elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
696
+  #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead."
697
+#elif defined(PID_PARAMS_PER_EXTRUDER)
698
+  #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead."
699
+#elif defined(EXTRUDER_WATTS)
700
+  #error "EXTRUDER_WATTS is deprecated. Use HOTEND_WATTS instead."
701
+#elif defined(SERVO_ENDSTOP_ANGLES)
702
+  #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
703
+#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
704
+  #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
705
+#elif defined(XY_TRAVEL_SPEED)
706
+  #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
707
+#elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
708
+  #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead."
709
+#elif defined(SERVO_DEACTIVATION_DELAY)
710
+  #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
711
+#elif ENABLED(FILAMENTCHANGEENABLE)
712
+  #error "FILAMENTCHANGEENABLE is now FILAMENT_CHANGE_FEATURE. Please update your configuration."
713
+#elif defined(PLA_PREHEAT_HOTEND_TEMP)
714
+  #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration."
715
+#elif defined(PLA_PREHEAT_HPB_TEMP)
716
+  #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED. Please update your configuration."
717
+#elif defined(PLA_PREHEAT_FAN_SPEED)
718
+  #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED. Please update your configuration."
719
+#elif defined(ABS_PREHEAT_HOTEND_TEMP)
720
+  #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND. Please update your configuration."
721
+#elif defined(ABS_PREHEAT_HPB_TEMP)
722
+  #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED. Please update your configuration."
723
+#elif defined(ABS_PREHEAT_FAN_SPEED)
724
+  #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED. Please update your configuration."
725
+#elif defined(ENDSTOPS_ONLY_FOR_HOMING)
726
+  #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead."
727
+#elif defined(HOMING_FEEDRATE)
728
+  #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead."
729
+#endif

+ 2
- 706
Marlin/SanityCheck.h Просмотреть файл

@@ -22,710 +22,6 @@
22 22
 
23 23
 /**
24 24
  * SanityCheck.h
25
- *
26
- * Test configuration values for errors at compile-time.
27
- */
28
-#ifndef SANITYCHECK_H
29
-#define SANITYCHECK_H
30
-
31
-/**
32
- * Due to the high number of issues related with old versions of Arduino IDE
33
- * we are now warning our users to update their toolkits. In a future Marlin
34
- * release we will stop supporting old IDE versions and will require user
35
- * action to proceed with compilation in such environments.
36
- */
37
-#if !defined(ARDUINO) || ARDUINO < 10600
38
-  #error "Versions of Arduino IDE prior to 1.6.0 are no longer supported, please update your toolkit."
39
-#endif
40
-
41
-/**
42
- * We try our best to include sanity checks for all the changes configuration
43
- * directives because people have a tendency to use outdated config files with
44
- * the bleding edge source code, but sometimes this is not enough. This check
45
- * will force a minimum config file revision, otherwise Marlin will not build.
46
- */
47
-#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION
48
-  #error "You are using an old Configuration.h file, update it before building Marlin."
49
-#endif
50
-
51
-#if ! defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION
52
-  #error "You are using an old Configuration_adv.h file, update it before building Marlin."
53
-#endif
54
-
55
-/**
56
- * Marlin release, version and default string
57
- */
58
-#ifndef SHORT_BUILD_VERSION
59
-  #error "SHORT_BUILD_VERSION must be specified."
60
-#elif !defined(DETAILED_BUILD_VERSION)
61
-  #error "BUILD_VERSION must be specified."
62
-#elif !defined(STRING_DISTRIBUTION_DATE)
63
-  #error "STRING_DISTRIBUTION_DATE must be specified."
64
-#elif !defined(PROTOCOL_VERSION)
65
-  #error "PROTOCOL_VERSION must be specified."
66
-#elif !defined(MACHINE_NAME)
67
-  #error "MACHINE_NAME must be specified."
68
-#elif !defined(SOURCE_CODE_URL)
69
-  #error "SOURCE_CODE_URL must be specified."
70
-#elif !defined(DEFAULT_MACHINE_UUID)
71
-  #error "DEFAULT_MACHINE_UUID must be specified."
72
-#elif !defined(WEBSITE_URL)
73
-  #error "WEBSITE_URL must be specified."
74
-#endif
75
-
76
-/**
77
- * Dual Stepper Drivers
78
- */
79
-#if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
80
-  #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
81
-#elif ENABLED(X_DUAL_STEPPER_DRIVERS) && (!HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR)
82
-  #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
83
-#elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && (!HAS_Y2_ENABLE || !HAS_Y2_STEP || !HAS_Y2_DIR)
84
-  #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)."
85
-#elif ENABLED(Z_DUAL_STEPPER_DRIVERS) && (!HAS_Z2_ENABLE || !HAS_Z2_STEP || !HAS_Z2_DIR)
86
-  #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."
87
-#endif
88
-
89
-/**
90
- * Progress Bar
91
- */
92
-#if ENABLED(LCD_PROGRESS_BAR)
93
-  #if DISABLED(SDSUPPORT)
94
-    #error "LCD_PROGRESS_BAR requires SDSUPPORT."
95
-  #endif
96
-  #if ENABLED(DOGLCD)
97
-    #error "LCD_PROGRESS_BAR does not apply to graphical displays."
98
-  #endif
99
-  #if ENABLED(FILAMENT_LCD_DISPLAY)
100
-    #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
101
-  #endif
102
-#endif
103
-
104
-/**
105
- * Babystepping
106
- */
107
-#if ENABLED(BABYSTEPPING)
108
-  #if DISABLED(ULTRA_LCD)
109
-    #error "BABYSTEPPING requires an LCD controller."
110
-  #endif
111
-  #if ENABLED(SCARA)
112
-    #error "BABYSTEPPING is not implemented for SCARA yet."
113
-  #endif
114
-  #if ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
115
-    #error "BABYSTEPPING only implemented for Z axis on deltabots."
116
-  #endif
117
-#endif
118
-
119
-/**
120
- * Filament Runout needs a pin and either SD Support or Auto print start detection
121
- */
122
-#if ENABLED(FILAMENT_RUNOUT_SENSOR)
123
-  #if !HAS_FIL_RUNOUT
124
-    #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
125
-  #elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART)
126
-    #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
127
-  #endif
128
-#endif
129
-
130
-/**
131
- * Filament Change with Extruder Runout Prevention
132
- */
133
-#if ENABLED(FILAMENT_CHANGE_FEATURE) && ENABLED(EXTRUDER_RUNOUT_PREVENT)
134
-  #error "EXTRUDER_RUNOUT_PREVENT is incompatible with FILAMENT_CHANGE_FEATURE."
135
-#endif
136
-
137
-/**
138
- * Individual axis homing is useless for DELTAS
139
- */
140
-#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA)
141
-  #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
142
-#endif
143
-
144
-/**
145
- * Options only for EXTRUDERS > 1
146
- */
147
-#if EXTRUDERS > 1
148
-
149
-  #if EXTRUDERS > 4
150
-    #error "The maximum number of EXTRUDERS in Marlin is 4."
151
-  #endif
152
-
153
-  #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
154
-    #error "EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
155
-  #endif
156
-
157
-  #if ENABLED(HEATERS_PARALLEL)
158
-    #error "EXTRUDERS must be 1 with HEATERS_PARALLEL."
159
-  #endif
160
-
161
-#elif ENABLED(SINGLENOZZLE)
162
-  #error "SINGLENOZZLE requires 2 or more EXTRUDERS."
163
-#endif
164
-
165
-/**
166
- * Only one type of extruder allowed
167
- */
168
-#if (ENABLED(SWITCHING_EXTRUDER) && (ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER))) \
169
-  || (ENABLED(SINGLENOZZLE) && ENABLED(MIXING_EXTRUDER))
170
-    #error "Please define only one type of extruder: SINGLENOZZLE, SWITCHING_EXTRUDER, or MIXING_EXTRUDER."
171
-#endif
172
-
173
-/**
174
- * Single Stepper Dual Extruder with switching servo
175
- */
176
-#if ENABLED(SWITCHING_EXTRUDER)
177
-  #if ENABLED(DUAL_X_CARRIAGE)
178
-    #error "SWITCHING_EXTRUDER and DUAL_X_CARRIAGE are incompatible."
179
-  #elif EXTRUDERS != 2
180
-    #error "SWITCHING_EXTRUDER requires exactly 2 EXTRUDERS."
181
-  #elif NUM_SERVOS < 1
182
-    #error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
183
-  #endif
184
-#endif
185
-
186
-/**
187
- * Mixing Extruder requirements
188
- */
189
-#if ENABLED(MIXING_EXTRUDER)
190
-  #if EXTRUDERS > 1
191
-    #error "MIXING_EXTRUDER currently only supports one extruder."
192
-  #endif
193
-  #if MIXING_STEPPERS < 2
194
-    #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
195
-  #endif
196
-  #if ENABLED(FILAMENT_SENSOR)
197
-    #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway."
198
-  #endif
199
-#endif
200
-
201
-/**
202
- * Limited number of servos
203
- */
204
-#if defined(NUM_SERVOS) && NUM_SERVOS > 0
205
-  #if NUM_SERVOS > 4
206
-    #error "The maximum number of SERVOS in Marlin is 4."
207
-  #elif HAS_Z_SERVO_ENDSTOP && Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
208
-    #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS."
209
-  #endif
210
-#endif
211
-
212
-/**
213
- * Servo deactivation depends on servo endstops
214
- */
215
-#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP
216
-  #error "Z_ENDSTOP_SERVO_NR is required for DEACTIVATE_SERVOS_AFTER_MOVE."
217
-#endif
218
-
219
-/**
220
- * Required LCD language
221
- */
222
-#if DISABLED(DOGLCD) && ENABLED(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780)
223
-  #error "You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller."
224
-#endif
225
-
226
-/**
227
- * Bed Heating Options - PID vs Limit Switching
228
- */
229
-#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
230
-  #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
231
-#endif
232
-
233
-/**
234
- * Mesh Bed Leveling
235
- */
236
-#if ENABLED(MESH_BED_LEVELING)
237
-  #if ENABLED(DELTA)
238
-    #error "MESH_BED_LEVELING does not yet support DELTA printers."
239
-  #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
240
-    #error "Select AUTO_BED_LEVELING_FEATURE or MESH_BED_LEVELING, not both."
241
-  #elif MESH_NUM_X_POINTS > 9 || MESH_NUM_Y_POINTS > 9
242
-    #error "MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS must be less than 10."
243
-  #endif
244
-#elif ENABLED(MANUAL_BED_LEVELING)
245
-  #error "MESH_BED_LEVELING is required for MANUAL_BED_LEVELING."
246
-#endif
247
-
248
-/**
249
- * Probes
250
- */
251
-
252
-#if PROBE_SELECTED
253
-
254
-  #if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA)
255
-    #error "You cannot use Z_PROBE_SLED with DELTA."
256
-  #endif
257
-
258
-  /**
259
-   * NUM_SERVOS is required for a Z servo probe
260
-   */
261
-  #if HAS_Z_SERVO_ENDSTOP
262
-    #ifndef NUM_SERVOS
263
-      #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)."
264
-    #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS
265
-      #error "Z_ENDSTOP_SERVO_NR must be less than NUM_SERVOS."
266
-    #endif
267
-  #endif
268
-
269
-  /**
270
-   * A probe needs a pin
271
-   */
272
-  #if !PROBE_PIN_CONFIGURED
273
-    #error "A probe needs a pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
274
-  #endif
275
-
276
-  /**
277
-   * Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
278
-   */
279
-  #if HAS_Z_MIN && HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
280
-    #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN."
281
-  #endif
282
-
283
-  /**
284
-   * Make sure the plug is enabled if it's used
285
-   */
286
-  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && DISABLED(USE_ZMIN_PLUG)
287
-    #error "You must enable USE_ZMIN_PLUG if any probe or endstop is connected to the ZMIN plug."
288
-  #endif
289
-
290
-  /**
291
-   * Only allow one probe option to be defined
292
-   */
293
-  #if (ENABLED(FIX_MOUNTED_PROBE) && (ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
294
-       || (ENABLED(Z_PROBE_ALLEN_KEY) && (HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \
295
-       || (HAS_Z_SERVO_ENDSTOP && ENABLED(Z_PROBE_SLED))
296
-    #error "Please define only one type of probe: Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
297
-  #endif
298
-
299
-  /**
300
-   * Don't allow nonsense probe-pin settings
301
-   */
302
-  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && ENABLED(Z_MIN_PROBE_ENDSTOP)
303
-    #error "You can't enable both Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN and Z_MIN_PROBE_ENDSTOP."
304
-  #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
305
-    #error "Don't enable DISABLE_Z_MIN_PROBE_ENDSTOP with Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN."
306
-  #elif ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) && DISABLED(Z_MIN_PROBE_ENDSTOP)
307
-    #error "DISABLE_Z_MIN_PROBE_ENDSTOP requires Z_MIN_PROBE_ENDSTOP to be set."
308
-  #endif
309
-
310
-  /**
311
-   * Require a Z probe pin if Z_MIN_PROBE_ENDSTOP is enabled.
312
-   */
313
-  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
314
-    #if !HAS_Z_MIN_PROBE_PIN
315
-      #error "Z_MIN_PROBE_ENDSTOP requires a Z_MIN_PROBE_PIN in your board's pins_XXXX.h file."
316
-    #endif
317
-    // Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment.
318
-    //#ifndef NUM_SERVOS
319
-    //  #error "You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_MIN_PROBE_ENDSTOP."
320
-    //#endif
321
-    //#if defined(NUM_SERVOS) && NUM_SERVOS < 1
322
-    //  #error "You must have at least 1 servo defined for NUM_SERVOS to use Z_MIN_PROBE_ENDSTOP."
323
-    //#endif
324
-    //#if Z_ENDSTOP_SERVO_NR < 0
325
-    //  #error "You must have Z_ENDSTOP_SERVO_NR set to at least 0 or above to use Z_MIN_PROBE_ENDSTOP."
326
-    //#endif
327
-    //#ifndef Z_SERVO_ANGLES
328
-    //  #error "You must have Z_SERVO_ANGLES defined for Z Extend and Retract to use Z_MIN_PROBE_ENDSTOP."
329
-    //#endif
330
-  #endif
331
-
332
-  /**
333
-   * Make sure Z raise values are set
334
-   */
335
-  #if defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
336
-    #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_RAISE_PROBE_DEPLOY_STOW instead."
337
-  #elif !defined(Z_RAISE_PROBE_DEPLOY_STOW)
338
-    #error "You must set Z_RAISE_PROBE_DEPLOY_STOW in your configuration."
339
-  #elif !defined(Z_RAISE_BETWEEN_PROBINGS)
340
-    #error "You must set Z_RAISE_BETWEEN_PROBINGS in your configuration."
341
-  #elif Z_RAISE_PROBE_DEPLOY_STOW < 1
342
-    #error "Probes need Z_RAISE_PROBE_DEPLOY_STOW >= 1."
343
-  #elif Z_RAISE_BETWEEN_PROBINGS < 1
344
-    #error "Probes need Z_RAISE_BETWEEN_PROBINGS >= 1."
345
-  #endif
346
-
347
-#else
348
-
349
-  /**
350
-   * Require some kind of probe for bed leveling and probe testing
351
-   */
352
-  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
353
-    #error "AUTO_BED_LEVELING_FEATURE requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
354
-  #elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
355
-    #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
356
-  #elif ENABLED(Z_SAFE_HOMING)
357
-    #error "Z_SAFE_HOMING currently requires a probe."
358
-  #endif
359
-
360
-#endif
361
-
362
-/**
363
- * Make sure Z_SAFE_HOMING point is reachable
364
- */
365
-#if ENABLED(Z_SAFE_HOMING)
366
-  #if Z_SAFE_HOMING_X_POINT < MIN_PROBE_X || Z_SAFE_HOMING_X_POINT > MAX_PROBE_X
367
-    #error "The given Z_SAFE_HOMING_X_POINT can't be reached by the Z probe."
368
-  #elif Z_SAFE_HOMING_Y_POINT < MIN_PROBE_Y || Z_SAFE_HOMING_Y_POINT > MAX_PROBE_Y
369
-    #error "The given Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe."
370
-  #endif
371
-#endif // Z_SAFE_HOMING
372
-
373
-/**
374
- * Auto Bed Leveling
375
- */
376
-#if ENABLED(AUTO_BED_LEVELING_FEATURE)
377
-
378
-  /**
379
-   * Delta has limited bed leveling options
380
-   */
381
-  #if ENABLED(DELTA) && DISABLED(AUTO_BED_LEVELING_GRID)
382
-    #error "You must use AUTO_BED_LEVELING_GRID for DELTA bed leveling."
383
-  #endif
384
-
385
-  /**
386
-   * Require a Z min pin
387
-   */
388
-  #if !PIN_EXISTS(Z_MIN)
389
-    #if !PIN_EXISTS(Z_MIN_PROBE) || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z probe, but not enable it.
390
-      #error "AUTO_BED_LEVELING_FEATURE requires a Z_MIN or Z_PROBE endstop. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin."
391
-    #endif
392
-  #endif
393
-
394
-  /**
395
-   * Check if Probe_Offset * Grid Points is greater than Probing Range
396
-   */
397
-  #if ENABLED(AUTO_BED_LEVELING_GRID)
398
-    #ifndef DELTA_PROBEABLE_RADIUS
399
-      // Be sure points are in the right order
400
-      #if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION
401
-        #error "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION."
402
-      #elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION
403
-        #error "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION."
404
-      #endif
405
-      // Make sure probing points are reachable
406
-      #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
407
-        #error "The given LEFT_PROBE_BED_POSITION can't be reached by the Z probe."
408
-      #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
409
-        #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the Z probe."
410
-      #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
411
-        #error "The given FRONT_PROBE_BED_POSITION can't be reached by the Z probe."
412
-      #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
413
-        #error "The given BACK_PROBE_BED_POSITION can't be reached by the Z probe."
414
-      #endif
415
-    #endif
416
-  #else // !AUTO_BED_LEVELING_GRID
417
-
418
-    // Check the triangulation points
419
-    #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
420
-      #error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe."
421
-    #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
422
-      #error "The given ABL_PROBE_PT_2_X can't be reached by the Z probe."
423
-    #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
424
-      #error "The given ABL_PROBE_PT_3_X can't be reached by the Z probe."
425
-    #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
426
-      #error "The given ABL_PROBE_PT_1_Y can't be reached by the Z probe."
427
-    #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
428
-      #error "The given ABL_PROBE_PT_2_Y can't be reached by the Z probe."
429
-    #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
430
-      #error "The given ABL_PROBE_PT_3_Y can't be reached by the Z probe."
431
-    #endif
432
-
433
-  #endif // !AUTO_BED_LEVELING_GRID
434
-
435
-#endif // AUTO_BED_LEVELING_FEATURE
436
-
437
-/**
438
- * Advance Extrusion
439
- */
440
-#if ENABLED(ADVANCE) && ENABLED(LIN_ADVANCE)
441
-  #error "You can enable ADVANCE or LIN_ADVANCE, but not both."
442
-#endif
443
-
444
-/**
445
- * Filament Width Sensor
446
- */
447
-#if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR
448
-  #error "FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined."
449
-#endif
450
-
451
-/**
452
- * ULTIPANEL encoder
453
- */
454
-#if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
455
-  #error "ULTIPANEL requires some kind of encoder."
456
-#endif
457
-
458
-#if ENCODER_PULSES_PER_STEP < 0
459
-  #error "ENCODER_PULSES_PER_STEP should not be negative, use REVERSE_MENU_DIRECTION instead."
460
-#endif
461
-
462
-/**
463
- * SAV_3DGLCD display options
464
- */
465
-#if ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106)
466
-  #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
467
-#endif
468
-
469
-/**
470
- * Don't set more than one kinematic type
471
- */
472
-#if (ENABLED(DELTA) && (ENABLED(SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
473
- || (ENABLED(SCARA) && (ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
474
- || (ENABLED(COREXY) && (ENABLED(COREXZ) || ENABLED(COREYZ))) \
475
- || (ENABLED(COREXZ) && ENABLED(COREYZ))
476
-  #error "Please enable only one of DELTA, SCARA, COREXY, COREXZ, or COREYZ."
477
-#endif
478
-
479
-/**
480
- * Allen Key
481
- * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis.
482
- */
483
-#if ENABLED(Z_PROBE_ALLEN_KEY) && (Z_HOME_DIR < 0) && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
484
-  #error "You can't home to a z min endstop with a Z_PROBE_ALLEN_KEY"
485
-#endif
486
-
487
-/**
488
- * Dual X Carriage requirements
489
- */
490
-#if ENABLED(DUAL_X_CARRIAGE)
491
-  #if EXTRUDERS == 1
492
-    #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
493
-  #elif ENABLED(COREXY) || ENABLED(COREXZ)
494
-    #error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ."
495
-  #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
496
-    #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
497
-  #elif !HAS_X_MAX
498
-    #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
499
-  #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
500
-    #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
501
-  #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
502
-    #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
503
-  #endif
504
-#endif // DUAL_X_CARRIAGE
505
-
506
-/**
507
- * Make sure auto fan pins don't conflict with the fan pin
508
- */
509
-#if HAS_AUTO_FAN
510
-  #if HAS_FAN0
511
-    #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
512
-      #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN."
513
-    #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
514
-      #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN."
515
-    #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
516
-      #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN."
517
-    #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
518
-      #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN."
519
-    #endif
520
-  #endif
521
-#endif
522
-
523
-#if HAS_FAN0 && CONTROLLERFAN_PIN == FAN_PIN
524
-  #error "You cannot set CONTROLLERFAN_PIN equal to FAN_PIN."
525
-#endif
526
-
527
-#if HAS_CONTROLLERFAN
528
-  #if EXTRUDER_0_AUTO_FAN_PIN == CONTROLLERFAN_PIN
529
-    #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
530
-  #elif EXTRUDER_1_AUTO_FAN_PIN == CONTROLLERFAN_PIN
531
-    #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
532
-  #elif EXTRUDER_2_AUTO_FAN_PIN == CONTROLLERFAN_PIN
533
-    #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
534
-  #elif EXTRUDER_3_AUTO_FAN_PIN == CONTROLLERFAN_PIN
535
-    #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN."
536
-  #endif
537
-#endif
538
-
539
-/**
540
- * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
541
- */
542
-#if !HAS_HEATER_0
543
-  #error "HEATER_0_PIN not defined for this board."
544
-#elif !PIN_EXISTS(TEMP_0)
545
-  #error "TEMP_0_PIN not defined for this board."
546
-#elif !PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)
547
-  #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
548
-#elif TEMP_SENSOR_0 == 0
549
-  #error "TEMP_SENSOR_0 is required."
550
-#endif
551
-
552
-#if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
553
-  #if !HAS_HEATER_1
554
-    #error "HEATER_1_PIN not defined for this board."
555
-  #endif
556
-#endif
557
-
558
-#if HOTENDS > 1
559
-  #if TEMP_SENSOR_1 == 0
560
-    #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
561
-  #elif !PIN_EXISTS(TEMP_1)
562
-    #error "TEMP_1_PIN not defined for this board."
563
-  #endif
564
-  #if HOTENDS > 2
565
-    #if TEMP_SENSOR_2 == 0
566
-      #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
567
-    #elif !HAS_HEATER_2
568
-      #error "HEATER_2_PIN not defined for this board."
569
-    #elif !PIN_EXISTS(TEMP_2)
570
-      #error "TEMP_2_PIN not defined for this board."
571
-    #endif
572
-    #if HOTENDS > 3
573
-      #if TEMP_SENSOR_3 == 0
574
-        #error "TEMP_SENSOR_3 is required with 4 HOTENDS."
575
-      #elif !HAS_HEATER_3
576
-        #error "HEATER_3_PIN not defined for this board."
577
-      #elif !PIN_EXISTS(TEMP_3)
578
-        #error "TEMP_3_PIN not defined for this board."
579
-      #endif
580
-    #elif TEMP_SENSOR_3 != 0
581
-      #error "TEMP_SENSOR_3 shouldn't be set with only 3 extruders."
582
-    #endif
583
-  #elif TEMP_SENSOR_2 != 0
584
-    #error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders."
585
-  #elif TEMP_SENSOR_3 != 0
586
-    #error "TEMP_SENSOR_3 shouldn't be set with only 2 extruders."
587
-  #endif
588
-#elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
589
-  #error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder."
590
-#elif TEMP_SENSOR_2 != 0
591
-  #error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder."
592
-#elif TEMP_SENSOR_3 != 0
593
-  #error "TEMP_SENSOR_3 shouldn't be set with only 1 extruder."
594
-#endif
595
-
596
-#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
597
-  #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
598
-#endif
599
-
600
-/**
601
- * Basic 2-nozzle duplication mode
25
+ * OBSOLETE: Moved to SanityCheck.cpp
602 26
  */
603
-#if ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
604
-  #if HOTENDS != 2
605
-    #error "DUAL_NOZZLE_DUPLICATION_MODE requires exactly 2 hotends."
606
-  #elif ENABLED(DUAL_X_CARRIAGE)
607
-    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with DUAL_X_CARRIAGE."
608
-  #elif ENABLED(SINGLENOZZLE)
609
-    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SINGLENOZZLE."
610
-  #elif ENABLED(MIXING_EXTRUDER)
611
-    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with MIXING_EXTRUDER."
612
-  #elif ENABLED(SWITCHING_EXTRUDER)
613
-    #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SWITCHING_EXTRUDER."
614
-  #endif
615
-#endif
616
-
617
-/**
618
- * Test Extruder Pins
619
- */
620
-#if EXTRUDERS > 3
621
-  #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
622
-    #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
623
-  #endif
624
-#elif EXTRUDERS > 2
625
-  #if !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
626
-    #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
627
-  #endif
628
-#elif EXTRUDERS > 1
629
-  #if !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
630
-    #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
631
-  #endif
632
-#endif
633
-
634
-/**
635
- * Endstops
636
- */
637
-#if DISABLED(USE_XMIN_PLUG) && DISABLED(USE_XMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _XMAX_ && Z2_USE_ENDSTOP <= _XMIN_)
638
- #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG"
639
-#elif DISABLED(USE_YMIN_PLUG) && DISABLED(USE_YMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _YMAX_ && Z2_USE_ENDSTOP <= _YMIN_)
640
- #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG"
641
-#elif DISABLED(USE_ZMIN_PLUG) && DISABLED(USE_ZMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _ZMAX_ && Z2_USE_ENDSTOP <= _ZMIN_)
642
- #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG"
643
-#elif ENABLED(Z_DUAL_ENDSTOPS) && !Z2_USE_ENDSTOP
644
- #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS"
645
-#endif
646
-
647
-/**
648
- * emergency-command parser
649
- */
650
-#if ENABLED(EMERGENCY_PARSER) && ENABLED(USBCON)
651
-  #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
652
-#endif
653
-
654
- /**
655
- * Warnings for old configurations
656
- */
657
-#if WATCH_TEMP_PERIOD > 500
658
-  #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
659
-#elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
660
-  #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS."
661
-#elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD)
662
-  #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED."
663
-#elif ENABLED(COREXZ) && ENABLED(Z_LATE_ENABLE)
664
-  #error "Z_LATE_ENABLE can't be used with COREXZ."
665
-#elif defined(X_HOME_RETRACT_MM)
666
-  #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
667
-#elif defined(BEEPER)
668
-  #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
669
-#elif defined(SDCARDDETECT)
670
-  #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
671
-#elif defined(SDCARDDETECTINVERTED)
672
-  #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
673
-#elif defined(BTENABLED)
674
-  #error "BTENABLED is now BLUETOOTH. Please update your configuration."
675
-#elif defined(CUSTOM_MENDEL_NAME)
676
-  #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration."
677
-#elif defined(HAS_AUTOMATIC_VERSIONING)
678
-  #error "HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration."
679
-#elif defined(ENABLE_AUTO_BED_LEVELING)
680
-  #error "ENABLE_AUTO_BED_LEVELING is now AUTO_BED_LEVELING_FEATURE. Please update your configuration."
681
-#elif defined(SDSLOW)
682
-  #error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead."
683
-#elif defined(SDEXTRASLOW)
684
-  #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead."
685
-#elif defined(Z_RAISE_BEFORE_HOMING)
686
-  #error "Z_RAISE_BEFORE_HOMING is deprecated. Use MIN_Z_HEIGHT_FOR_HOMING instead."
687
-#elif defined(FILAMENT_SENSOR)
688
-  #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead."
689
-#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
690
-  #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
691
-#elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP)
692
-  #error "Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2"
693
-#elif defined(LANGUAGE_INCLUDE)
694
-  #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
695
-#elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
696
-  #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead."
697
-#elif defined(PID_PARAMS_PER_EXTRUDER)
698
-  #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead."
699
-#elif defined(EXTRUDER_WATTS)
700
-  #error "EXTRUDER_WATTS is deprecated. Use HOTEND_WATTS instead."
701
-#elif defined(SERVO_ENDSTOP_ANGLES)
702
-  #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
703
-#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
704
-  #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
705
-#elif defined(XY_TRAVEL_SPEED)
706
-  #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
707
-#elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
708
-  #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead."
709
-#elif defined(SERVO_DEACTIVATION_DELAY)
710
-  #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
711
-#elif ENABLED(FILAMENTCHANGEENABLE)
712
-  #error "FILAMENTCHANGEENABLE is now FILAMENT_CHANGE_FEATURE. Please update your configuration."
713
-#elif defined(PLA_PREHEAT_HOTEND_TEMP)
714
-  #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration."
715
-#elif defined(PLA_PREHEAT_HPB_TEMP)
716
-  #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED. Please update your configuration."
717
-#elif defined(PLA_PREHEAT_FAN_SPEED)
718
-  #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED. Please update your configuration."
719
-#elif defined(ABS_PREHEAT_HOTEND_TEMP)
720
-  #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND. Please update your configuration."
721
-#elif defined(ABS_PREHEAT_HPB_TEMP)
722
-  #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED. Please update your configuration."
723
-#elif defined(ABS_PREHEAT_FAN_SPEED)
724
-  #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED. Please update your configuration."
725
-#elif defined(ENDSTOPS_ONLY_FOR_HOMING)
726
-  #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead."
727
-#elif defined(HOMING_FEEDRATE)
728
-  #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead."
729
-#endif
730
-
731
-#endif //SANITYCHECK_H
27
+#error "Please remove all #include lines from your Configuration.h and Configuration_adv.h files!"

+ 56
- 48
Marlin/Version.h Просмотреть файл

@@ -26,59 +26,67 @@
26 26
  * directive USE_AUTOMATIC_VERSIONING.
27 27
  */
28 28
 
29
-/**
30
- * Marlin release version identifier
31
- */
32
-#define SHORT_BUILD_VERSION "1.1.0-RCBugFix"
29
+#if ENABLED(USE_AUTOMATIC_VERSIONING)
33 30
 
34
-/**
35
- * Verbose version identifier which should contain a reference to the location
36
- * from where the binary was downloaded or the source code was compiled.
37
- */
38
-#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
31
+  #include "_Version.h"
39 32
 
40
-/**
41
- * The STRING_DISTRIBUTION_DATE represents when the binary file was built,
42
- * here we define this default string as the date where the latest release
43
- * version was tagged.
44
- */
45
-#define STRING_DISTRIBUTION_DATE "2016-04-27 12:00"
33
+#else
46 34
 
47
-/**
48
- * Required minimum Configuration.h and Configuration_adv.h file versions.
49
- *
50
- * You must increment this version number for every significant change such as,
51
- * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
52
- * the configuration files.
53
- */
54
-#define REQUIRED_CONFIGURATION_H_VERSION 010100
55
-#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100
35
+  /**
36
+   * Marlin release version identifier
37
+   */
38
+  #define SHORT_BUILD_VERSION "1.1.0-RCBugFix"
56 39
 
57
-/**
58
- * @todo: Missing documentation block
59
- */
60
-#define PROTOCOL_VERSION "1.0"
40
+  /**
41
+   * Verbose version identifier which should contain a reference to the location
42
+   * from where the binary was downloaded or the source code was compiled.
43
+   */
44
+  #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
61 45
 
62
-/**
63
- * Defines a generic printer name to be output to the LCD after booting Marlin.
64
- */
65
-#define MACHINE_NAME "3D Printer"
46
+  /**
47
+   * The STRING_DISTRIBUTION_DATE represents when the binary file was built,
48
+   * here we define this default string as the date where the latest release
49
+   * version was tagged.
50
+   */
51
+  #define STRING_DISTRIBUTION_DATE "2016-04-27 12:00"
66 52
 
67
-/**
68
- * The SOURCE_CODE_URL is the location where users will find the Marlin Source
69
- * Code which is installed on the device. In most cases —unless the manufacturer
70
- * has a distinct Github fork— the Source Code URL should just be the main
71
- * Marlin repository.
72
- */
73
-#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
53
+  /**
54
+   * Required minimum Configuration.h and Configuration_adv.h file versions.
55
+   *
56
+   * You must increment this version number for every significant change such as,
57
+   * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
58
+   * the configuration files.
59
+   */
60
+  #define REQUIRED_CONFIGURATION_H_VERSION 010100
61
+  #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100
74 62
 
75
-/**
76
- * Default generic printer UUID.
77
- */
78
-#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
63
+  /**
64
+   * @todo: Missing documentation block
65
+   */
66
+  #define PROTOCOL_VERSION "1.0"
79 67
 
80
-/**
81
- * The WEBSITE_URL is the location where users can get more information such as
82
- * documentation about a specific Marlin release.
83
- */
84
-#define WEBSITE_URL "http://marlinfw.org"
68
+  /**
69
+   * Defines a generic printer name to be output to the LCD after booting Marlin.
70
+   */
71
+  #define MACHINE_NAME "3D Printer"
72
+
73
+  /**
74
+   * The SOURCE_CODE_URL is the location where users will find the Marlin Source
75
+   * Code which is installed on the device. In most cases —unless the manufacturer
76
+   * has a distinct Github fork— the Source Code URL should just be the main
77
+   * Marlin repository.
78
+   */
79
+  #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
80
+
81
+  /**
82
+   * Default generic printer UUID.
83
+   */
84
+  #define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
85
+
86
+  /**
87
+   * The WEBSITE_URL is the location where users can get more information such as
88
+   * documentation about a specific Marlin release.
89
+   */
90
+  #define WEBSITE_URL "http://marlinfw.org"
91
+
92
+#endif // USE_AUTOMATIC_VERSIONING

+ 1
- 1
Marlin/configuration_store.h Просмотреть файл

@@ -23,7 +23,7 @@
23 23
 #ifndef CONFIGURATION_STORE_H
24 24
 #define CONFIGURATION_STORE_H
25 25
 
26
-#include "Configuration.h"
26
+#include "MarlinConfig.h"
27 27
 
28 28
 void Config_ResetDefault();
29 29
 

+ 1
- 2
Marlin/dac_mcp4728.h Просмотреть файл

@@ -27,8 +27,7 @@
27 27
 #ifndef mcp4728_h
28 28
 #define mcp4728_h
29 29
 
30
-#include "Configuration.h"
31
-#include "Configuration_adv.h"
30
+#include "MarlinConfig.h"
32 31
 
33 32
 #if ENABLED(DAC_STEPPER_CURRENT)
34 33
 #include "Wire.h"

+ 1
- 1
Marlin/digipot_mcp4451.cpp Просмотреть файл

@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23
-#include "Configuration.h"
23
+#include "MarlinConfig.h"
24 24
 
25 25
 #if ENABLED(DIGIPOT_I2C)
26 26
 

+ 1
- 16
Marlin/example_configurations/Cartesio/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 #define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_Bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1337,7 +1325,4 @@
1337 1325
   //#define FILAMENT_LCD_DISPLAY
1338 1326
 #endif
1339 1327
 
1340
-#include "Configuration_adv.h"
1341
-#include "thermistortables.h"
1342
-
1343
-#endif //CONFIGURATION_H
1328
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/Cartesio/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 1
Marlin/example_configurations/Cartesio/_Bootscreen.h Просмотреть файл

@@ -35,7 +35,7 @@
35 35
 #define CUSTOM_BOOTSCREEN_BMPWIDTH  63
36 36
 #define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
37 37
 
38
-const unsigned char 81x0i84fkcmoqbu7vte29[512] PROGMEM = {
38
+const unsigned char custom_start_bmp[512] PROGMEM = {
39 39
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
40 40
   0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00,
41 41
   0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00,

+ 1
- 16
Marlin/example_configurations/Felix/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1320,7 +1308,4 @@
1320 1308
   //#define FILAMENT_LCD_DISPLAY
1321 1309
 #endif
1322 1310
 
1323
-#include "Configuration_adv.h"
1324
-#include "thermistortables.h"
1325
-
1326
-#endif //CONFIGURATION_H
1311
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/Felix/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/Felix/DUAL/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1318,7 +1306,4 @@
1318 1306
   //#define FILAMENT_LCD_DISPLAY
1319 1307
 #endif
1320 1308
 
1321
-#include "Configuration_adv.h"
1322
-#include "thermistortables.h"
1323
-
1324
-#endif //CONFIGURATION_H
1309
+#endif // CONFIGURATION_H

+ 1
- 16
Marlin/example_configurations/Hephestos/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1329,7 +1317,4 @@
1329 1317
   //#define FILAMENT_LCD_DISPLAY
1330 1318
 #endif
1331 1319
 
1332
-#include "Configuration_adv.h"
1333
-#include "thermistortables.h"
1334
-
1335
-#endif //CONFIGURATION_H
1320
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/Hephestos/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 17
Marlin/example_configurations/Hephestos_2/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,10 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 #define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_Bootscreen.h"
117
-#endif
118
-
119 106
 // @section machine
120 107
 
121 108
 // SERIAL_PORT selects which serial port should be used for communication with the host.
@@ -1331,7 +1318,4 @@
1331 1318
   //#define FILAMENT_LCD_DISPLAY
1332 1319
 #endif
1333 1320
 
1334
-#include "Configuration_adv.h"
1335
-#include "thermistortables.h"
1336
-
1337
-#endif //CONFIGURATION_H
1321
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/Hephestos_2/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/K8200/Configuration.h Просмотреть файл

@@ -58,9 +58,6 @@
58 58
  */
59 59
 #define CONFIGURATION_H_VERSION 010100
60 60
 
61
-#include "boards.h"
62
-#include "macros.h"
63
-
64 61
 //===========================================================================
65 62
 //============================= Getting Started =============================
66 63
 //===========================================================================
@@ -93,12 +90,6 @@
93 90
 
94 91
 // @section info
95 92
 
96
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
97
-  #include "_Version.h"
98
-#else
99
-  #include "Version.h"
100
-#endif
101
-
102 93
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
103 94
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
104 95
 // build by the user have been successfully uploaded into firmware.
@@ -119,9 +110,6 @@
119 110
 // example configuration folder.
120 111
 //
121 112
 //#define SHOW_CUSTOM_BOOTSCREEN
122
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
123
-  #include "_bootscreen.h"
124
-#endif
125 113
 
126 114
 // @section machine
127 115
 
@@ -1354,7 +1342,4 @@
1354 1342
   //#define FILAMENT_LCD_DISPLAY
1355 1343
 #endif
1356 1344
 
1357
-#include "Configuration_adv.h"
1358
-#include "thermistortables.h"
1359
-
1360
-#endif //CONFIGURATION_H
1345
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/K8200/Configuration_adv.h Просмотреть файл

@@ -52,8 +52,6 @@
52 52
  */
53 53
 #define CONFIGURATION_ADV_H_VERSION 010100
54 54
 
55
-#include "Conditionals.h"
56
-
57 55
 // @section temperature
58 56
 
59 57
 //===========================================================================
@@ -804,7 +802,4 @@ const unsigned int dropsegments = 2; //everything with less than this number of
804 802
 
805 803
 //#define EXPERIMENTAL_I2CBUS
806 804
 
807
-#include "Conditionals.h"
808
-#include "SanityCheck.h"
809
-
810
-#endif //CONFIGURATION_ADV_H
805
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/K8400/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1337,7 +1325,4 @@
1337 1325
   //#define FILAMENT_LCD_DISPLAY
1338 1326
 #endif
1339 1327
 
1340
-#include "Configuration_adv.h"
1341
-#include "thermistortables.h"
1342
-
1343
-#endif //CONFIGURATION_H
1328
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/K8400/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/K8400/Dual-head/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1337,7 +1325,4 @@
1337 1325
   //#define FILAMENT_LCD_DISPLAY
1338 1326
 #endif
1339 1327
 
1340
-#include "Configuration_adv.h"
1341
-#include "thermistortables.h"
1342
-
1343
-#endif //CONFIGURATION_H
1328
+#endif // CONFIGURATION_H

+ 1
- 16
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1337,7 +1325,4 @@
1337 1325
   //#define FILAMENT_LCD_DISPLAY
1338 1326
 #endif
1339 1327
 
1340
-#include "Configuration_adv.h"
1341
-#include "thermistortables.h"
1342
-
1343
-#endif //CONFIGURATION_H
1328
+#endif // CONFIGURATION_H

+ 1
- 16
Marlin/example_configurations/RigidBot/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1337,7 +1325,4 @@
1337 1325
   //#define FILAMENT_LCD_DISPLAY
1338 1326
 #endif
1339 1327
 
1340
-#include "Configuration_adv.h"
1341
-#include "thermistortables.h"
1342
-
1343
-#endif //CONFIGURATION_H
1328
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/RigidBot/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/SCARA/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -111,12 +108,6 @@
111 108
 
112 109
 // @section info
113 110
 
114
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
115
-  #include "_Version.h"
116
-#else
117
-  #include "Version.h"
118
-#endif
119
-
120 111
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
121 112
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
122 113
 // build by the user have been successfully uploaded into firmware.
@@ -137,9 +128,6 @@
137 128
 // example configuration folder.
138 129
 //
139 130
 //#define SHOW_CUSTOM_BOOTSCREEN
140
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
141
-  #include "_bootscreen.h"
142
-#endif
143 131
 
144 132
 // @section machine
145 133
 
@@ -1345,7 +1333,4 @@
1345 1333
   //#define FILAMENT_LCD_DISPLAY
1346 1334
 #endif
1347 1335
 
1348
-#include "Configuration_adv.h"
1349
-#include "thermistortables.h"
1350
-
1351
-#endif //CONFIGURATION_H
1336
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/SCARA/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/TAZ4/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1358,7 +1346,4 @@
1358 1346
   //#define FILAMENT_LCD_DISPLAY
1359 1347
 #endif
1360 1348
 
1361
-#include "Configuration_adv.h"
1362
-#include "thermistortables.h"
1363
-
1364
-#endif //CONFIGURATION_H
1349
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/TAZ4/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -806,7 +804,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
806 804
 
807 805
 //#define EXPERIMENTAL_I2CBUS
808 806
 
809
-#include "Conditionals.h"
810
-#include "SanityCheck.h"
811
-
812
-#endif //CONFIGURATION_ADV_H
807
+#endif // CONFIGURATION_ADV_H

+ 1
- 17
Marlin/example_configurations/WITBOX/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,10 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_Bootscreen.h"
117
-#endif
118
-
119 106
 // @section machine
120 107
 
121 108
 // SERIAL_PORT selects which serial port should be used for communication with the host.
@@ -1329,7 +1316,4 @@
1329 1316
   //#define FILAMENT_LCD_DISPLAY
1330 1317
 #endif
1331 1318
 
1332
-#include "Configuration_adv.h"
1333
-#include "thermistortables.h"
1334
-
1335
-#endif //CONFIGURATION_H
1319
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/WITBOX/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/adafruit/ST7565/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1337,7 +1325,4 @@
1337 1325
   //#define FILAMENT_LCD_DISPLAY
1338 1326
 #endif
1339 1327
 
1340
-#include "Configuration_adv.h"
1341
-#include "thermistortables.h"
1342
-
1343
-#endif //CONFIGURATION_H
1328
+#endif // CONFIGURATION_H

+ 1
- 16
Marlin/example_configurations/delta/biv2.5/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1429,7 +1417,4 @@
1429 1417
   //#define FILAMENT_LCD_DISPLAY
1430 1418
 #endif
1431 1419
 
1432
-#include "Configuration_adv.h"
1433
-#include "thermistortables.h"
1434
-
1435
-#endif //CONFIGURATION_H
1420
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -800,7 +798,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
800 798
 
801 799
 //#define EXPERIMENTAL_I2CBUS
802 800
 
803
-#include "Conditionals.h"
804
-#include "SanityCheck.h"
805
-
806
-#endif //CONFIGURATION_ADV_H
801
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/delta/generic/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1423,7 +1411,4 @@
1423 1411
   //#define FILAMENT_LCD_DISPLAY
1424 1412
 #endif
1425 1413
 
1426
-#include "Configuration_adv.h"
1427
-#include "thermistortables.h"
1428
-
1429
-#endif //CONFIGURATION_H
1414
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/delta/generic/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -800,7 +798,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
800 798
 
801 799
 //#define EXPERIMENTAL_I2CBUS
802 800
 
803
-#include "Conditionals.h"
804
-#include "SanityCheck.h"
805
-
806
-#endif //CONFIGURATION_ADV_H
801
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/delta/kossel_mini/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1426,7 +1414,4 @@
1426 1414
   //#define FILAMENT_LCD_DISPLAY
1427 1415
 #endif
1428 1416
 
1429
-#include "Configuration_adv.h"
1430
-#include "thermistortables.h"
1431
-
1432
-#endif //CONFIGURATION_H
1417
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -799,7 +797,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
799 797
 
800 798
 //#define EXPERIMENTAL_I2CBUS
801 799
 
802
-#include "Conditionals.h"
803
-#include "SanityCheck.h"
804
-
805
-#endif //CONFIGURATION_ADV_H
800
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/delta/kossel_pro/Configuration.h Просмотреть файл

@@ -57,9 +57,6 @@
57 57
  */
58 58
 #define CONFIGURATION_H_VERSION 010100
59 59
 
60
-#include "boards.h"
61
-#include "macros.h"
62
-
63 60
 //===========================================================================
64 61
 //============================= Getting Started =============================
65 62
 //===========================================================================
@@ -92,12 +89,6 @@
92 89
 
93 90
 // @section info
94 91
 
95
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
96
-  #include "_Version.h"
97
-#else
98
-  #include "Version.h"
99
-#endif
100
-
101 92
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
102 93
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
103 94
 // build by the user have been successfully uploaded into firmware.
@@ -118,9 +109,6 @@
118 109
 // example configuration folder.
119 110
 //
120 111
 //#define SHOW_CUSTOM_BOOTSCREEN
121
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
122
-  #include "_bootscreen.h"
123
-#endif
124 112
 
125 113
 // @section machine
126 114
 
@@ -1426,7 +1414,4 @@
1426 1414
   //#define FILAMENT_LCD_DISPLAY
1427 1415
 #endif
1428 1416
 
1429
-#include "Configuration_adv.h"
1430
-#include "thermistortables.h"
1431
-
1432
-#endif //CONFIGURATION_H
1417
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Просмотреть файл

@@ -51,8 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_ADV_H_VERSION 010100
53 53
 
54
-#include "Conditionals.h"
55
-
56 54
 // @section temperature
57 55
 
58 56
 //===========================================================================
@@ -804,7 +802,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
804 802
 
805 803
 //#define EXPERIMENTAL_I2CBUS
806 804
 
807
-#include "Conditionals.h"
808
-#include "SanityCheck.h"
809
-
810
-#endif //CONFIGURATION_ADV_H
805
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/delta/kossel_xl/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -79,12 +76,6 @@
79 76
 
80 77
 // @section info
81 78
 
82
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
83
-  #include "_Version.h"
84
-#else
85
-  #include "Version.h"
86
-#endif
87
-
88 79
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
89 80
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
90 81
 // build by the user have been successfully uploaded into firmware.
@@ -105,9 +96,6 @@
105 96
 // example configuration folder.
106 97
 //
107 98
 //#define SHOW_CUSTOM_BOOTSCREEN
108
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
109
-  #include "_bootscreen.h"
110
-#endif
111 99
 
112 100
 // @section machine
113 101
 
@@ -1429,7 +1417,4 @@
1429 1417
   //#define FILAMENT_LCD_DISPLAY
1430 1418
 #endif
1431 1419
 
1432
-#include "Configuration_adv.h"
1433
-#include "thermistortables.h"
1434
-
1435
-#endif //CONFIGURATION_H
1420
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -800,7 +798,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
800 798
 
801 799
 //#define EXPERIMENTAL_I2CBUS
802 800
 
803
-#include "Conditionals.h"
804
-#include "SanityCheck.h"
805
-
806
-#endif //CONFIGURATION_ADV_H
801
+#endif // CONFIGURATION_ADV_H

+ 1
- 16
Marlin/example_configurations/makibox/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,9 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_bootscreen.h"
117
-#endif
118 106
 
119 107
 // @section machine
120 108
 
@@ -1340,7 +1328,4 @@
1340 1328
   //#define FILAMENT_LCD_DISPLAY
1341 1329
 #endif
1342 1330
 
1343
-#include "Configuration_adv.h"
1344
-#include "thermistortables.h"
1345
-
1346
-#endif //CONFIGURATION_H
1331
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/makibox/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 17
Marlin/example_configurations/tvrrug/Round2/Configuration.h Просмотреть файл

@@ -51,9 +51,6 @@
51 51
  */
52 52
 #define CONFIGURATION_H_VERSION 010100
53 53
 
54
-#include "boards.h"
55
-#include "macros.h"
56
-
57 54
 //===========================================================================
58 55
 //============================= Getting Started =============================
59 56
 //===========================================================================
@@ -86,12 +83,6 @@
86 83
 
87 84
 // @section info
88 85
 
89
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
90
-  #include "_Version.h"
91
-#else
92
-  #include "Version.h"
93
-#endif
94
-
95 86
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
96 87
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
97 88
 // build by the user have been successfully uploaded into firmware.
@@ -112,10 +103,6 @@
112 103
 // example configuration folder.
113 104
 //
114 105
 //#define SHOW_CUSTOM_BOOTSCREEN
115
-#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
116
-  #include "_Bootscreen.h"
117
-#endif
118
-
119 106
 // @section machine
120 107
 
121 108
 // SERIAL_PORT selects which serial port should be used for communication with the host.
@@ -1331,7 +1318,4 @@
1331 1318
   //#define FILAMENT_LCD_DISPLAY
1332 1319
 #endif
1333 1320
 
1334
-#include "Configuration_adv.h"
1335
-#include "thermistortables.h"
1336
-
1337
-#endif //CONFIGURATION_H
1321
+#endif // CONFIGURATION_H

+ 1
- 6
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Просмотреть файл

@@ -46,8 +46,6 @@
46 46
  */
47 47
 #define CONFIGURATION_ADV_H_VERSION 010100
48 48
 
49
-#include "Conditionals.h"
50
-
51 49
 // @section temperature
52 50
 
53 51
 //===========================================================================
@@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of
798 796
 
799 797
 //#define EXPERIMENTAL_I2CBUS
800 798
 
801
-#include "Conditionals.h"
802
-#include "SanityCheck.h"
803
-
804
-#endif //CONFIGURATION_ADV_H
799
+#endif // CONFIGURATION_ADV_H

+ 1
- 7
Marlin/language.h Просмотреть файл

@@ -23,7 +23,7 @@
23 23
 #ifndef LANGUAGE_H
24 24
 #define LANGUAGE_H
25 25
 
26
-#include "Configuration.h"
26
+#include "MarlinConfig.h"
27 27
 
28 28
 // Fallback if no language is set. DON'T CHANGE
29 29
 #ifndef LCD_LANGUAGE
@@ -68,12 +68,6 @@
68 68
 // pt_utf8    Portuguese (UTF8)
69 69
 // ru         Russian
70 70
 
71
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
72
-  #include "_Version.h"
73
-#else
74
-  #include "Version.h"
75
-#endif
76
-
77 71
 #ifdef DEFAULT_SOURCE_CODE_URL
78 72
   #undef  SOURCE_CODE_URL
79 73
   #define SOURCE_CODE_URL DEFAULT_SOURCE_CODE_URL

+ 14
- 0
Marlin/macros.h Просмотреть файл

@@ -23,6 +23,17 @@
23 23
 #ifndef MACROS_H
24 24
 #define MACROS_H
25 25
 
26
+#define FORCE_INLINE __attribute__((always_inline)) inline
27
+
28
+// Bracket code that shouldn't be interrupted
29
+#ifndef CRITICAL_SECTION_START
30
+  #define CRITICAL_SECTION_START  unsigned char _sreg = SREG; cli();
31
+  #define CRITICAL_SECTION_END    SREG = _sreg;
32
+#endif
33
+
34
+// Remove compiler warning on an unused variable
35
+#define UNUSED(x) (void) (x)
36
+
26 37
 // Macros to make a string from a macro
27 38
 #define STRINGIFY_(M) #M
28 39
 #define STRINGIFY(M) STRINGIFY_(M)
@@ -34,6 +45,9 @@
34 45
 #define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (_BV(b))
35 46
 
36 47
 // Macros for maths shortcuts
48
+#ifndef M_PI
49
+  #define M_PI 3.14159265358979323846
50
+#endif
37 51
 #define RADIANS(d) ((d)*M_PI/180.0)
38 52
 #define DEGREES(r) ((r)*180.0/M_PI)
39 53
 #define HYPOT(x,y) sqrt(sq(x)+sq(y))

+ 1
- 1
Marlin/qr_solve.h Просмотреть файл

@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23
-#include "Configuration.h"
23
+#include "MarlinConfig.h"
24 24
 
25 25
 #if ENABLED(AUTO_BED_LEVELING_GRID)
26 26
 

+ 1
- 1
Marlin/servo.cpp Просмотреть файл

@@ -50,7 +50,7 @@
50 50
  * detach()              - Stop an attached servo from pulsing its i/o pin.
51 51
  *
52 52
  */
53
-#include "Configuration.h"
53
+#include "MarlinConfig.h"
54 54
 
55 55
 #if HAS_SERVOS
56 56
 

+ 1
- 1
Marlin/stepper_indirection.cpp Просмотреть файл

@@ -43,7 +43,7 @@
43 43
 
44 44
 #include "stepper_indirection.h"
45 45
 
46
-#include "Configuration.h"
46
+#include "MarlinConfig.h"
47 47
 
48 48
 #if ENABLED(HAVE_TMCDRIVER)
49 49
   #include <SPI.h>

+ 1
- 1
Marlin/stepper_indirection.h Просмотреть файл

@@ -44,7 +44,7 @@
44 44
 #ifndef STEPPER_INDIRECTION_H
45 45
 #define STEPPER_INDIRECTION_H
46 46
 
47
-#include "Configuration.h"
47
+#include "MarlinConfig.h"
48 48
 
49 49
 // TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI
50 50
 #if ENABLED(HAVE_TMCDRIVER)

+ 1
- 0
Marlin/temperature.cpp Просмотреть файл

@@ -27,6 +27,7 @@
27 27
 #include "Marlin.h"
28 28
 #include "ultralcd.h"
29 29
 #include "temperature.h"
30
+#include "thermistortables.h"
30 31
 #include "language.h"
31 32
 #include "Sd2PinMap.h"
32 33
 

+ 1
- 0
Marlin/temperature.h Просмотреть файл

@@ -29,6 +29,7 @@
29 29
 
30 30
 #include "Marlin.h"
31 31
 #include "planner.h"
32
+#include "thermistortables.h"
32 33
 
33 34
 #if ENABLED(PID_ADD_EXTRUSION_RATE)
34 35
   #include "stepper.h"

+ 9
- 6
Marlin/ultralcd_impl_DOGM.h Просмотреть файл

@@ -36,6 +36,8 @@
36 36
 #ifndef ULTRALCD_IMPL_DOGM_H
37 37
 #define ULTRALCD_IMPL_DOGM_H
38 38
 
39
+#include "MarlinConfig.h"
40
+
39 41
 /**
40 42
  * Implementation of the LCD display routines for a DOGM128 graphic display.
41 43
  * These are common LCD 128x64 pixel graphic displays.
@@ -51,20 +53,21 @@
51 53
   #define LCD_CLICKED (buttons&EN_C)
52 54
 #endif
53 55
 
54
-#include <U8glib.h>
55 56
 #include "dogm_bitmaps.h"
56
-
57 57
 #include "ultralcd.h"
58 58
 #include "ultralcd_st7920_u8glib_rrd.h"
59
-#include "Configuration.h"
60
-
61 59
 #include "duration_t.h"
62 60
 
61
+#include <U8glib.h>
62
+
63
+#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
64
+  #include "_Bootscreen.h"
65
+#endif
66
+
63 67
 #if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT)
64 68
   #undef USE_BIG_EDIT_FONT
65 69
 #endif
66 70
 
67
-
68 71
 #if ENABLED(USE_SMALL_INFOFONT)
69 72
   #include "dogm_font_data_6x9_marlin.h"
70 73
   #define FONT_STATUSMENU_NAME u8g_font_6x9
@@ -146,7 +149,7 @@
146 149
 #elif ENABLED(U8GLIB_ST7920)
147 150
   //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
148 151
   U8GLIB_ST7920_128X64_RRD u8g(0);
149
-#elif defined(CARTESIO_UI)
152
+#elif ENABLED(CARTESIO_UI)
150 153
   // The CartesioUI display
151 154
   #if DOGLCD_MOSI != -1 && DOGLCD_SCK != -1
152 155
     // using SW-SPI

Загрузка…
Отмена
Сохранить