Browse Source

Remove invariant code from Configurations

- Add `Conditionals.h` with calculated configuration values
- Add `SanityCheck.h` with checks for configuration errors
- Remove equivalent code from all configurations
- Move error checks from some sources to `SanityCheck.h` also
- Fix initialization of count_direction in stepper.cpp
Scott Lahteine 9 years ago
parent
commit
670006b919
30 changed files with 937 additions and 4880 deletions
  1. 392
    0
      Marlin/Conditionals.h
  2. 11
    144
      Marlin/Configuration.h
  3. 3
    200
      Marlin/Configuration_adv.h
  4. 27
    75
      Marlin/Marlin_main.cpp
  5. 261
    0
      Marlin/SanityCheck.h
  6. 20
    159
      Marlin/configurator/config/Configuration.h
  7. 3
    204
      Marlin/configurator/config/Configuration_adv.h
  8. 19
    171
      Marlin/example_configurations/Felix/Configuration.h
  9. 15
    170
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  10. 0
    541
      Marlin/example_configurations/Felix/Configuration_adv.h
  11. 20
    153
      Marlin/example_configurations/Hephestos/Configuration.h
  12. 0
    541
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  13. 20
    153
      Marlin/example_configurations/K8200/Configuration.h
  14. 4
    199
      Marlin/example_configurations/K8200/Configuration_adv.h
  15. 20
    153
      Marlin/example_configurations/SCARA/Configuration.h
  16. 4
    190
      Marlin/example_configurations/SCARA/Configuration_adv.h
  17. 20
    153
      Marlin/example_configurations/WITBOX/Configuration.h
  18. 3
    194
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  19. 20
    153
      Marlin/example_configurations/delta/generic/Configuration.h
  20. 2
    205
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  21. 20
    153
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  22. 2
    205
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  23. 20
    153
      Marlin/example_configurations/makibox/Configuration.h
  24. 3
    183
      Marlin/example_configurations/makibox/Configuration_adv.h
  25. 20
    153
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  26. 4
    180
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  27. 0
    2
      Marlin/language.h
  28. 1
    1
      Marlin/stepper.cpp
  29. 3
    88
      Marlin/temperature.cpp
  30. 0
    4
      Marlin/ultralcd.cpp

+ 392
- 0
Marlin/Conditionals.h View File

@@ -0,0 +1,392 @@
1
+/**
2
+ * Conditionals.h
3
+ * Defines that depend on configuration but are not editable.
4
+ */
5
+#ifndef CONDITIONALS_H
6
+  #define CONDITIONALS_H
7
+
8
+  #include "pins.h"
9
+
10
+  /**
11
+   * ENDSTOPPULLUPS
12
+   */
13
+  #ifdef ENDSTOPPULLUPS
14
+    #ifndef DISABLE_MAX_ENDSTOPS
15
+      #define ENDSTOPPULLUP_XMAX
16
+      #define ENDSTOPPULLUP_YMAX
17
+      #define ENDSTOPPULLUP_ZMAX
18
+    #endif
19
+    #ifndef DISABLE_MIN_ENDSTOPS
20
+      #define ENDSTOPPULLUP_XMIN
21
+      #define ENDSTOPPULLUP_YMIN
22
+      #define ENDSTOPPULLUP_ZMIN
23
+    #endif
24
+  #endif
25
+
26
+  /**
27
+   * Axis lengths
28
+   */
29
+  #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
30
+  #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
31
+  #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
32
+
33
+  /**
34
+   * SCARA
35
+   */
36
+  #ifdef SCARA
37
+    #undef SLOWDOWN
38
+    #define QUICK_HOME //SCARA needs Quickhome
39
+  #endif
40
+
41
+
42
+  /**
43
+   * LCD Controllers
44
+   */
45
+
46
+  #if defined (MAKRPANEL)
47
+   #define DOGLCD
48
+   #define SDSUPPORT
49
+   #define ULTIPANEL
50
+   #define NEWPANEL
51
+   #define DEFAULT_LCD_CONTRAST 17
52
+  #endif
53
+
54
+  #if defined(miniVIKI) || defined(VIKI2)
55
+    #define ULTRA_LCD  //general LCD support, also 16x2
56
+    #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
57
+    #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
58
+
59
+    #ifdef miniVIKI
60
+      #define DEFAULT_LCD_CONTRAST 95
61
+    #else
62
+      #define DEFAULT_LCD_CONTRAST 40
63
+    #endif
64
+
65
+    #define ENCODER_PULSES_PER_STEP 4
66
+    #define ENCODER_STEPS_PER_MENU_ITEM 1
67
+  #endif
68
+
69
+  #ifdef PANEL_ONE
70
+    #define SDSUPPORT
71
+    #define ULTIMAKERCONTROLLER
72
+  #endif
73
+
74
+  #ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
75
+    #define DOGLCD
76
+    #define U8GLIB_ST7920
77
+    #define REPRAP_DISCOUNT_SMART_CONTROLLER
78
+  #endif
79
+
80
+  #if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
81
+   #define ULTIPANEL
82
+   #define NEWPANEL
83
+  #endif
84
+
85
+  #ifdef REPRAPWORLD_KEYPAD
86
+    #define NEWPANEL
87
+    #define ULTIPANEL
88
+  #endif
89
+
90
+  #ifdef RA_CONTROL_PANEL
91
+   #define ULTIPANEL
92
+   #define NEWPANEL
93
+   #define LCD_I2C_TYPE_PCA8574
94
+   #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
95
+  #endif
96
+
97
+  /**
98
+   * I2C PANELS
99
+   */
100
+
101
+  #ifdef LCD_I2C_SAINSMART_YWROBOT
102
+    // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
103
+    // Make sure it is placed in the Arduino libraries directory.
104
+    #define LCD_I2C_TYPE_PCF8575
105
+    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
106
+    #define NEWPANEL
107
+    #define ULTIPANEL
108
+  #endif
109
+
110
+  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
111
+  #ifdef LCD_I2C_PANELOLU2
112
+    // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
113
+    // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
114
+    // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
115
+    // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
116
+    //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
117
+    #define LCD_I2C_TYPE_MCP23017
118
+    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
119
+    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
120
+    #define NEWPANEL
121
+    #define ULTIPANEL
122
+
123
+    #ifndef ENCODER_PULSES_PER_STEP
124
+    #define ENCODER_PULSES_PER_STEP 4
125
+    #endif
126
+
127
+    #ifndef ENCODER_STEPS_PER_MENU_ITEM
128
+    #define ENCODER_STEPS_PER_MENU_ITEM 1
129
+    #endif
130
+
131
+
132
+    #ifdef LCD_USE_I2C_BUZZER
133
+    #define LCD_FEEDBACK_FREQUENCY_HZ 1000
134
+    #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
135
+    #endif
136
+
137
+  #endif
138
+
139
+  // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
140
+  #ifdef LCD_I2C_VIKI
141
+    // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
142
+    // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
143
+    // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
144
+    //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
145
+    #define LCD_I2C_TYPE_MCP23017
146
+    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
147
+    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
148
+    #define NEWPANEL
149
+    #define ULTIPANEL
150
+  #endif
151
+
152
+  // Shift register panels
153
+  // ---------------------
154
+  // 2 wire Non-latching LCD SR from:
155
+  // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
156
+
157
+  #ifdef SAV_3DLCD
158
+     #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
159
+     #define NEWPANEL
160
+     #define ULTIPANEL
161
+  #endif
162
+
163
+
164
+  #ifdef ULTIPANEL
165
+    #define NEWPANEL  //enable this if you have a click-encoder panel
166
+    #define SDSUPPORT
167
+    #define ULTRA_LCD
168
+    #ifdef DOGLCD // Change number of lines to match the DOG graphic display
169
+      #define LCD_WIDTH 22
170
+      #define LCD_HEIGHT 5
171
+    #else
172
+      #define LCD_WIDTH 20
173
+      #define LCD_HEIGHT 4
174
+    #endif
175
+  #else //no panel but just LCD
176
+    #ifdef ULTRA_LCD
177
+    #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
178
+      #define LCD_WIDTH 22
179
+      #define LCD_HEIGHT 5
180
+    #else
181
+      #define LCD_WIDTH 16
182
+      #define LCD_HEIGHT 2
183
+    #endif
184
+    #endif
185
+  #endif
186
+
187
+  /**
188
+   * Default LCD contrast for dogm-like LCD displays
189
+   */
190
+  #if defined(DOGLCD) && !defined(DEFAULT_LCD_CONTRAST)
191
+    #define DEFAULT_LCD_CONTRAST 32
192
+  #endif
193
+
194
+  /**
195
+   * AUTOSET LOCATIONS OF LIMIT SWITCHES
196
+   * Added by ZetaPhoenix 09-15-2012
197
+   */
198
+  #ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
199
+    #define X_HOME_POS MANUAL_X_HOME_POS
200
+    #define Y_HOME_POS MANUAL_Y_HOME_POS
201
+    #define Z_HOME_POS MANUAL_Z_HOME_POS
202
+  #else //!MANUAL_HOME_POSITIONS – Use home switch positions based on homing direction and travel limits
203
+    #ifdef BED_CENTER_AT_0_0
204
+      #define X_HOME_POS X_MAX_LENGTH * X_HOME_DIR * 0.5
205
+      #define Y_HOME_POS Y_MAX_LENGTH * Y_HOME_DIR * 0.5
206
+    #else
207
+      #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
208
+      #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
209
+    #endif
210
+    #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS)
211
+  #endif //!MANUAL_HOME_POSITIONS
212
+
213
+  /**
214
+   * Auto Bed Leveling
215
+   */
216
+  #ifdef ENABLE_AUTO_BED_LEVELING
217
+    // Boundaries for probing based on set limits
218
+    #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
219
+    #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
220
+    #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
221
+    #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
222
+  #endif
223
+
224
+  /**
225
+   * MAX_STEP_FREQUENCY differs for TOSHIBA
226
+   */
227
+  #ifdef CONFIG_STEPPERS_TOSHIBA
228
+    #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
229
+  #else
230
+    #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
231
+  #endif
232
+
233
+  // MS1 MS2 Stepper Driver Microstepping mode table
234
+  #define MICROSTEP1 LOW,LOW
235
+  #define MICROSTEP2 HIGH,LOW
236
+  #define MICROSTEP4 LOW,HIGH
237
+  #define MICROSTEP8 HIGH,HIGH
238
+  #define MICROSTEP16 HIGH,HIGH
239
+
240
+  /**
241
+   * Advance calculated values
242
+   */
243
+  #ifdef ADVANCE
244
+    #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
245
+    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS] / EXTRUSION_AREA)
246
+  #endif
247
+
248
+  #ifdef ULTIPANEL
249
+   #undef SDCARDDETECTINVERTED
250
+  #endif
251
+
252
+  // Power Signal Control Definitions
253
+  // By default use ATX definition
254
+  #ifndef POWER_SUPPLY
255
+    #define POWER_SUPPLY 1
256
+  #endif
257
+  // 1 = ATX
258
+  #if (POWER_SUPPLY == 1)
259
+    #define PS_ON_AWAKE  LOW
260
+    #define PS_ON_ASLEEP HIGH
261
+  #endif
262
+  // 2 = X-Box 360 203W
263
+  #if (POWER_SUPPLY == 2)
264
+    #define PS_ON_AWAKE  HIGH
265
+    #define PS_ON_ASLEEP LOW
266
+  #endif
267
+
268
+  /**
269
+   * Temp Sensor defines
270
+   */
271
+  #if TEMP_SENSOR_0 == -2
272
+    #define HEATER_0_USES_MAX6675
273
+  #elif TEMP_SENSOR_0 == -1
274
+    #define HEATER_0_USES_AD595
275
+  #elif TEMP_SENSOR_0 == 0
276
+    #undef HEATER_0_MINTEMP
277
+    #undef HEATER_0_MAXTEMP
278
+  #elif TEMP_SENSOR_0 > 0
279
+    #define THERMISTORHEATER_0 TEMP_SENSOR_0
280
+    #define HEATER_0_USES_THERMISTOR
281
+  #endif
282
+
283
+  #if TEMP_SENSOR_1 == -1
284
+    #define HEATER_1_USES_AD595
285
+  #elif TEMP_SENSOR_1 == 0
286
+    #undef HEATER_1_MINTEMP
287
+    #undef HEATER_1_MAXTEMP
288
+  #elif TEMP_SENSOR_1 > 0
289
+    #define THERMISTORHEATER_1 TEMP_SENSOR_1
290
+    #define HEATER_1_USES_THERMISTOR
291
+  #endif
292
+
293
+  #if TEMP_SENSOR_2 == -1
294
+    #define HEATER_2_USES_AD595
295
+  #elif TEMP_SENSOR_2 == 0
296
+    #undef HEATER_2_MINTEMP
297
+    #undef HEATER_2_MAXTEMP
298
+  #elif TEMP_SENSOR_2 > 0
299
+    #define THERMISTORHEATER_2 TEMP_SENSOR_2
300
+    #define HEATER_2_USES_THERMISTOR
301
+  #endif
302
+
303
+  #if TEMP_SENSOR_3 == -1
304
+    #define HEATER_3_USES_AD595
305
+  #elif TEMP_SENSOR_3 == 0
306
+    #undef HEATER_3_MINTEMP
307
+    #undef HEATER_3_MAXTEMP
308
+  #elif TEMP_SENSOR_3 > 0
309
+    #define THERMISTORHEATER_3 TEMP_SENSOR_3
310
+    #define HEATER_3_USES_THERMISTOR
311
+  #endif
312
+
313
+  #if TEMP_SENSOR_BED == -1
314
+    #define BED_USES_AD595
315
+  #elif TEMP_SENSOR_BED == 0
316
+    #undef BED_MINTEMP
317
+    #undef BED_MAXTEMP
318
+  #elif TEMP_SENSOR_BED > 0
319
+    #define THERMISTORBED TEMP_SENSOR_BED
320
+    #define BED_USES_THERMISTOR
321
+  #endif
322
+
323
+  /**
324
+   * ARRAY_BY_EXTRUDERS based on EXTRUDERS
325
+   */
326
+  #if EXTRUDERS > 3
327
+    #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1, v2, v3, v4 }
328
+  #elif EXTRUDERS > 2
329
+    #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1, v2, v3 }
330
+  #elif EXTRUDERS > 1
331
+    #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1, v2 }
332
+  #else
333
+    #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1 }
334
+  #endif
335
+
336
+  /**
337
+   * Shorthand for pin tests, for temperature.cpp
338
+   */
339
+  #define HAS_TEMP_0 (defined(TEMP_0_PIN) && TEMP_0_PIN >= 0)
340
+  #define HAS_TEMP_1 (defined(TEMP_1_PIN) && TEMP_1_PIN >= 0)
341
+  #define HAS_TEMP_2 (defined(TEMP_2_PIN) && TEMP_2_PIN >= 0)
342
+  #define HAS_TEMP_3 (defined(TEMP_3_PIN) && TEMP_3_PIN >= 0)
343
+  #define HAS_TEMP_BED (defined(TEMP_BED_PIN) && TEMP_BED_PIN >= 0)
344
+  #define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0)
345
+  #define HAS_HEATER_0 (defined(HEATER_0_PIN) && HEATER_0_PIN >= 0)
346
+  #define HAS_HEATER_1 (defined(HEATER_1_PIN) && HEATER_1_PIN >= 0)
347
+  #define HAS_HEATER_2 (defined(HEATER_2_PIN) && HEATER_2_PIN >= 0)
348
+  #define HAS_HEATER_3 (defined(HEATER_3_PIN) && HEATER_3_PIN >= 0)
349
+  #define HAS_HEATER_BED (defined(HEATER_BED_PIN) && HEATER_BED_PIN >= 0)
350
+  #define HAS_AUTO_FAN_0 (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN >= 0)
351
+  #define HAS_AUTO_FAN_1 (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN >= 0)
352
+  #define HAS_AUTO_FAN_2 (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN >= 0)
353
+  #define HAS_AUTO_FAN_3 (defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN >= 0)
354
+  #define HAS_AUTO_FAN HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3
355
+  #define HAS_FAN (defined(FAN_PIN) && FAN_PIN >= 0)
356
+
357
+  /**
358
+   * Helper Macros for heaters and extruder fan
359
+   */
360
+  #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
361
+  #if EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
362
+    #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v)
363
+    #if EXTRUDERS > 2
364
+      #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
365
+      #if EXTRUDERS > 3
366
+        #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
367
+      #endif
368
+    #endif
369
+  #endif
370
+  #ifdef HEATERS_PARALLEL
371
+    #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
372
+  #else
373
+    #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
374
+  #endif
375
+  #if HAS_HEATER_BED
376
+    #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
377
+  #endif
378
+  #if HAS_FAN
379
+    #define WRITE_FAN(v) WRITE(FAN_PIN, v)
380
+  #endif
381
+
382
+  /**
383
+   * Sampling period of the temperature routine
384
+   * This override comes originally from temperature.cpp
385
+   * The Configuration.h option is basically ignored.
386
+   */
387
+  #ifdef PID_dT
388
+    #undef PID_dT
389
+  #endif
390
+  #define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
391
+
392
+#endif //CONDITIONALS_H

+ 11
- 144
Marlin/Configuration.h View File

@@ -358,10 +358,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
358 358
 #define Y_MAX_POS 200
359 359
 #define Z_MAX_POS 200
360 360
 
361
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
362
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
363
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
364
-
365 361
 //===========================================================================
366 362
 //============================= Filament Runout Sensor ======================
367 363
 //===========================================================================
@@ -611,112 +607,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
611 607
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
612 608
 //#define RA_CONTROL_PANEL
613 609
 
614
-//automatic expansion
615
-#if defined (MAKRPANEL)
616
- #define DOGLCD
617
- #define SDSUPPORT
618
- #define ULTIPANEL
619
- #define NEWPANEL
620
- #define DEFAULT_LCD_CONTRAST 17
621
-#endif
622
-
623
-#if defined(miniVIKI) || defined(VIKI2)
624
- #define ULTRA_LCD  //general LCD support, also 16x2
625
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
626
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
627
- 
628
-  #ifdef miniVIKI
629
-   #define DEFAULT_LCD_CONTRAST 95
630
-  #else
631
-   #define DEFAULT_LCD_CONTRAST 40
632
-  #endif
633
-  
634
- #define ENCODER_PULSES_PER_STEP 4
635
- #define ENCODER_STEPS_PER_MENU_ITEM 1
636
-#endif
637
-
638
-#if defined (PANEL_ONE)
639
- #define SDSUPPORT
640
- #define ULTIMAKERCONTROLLER
641
-#endif
642
-
643
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
644
- #define DOGLCD
645
- #define U8GLIB_ST7920
646
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
647
-#endif
648
-
649
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
650
- #define ULTIPANEL
651
- #define NEWPANEL
652
-#endif
653
-
654
-#if defined(REPRAPWORLD_KEYPAD)
655
-  #define NEWPANEL
656
-  #define ULTIPANEL
657
-#endif
658
-#if defined(RA_CONTROL_PANEL)
659
- #define ULTIPANEL
660
- #define NEWPANEL
661
- #define LCD_I2C_TYPE_PCA8574
662
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
663
-#endif
664
-
665
-//I2C PANELS
610
+/**
611
+ * I2C Panels
612
+ */
666 613
 
667 614
 //#define LCD_I2C_SAINSMART_YWROBOT
668
-#ifdef LCD_I2C_SAINSMART_YWROBOT
669
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
670
-  // Make sure it is placed in the Arduino libraries directory.
671
-  #define LCD_I2C_TYPE_PCF8575
672
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
673
-  #define NEWPANEL
674
-  #define ULTIPANEL
675
-#endif
676 615
 
677 616
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
678 617
 //#define LCD_I2C_PANELOLU2
679
-#ifdef LCD_I2C_PANELOLU2
680
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
681
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
682
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
683
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
684
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
685
-  #define LCD_I2C_TYPE_MCP23017
686
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
687
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
688
-  #define NEWPANEL
689
-  #define ULTIPANEL
690
-
691
-  #ifndef ENCODER_PULSES_PER_STEP
692
-	#define ENCODER_PULSES_PER_STEP 4
693
-  #endif
694
-
695
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
696
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
697
-  #endif
698
-
699
-
700
-  #ifdef LCD_USE_I2C_BUZZER
701
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
702
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
703
-  #endif
704
-
705
-#endif
706 618
 
707 619
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
708 620
 //#define LCD_I2C_VIKI
709
-#ifdef LCD_I2C_VIKI
710
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
711
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
712
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
713
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
714
-  #define LCD_I2C_TYPE_MCP23017
715
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
716
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
717
-  #define NEWPANEL
718
-  #define ULTIPANEL
719
-#endif
720 621
 
721 622
 // Shift register panels
722 623
 // ---------------------
@@ -724,51 +625,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
724 625
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
725 626
 
726 627
 //#define SAV_3DLCD
727
-#ifdef SAV_3DLCD
728
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
729
-   #define NEWPANEL
730
-   #define ULTIPANEL
731
-#endif
732
-
733
-
734
-#ifdef ULTIPANEL
735
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
736
-  #define SDSUPPORT
737
-  #define ULTRA_LCD
738
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
739
-    #define LCD_WIDTH 22
740
-    #define LCD_HEIGHT 5
741
-  #else
742
-    #define LCD_WIDTH 20
743
-    #define LCD_HEIGHT 4
744
-  #endif
745
-#else //no panel but just LCD
746
-  #ifdef ULTRA_LCD
747
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
748
-    #define LCD_WIDTH 22
749
-    #define LCD_HEIGHT 5
750
-  #else
751
-    #define LCD_WIDTH 16
752
-    #define LCD_HEIGHT 2
753
-  #endif
754
-  #endif
755
-#endif
756
-
757
-// default LCD contrast for dogm-like LCD displays
758
-#ifdef DOGLCD
759
-# ifndef DEFAULT_LCD_CONTRAST
760
-#  define DEFAULT_LCD_CONTRAST 32
761
-# endif
762
-#endif
763 628
 
764 629
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
765 630
 //#define FAST_PWM_FAN
766 631
 
767
-// Temperature status LEDs that display the hotend and bet temperature.
768
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
769
-// Otherwise the RED led is on. There is 1C hysteresis.
770
-//#define TEMP_STAT_LEDS
771
-
772 632
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
773 633
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
774 634
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -780,6 +640,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
780 640
 // at zero value, there are 128 effective control positions.
781 641
 #define SOFT_PWM_SCALE 0
782 642
 
643
+// Temperature status LEDs that display the hotend and bet temperature.
644
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
645
+// Otherwise the RED led is on. There is 1C hysteresis.
646
+//#define TEMP_STAT_LEDS
647
+
783 648
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
784 649
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
785 650
 // #define PHOTOGRAPH_PIN     23
@@ -849,6 +714,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
849 714
 
850 715
 
851 716
 #include "Configuration_adv.h"
717
+#include "Conditionals.h"
718
+#include "SanityCheck.h"
852 719
 #include "thermistortables.h"
853 720
 
854
-#endif //__CONFIGURATION_H
721
+#endif //CONFIGURATION_H

+ 3
- 200
Marlin/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers.
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -218,11 +156,7 @@
218 156
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
219 157
 
220 158
 #define AXIS_RELATIVE_MODES {false, false, false, false}
221
-#ifdef CONFIG_STEPPERS_TOSHIBA
222
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
223
-#else
224
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
225
-#endif
159
+
226 160
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
227 161
 #define INVERT_X_STEP_PIN false
228 162
 #define INVERT_Y_STEP_PIN false
@@ -237,7 +171,7 @@
237 171
 
238 172
 // Feedrates for manual moves along X, Y, Z, E from panel
239 173
 #ifdef ULTIPANEL
240
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
174
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
241 175
 #endif
242 176
 
243 177
 //Comment to disable setting feedrate multiplier via encoder
@@ -261,13 +195,6 @@
261 195
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
262 196
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263 197
 
264
-// MS1 MS2 Stepper Driver Microstepping mode table
265
-#define MICROSTEP1 LOW,LOW
266
-#define MICROSTEP2 HIGH,LOW
267
-#define MICROSTEP4 LOW,HIGH
268
-#define MICROSTEP8 HIGH,HIGH
269
-#define MICROSTEP16 HIGH,HIGH
270
-
271 198
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272 199
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273 200
 
@@ -313,12 +240,6 @@
313 240
   #define PROGRESS_MSG_EXPIRE   0
314 241
   // Enable this to show messages for MSG_TIME then hide them
315 242
   //#define PROGRESS_MSG_ONCE
316
-  #ifdef DOGLCD
317
-    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
318
-  #endif
319
-  #ifdef FILAMENT_LCD_DISPLAY
320
-    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
321
-  #endif
322 243
 #endif
323 244
 
324 245
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
@@ -342,16 +263,6 @@
342 263
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
343 264
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
344 265
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
345
-
346
-  #ifdef COREXY
347
-    #error BABYSTEPPING not implemented for COREXY yet.
348
-  #endif
349
-
350
-  #ifdef DELTA
351
-    #ifdef BABYSTEP_XY
352
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
353
-    #endif
354
-  #endif
355 266
 #endif
356 267
 
357 268
 // extruder advance constant (s2/mm3)
@@ -365,12 +276,8 @@
365 276
 
366 277
 #ifdef ADVANCE
367 278
   #define EXTRUDER_ADVANCE_K .0
368
-
369 279
   #define D_FILAMENT 2.85
370 280
   #define STEPS_MM_E 836
371
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
372
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
373
-
374 281
 #endif // ADVANCE
375 282
 
376 283
 // Arc interpretation settings:
@@ -385,26 +292,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
385 292
 // be commented out otherwise
386 293
 #define SDCARDDETECTINVERTED
387 294
 
388
-#ifdef ULTIPANEL
389
- #undef SDCARDDETECTINVERTED
390
-#endif
391
-
392
-// Power Signal Control Definitions
393
-// By default use ATX definition
394
-#ifndef POWER_SUPPLY
395
-  #define POWER_SUPPLY 1
396
-#endif
397
-// 1 = ATX
398
-#if (POWER_SUPPLY == 1)
399
-  #define PS_ON_AWAKE  LOW
400
-  #define PS_ON_ASLEEP HIGH
401
-#endif
402
-// 2 = X-Box 360 203W
403
-#if (POWER_SUPPLY == 2)
404
-  #define PS_ON_AWAKE  HIGH
405
-  #define PS_ON_ASLEEP LOW
406
-#endif
407
-
408 295
 // Control heater 0 and heater 1 in parallel.
409 296
 //#define HEATERS_PARALLEL
410 297
 
@@ -456,13 +343,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
456 343
   #endif
457 344
 #endif
458 345
 
459
-#ifdef FILAMENTCHANGEENABLE
460
-  #ifdef EXTRUDER_RUNOUT_PREVENT
461
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
-  #endif
463
-#endif
464
-
465
-
466 346
 /******************************************************************************\
467 347
  * enable this section if you have TMC26X motor drivers. 
468 348
  * you need to import the TMC26XStepper library into the arduino IDE for this
@@ -596,81 +476,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
596 476
 	
597 477
 #endif
598 478
 
599
-
600
-//===========================================================================
601
-//=============================  Define Defines  ============================
602
-//===========================================================================
603
-
604
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
605
-  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
606
-#endif
607
-
608
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
609
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
610
-#endif
611
-
612
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
613
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
614
-#endif
615
-
616
-#if TEMP_SENSOR_0 > 0
617
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
618
-  #define HEATER_0_USES_THERMISTOR
619
-#endif
620
-#if TEMP_SENSOR_1 > 0
621
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
622
-  #define HEATER_1_USES_THERMISTOR
623
-#endif
624
-#if TEMP_SENSOR_2 > 0
625
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
626
-  #define HEATER_2_USES_THERMISTOR
627
-#endif
628
-#if TEMP_SENSOR_3 > 0
629
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
630
-  #define HEATER_3_USES_THERMISTOR
631
-#endif
632
-#if TEMP_SENSOR_BED > 0
633
-  #define THERMISTORBED TEMP_SENSOR_BED
634
-  #define BED_USES_THERMISTOR
635
-#endif
636
-#if TEMP_SENSOR_0 == -1
637
-  #define HEATER_0_USES_AD595
638
-#endif
639
-#if TEMP_SENSOR_1 == -1
640
-  #define HEATER_1_USES_AD595
641
-#endif
642
-#if TEMP_SENSOR_2 == -1
643
-  #define HEATER_2_USES_AD595
644
-#endif
645
-#if TEMP_SENSOR_3 == -1
646
-  #define HEATER_3_USES_AD595
647
-#endif
648
-#if TEMP_SENSOR_BED == -1
649
-  #define BED_USES_AD595
650
-#endif
651
-#if TEMP_SENSOR_0 == -2
652
-  #define HEATER_0_USES_MAX6675
653
-#endif
654
-#if TEMP_SENSOR_0 == 0
655
-  #undef HEATER_0_MINTEMP
656
-  #undef HEATER_0_MAXTEMP
657
-#endif
658
-#if TEMP_SENSOR_1 == 0
659
-  #undef HEATER_1_MINTEMP
660
-  #undef HEATER_1_MAXTEMP
661
-#endif
662
-#if TEMP_SENSOR_2 == 0
663
-  #undef HEATER_2_MINTEMP
664
-  #undef HEATER_2_MAXTEMP
665
-#endif
666
-#if TEMP_SENSOR_3 == 0
667
-  #undef HEATER_3_MINTEMP
668
-  #undef HEATER_3_MAXTEMP
669
-#endif
670
-#if TEMP_SENSOR_BED == 0
671
-  #undef BED_MINTEMP
672
-  #undef BED_MAXTEMP
673
-#endif
674
-
675
-
676
-#endif //__CONFIGURATION_ADV_H
479
+#endif //CONFIGURATION_ADV_H

+ 27
- 75
Marlin/Marlin_main.cpp View File

@@ -30,9 +30,6 @@
30 30
 #include "Marlin.h"
31 31
 
32 32
 #ifdef ENABLE_AUTO_BED_LEVELING
33
-  #if Z_MIN_PIN == -1
34
-    #error "You must have a Z_MIN endstop to enable Auto Bed Leveling feature. Z_MIN_PIN must point to a valid hardware pin."
35
-  #endif
36 33
   #include "vector_3.h"
37 34
   #ifdef AUTO_BED_LEVELING_GRID
38 35
     #include "qr_solve.h"
@@ -963,43 +960,36 @@ XYZ_CONSTS_FROM_CONFIG(float, home_retract_mm, HOME_RETRACT_MM);
963 960
 XYZ_CONSTS_FROM_CONFIG(signed char, home_dir,  HOME_DIR);
964 961
 
965 962
 #ifdef DUAL_X_CARRIAGE
966
-  #if EXTRUDERS == 1 || defined(COREXY) \
967
-      || !defined(X2_ENABLE_PIN) || !defined(X2_STEP_PIN) || !defined(X2_DIR_PIN) \
968
-      || !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
969
-      || !defined(X_MAX_PIN) || X_MAX_PIN < 0
970
-    #error "Missing or invalid definitions for DUAL_X_CARRIAGE mode."
971
-  #endif
972
-  #if X_HOME_DIR != -1 || X2_HOME_DIR != 1
973
-    #error "Please use canonical x-carriage assignment" // the x-carriages are defined by their homing directions
974
-  #endif
975 963
 
976
-#define DXC_FULL_CONTROL_MODE 0
977
-#define DXC_AUTO_PARK_MODE    1
978
-#define DXC_DUPLICATION_MODE  2
979
-static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
980
-
981
-static float x_home_pos(int extruder) {
982
-  if (extruder == 0)
983
-    return base_home_pos(X_AXIS) + add_homing[X_AXIS];
984
-  else
985
-    // In dual carriage mode the extruder offset provides an override of the
986
-    // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
987
-    // This allow soft recalibration of the second extruder offset position without firmware reflash
988
-    // (through the M218 command).
989
-    return (extruder_offset[X_AXIS][1] > 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS;
990
-}
964
+  #define DXC_FULL_CONTROL_MODE 0
965
+  #define DXC_AUTO_PARK_MODE    1
966
+  #define DXC_DUPLICATION_MODE  2
991 967
 
992
-static int x_home_dir(int extruder) {
993
-  return (extruder == 0) ? X_HOME_DIR : X2_HOME_DIR;
994
-}
968
+  static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
969
+
970
+  static float x_home_pos(int extruder) {
971
+    if (extruder == 0)
972
+      return base_home_pos(X_AXIS) + add_homing[X_AXIS];
973
+    else
974
+      // In dual carriage mode the extruder offset provides an override of the
975
+      // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
976
+      // This allow soft recalibration of the second extruder offset position without firmware reflash
977
+      // (through the M218 command).
978
+      return (extruder_offset[X_AXIS][1] > 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS;
979
+  }
980
+
981
+  static int x_home_dir(int extruder) {
982
+    return (extruder == 0) ? X_HOME_DIR : X2_HOME_DIR;
983
+  }
984
+
985
+  static float inactive_extruder_x_pos = X2_MAX_POS; // used in mode 0 & 1
986
+  static bool active_extruder_parked = false; // used in mode 1 & 2
987
+  static float raised_parked_position[NUM_AXIS]; // used in mode 1
988
+  static unsigned long delayed_move_time = 0; // used in mode 1
989
+  static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
990
+  static float duplicate_extruder_temp_offset = 0; // used in mode 2
991
+  bool extruder_duplication_enabled = false; // used in mode 2
995 992
 
996
-static float inactive_extruder_x_pos = X2_MAX_POS; // used in mode 0 & 1
997
-static bool active_extruder_parked = false; // used in mode 1 & 2
998
-static float raised_parked_position[NUM_AXIS]; // used in mode 1
999
-static unsigned long delayed_move_time = 0; // used in mode 1
1000
-static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
1001
-static float duplicate_extruder_temp_offset = 0; // used in mode 2
1002
-bool extruder_duplication_enabled = false; // used in mode 2
1003 993
 #endif //DUAL_X_CARRIAGE
1004 994
 
1005 995
 static void axis_is_at_home(int axis) {
@@ -1959,44 +1949,6 @@ inline void gcode_G28() {
1959 1949
 
1960 1950
 #ifdef ENABLE_AUTO_BED_LEVELING
1961 1951
 
1962
-  // Define the possible boundaries for probing based on set limits
1963
-  #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1964
-  #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1965
-  #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1966
-  #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1967
-
1968
-  #ifdef AUTO_BED_LEVELING_GRID
1969
-
1970
-    // Make sure probing points are reachable
1971
-
1972
-    #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
1973
-      #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
1974
-    #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
1975
-      #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
1976
-    #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
1977
-      #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
1978
-    #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
1979
-      #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
1980
-    #endif
1981
-
1982
-  #else // !AUTO_BED_LEVELING_GRID
1983
-
1984
-    #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
1985
-      #error "The given ABL_PROBE_PT_1_X can't be reached by the probe."
1986
-    #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
1987
-      #error "The given ABL_PROBE_PT_2_X can't be reached by the probe."
1988
-    #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
1989
-      #error "The given ABL_PROBE_PT_3_X can't be reached by the probe."
1990
-    #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
1991
-      #error "The given ABL_PROBE_PT_1_Y can't be reached by the probe."
1992
-    #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
1993
-      #error "The given ABL_PROBE_PT_2_Y can't be reached by the probe."
1994
-    #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
1995
-      #error "The given ABL_PROBE_PT_3_Y can't be reached by the probe."
1996
-    #endif
1997
-
1998
-  #endif // !AUTO_BED_LEVELING_GRID
1999
-
2000 1952
   /**
2001 1953
    * G29: Detailed Z-Probe, probes the bed at 3 or more points.
2002 1954
    *      Will fail if the printer has not been homed with G28.

+ 261
- 0
Marlin/SanityCheck.h View File

@@ -0,0 +1,261 @@
1
+/**
2
+ * SanityCheck.h
3
+ *
4
+ * Test configuration values for errors at compile-time.
5
+ */
6
+#ifndef SANITYCHECK_H
7
+  #define SANITYCHECK_H
8
+
9
+  /**
10
+   * Dual Stepper Drivers
11
+   */
12
+  #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Y_DUAL_STEPPER_DRIVERS)
13
+    #error You cannot have dual stepper drivers for both Y and Z.
14
+  #endif
15
+
16
+  /**
17
+   * Progress Bar
18
+   */
19
+  #ifdef LCD_PROGRESS_BAR
20
+    #ifdef DOGLCD
21
+      #warning LCD_PROGRESS_BAR does not apply to graphical displays.
22
+    #endif
23
+    #ifdef FILAMENT_LCD_DISPLAY
24
+      #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
25
+    #endif
26
+  #endif
27
+
28
+  /**
29
+   * Babystepping
30
+   */
31
+  #ifdef BABYSTEPPING
32
+    #ifdef COREXY
33
+      #error BABYSTEPPING not implemented for COREXY yet.
34
+    #endif
35
+    #ifdef SCARA
36
+      #error BABYSTEPPING is not implemented for SCARA yet.
37
+    #endif
38
+    #if defined(DELTA) && defined(BABYSTEP_XY)
39
+      #error BABYSTEPPING only implemented for Z axis on deltabots.
40
+    #endif
41
+  #endif
42
+
43
+  /**
44
+   * Filament Change with Extruder Runout Prevention
45
+   */
46
+  #if defined(FILAMENTCHANGEENABLE) && defined(EXTRUDER_RUNOUT_PREVENT)
47
+    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE.
48
+  #endif
49
+
50
+  /**
51
+   * Auto Bed Leveling and Delta
52
+   */
53
+  #if defined(ENABLE_AUTO_BED_LEVELING) && defined(DELTA)
54
+    #error Bed Auto Leveling is still not compatible with Delta Kinematics.
55
+  #endif
56
+
57
+  /**
58
+   * Options only for EXTRUDERS == 1
59
+   */
60
+  #if EXTRUDERS > 1
61
+
62
+    #if EXTRUDERS > 4
63
+      #error The maximum number of EXTRUDERS is 4.
64
+    #endif
65
+
66
+    #ifdef TEMP_SENSOR_1_AS_REDUNDANT
67
+      #error EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT.
68
+    #endif
69
+
70
+    #ifdef HEATERS_PARALLEL
71
+      #error EXTRUDERS must be 1 with HEATERS_PARALLEL.
72
+    #endif
73
+
74
+    #ifdef Y_DUAL_STEPPER_DRIVERS
75
+      #error EXTRUDERS must be 1 with Y_DUAL_STEPPER_DRIVERS.
76
+    #endif
77
+
78
+    #ifdef Z_DUAL_STEPPER_DRIVERS
79
+      #error EXTRUDERS must be 1 with Z_DUAL_STEPPER_DRIVERS.
80
+    #endif
81
+
82
+  #endif // EXTRUDERS > 1
83
+
84
+  /**
85
+   * Required LCD language
86
+   */
87
+  #if !defined(DOGLCD) && defined(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780_JAPAN) && !defined(DISPLAY_CHARSET_HD44780_WESTERN)
88
+    #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller.
89
+  #endif
90
+
91
+  /**
92
+   * Auto Bed Leveling
93
+   */
94
+  #ifdef ENABLE_AUTO_BED_LEVELING
95
+
96
+    /**
97
+     * Require a Z Min pin
98
+     */
99
+    #if Z_MIN_PIN == -1
100
+      #ifdef Z_PROBE_REPEATABILITY_TEST
101
+        #error You must have a Z_MIN endstop to enable Z_PROBE_REPEATABILITY_TEST.
102
+      #else
103
+        #error ENABLE_AUTO_BED_LEVELING requires a Z_MIN endstop. Z_MIN_PIN must point to a valid hardware pin.
104
+      #endif
105
+    #endif
106
+
107
+    /**
108
+     * Check if Probe_Offset * Grid Points is greater than Probing Range
109
+     */
110
+    #ifdef AUTO_BED_LEVELING_GRID
111
+
112
+      // Make sure probing points are reachable
113
+      #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
114
+        #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
115
+      #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
116
+        #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
117
+      #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
118
+        #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
119
+      #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
120
+        #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
121
+      #endif
122
+
123
+      #define PROBE_SIZE_X (X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1))
124
+      #define PROBE_SIZE_Y (Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1))
125
+      #define PROBE_AREA_WIDTH (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION)
126
+      #define PROBE_AREA_DEPTH (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION)
127
+      #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
128
+        #if PROBE_SIZE_X <= -PROBE_AREA_WIDTH
129
+          #define X_PROBE_ERROR
130
+        #endif
131
+      #elif PROBE_SIZE_X >= PROBE_AREA_WIDTH
132
+        #define X_PROBE_ERROR
133
+      #endif
134
+      #ifdef X_PROBE_ERROR
135
+        #error The X axis probing range is too small to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS
136
+      #endif
137
+      #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
138
+        #if PROBE_SIZE_Y <= -PROBE_AREA_DEPTH
139
+          #define Y_PROBE_ERROR
140
+        #endif
141
+      #elif PROBE_SIZE_Y >= PROBE_AREA_DEPTH
142
+        #define Y_PROBE_ERROR
143
+      #endif
144
+      #ifdef Y_PROBE_ERROR
145
+        #error The Y axis probing range is to small to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS
146
+      #endif
147
+
148
+      #undef PROBE_SIZE_X
149
+      #undef PROBE_SIZE_Y
150
+      #undef PROBE_AREA_WIDTH
151
+      #undef PROBE_AREA_DEPTH
152
+
153
+    #else // !AUTO_BED_LEVELING_GRID
154
+
155
+      // Check the triangulation points
156
+      #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
157
+        #error "The given ABL_PROBE_PT_1_X can't be reached by the probe."
158
+      #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
159
+        #error "The given ABL_PROBE_PT_2_X can't be reached by the probe."
160
+      #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
161
+        #error "The given ABL_PROBE_PT_3_X can't be reached by the probe."
162
+      #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
163
+        #error "The given ABL_PROBE_PT_1_Y can't be reached by the probe."
164
+      #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
165
+        #error "The given ABL_PROBE_PT_2_Y can't be reached by the probe."
166
+      #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
167
+        #error "The given ABL_PROBE_PT_3_Y can't be reached by the probe."
168
+      #endif
169
+
170
+    #endif // !AUTO_BED_LEVELING_GRID
171
+
172
+  #endif // ENABLE_AUTO_BED_LEVELING
173
+
174
+  /**
175
+   * ULTIPANEL encoder
176
+   */
177
+  #if defined(ULTIPANEL) && !defined(NEWPANEL) && !defined(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
178
+    #error ULTIPANEL requires some kind of encoder.
179
+  #endif
180
+
181
+  /**
182
+   * Delta has limited bed leveling options
183
+   */
184
+  #if defined(DELTA)
185
+
186
+    #ifdef ENABLE_AUTO_BED_LEVELING
187
+
188
+      #ifndef AUTO_BED_LEVELING_GRID
189
+        #error Only AUTO_BED_LEVELING_GRID is supported with DELTA.
190
+      #endif
191
+
192
+      #ifdef Z_PROBE_SLED
193
+        #error You cannot use Z_PROBE_SLED with DELTA.
194
+      #endif
195
+
196
+      #ifdef Z_PROBE_REPEATABILITY_TEST
197
+        #error Z_PROBE_REPEATABILITY_TEST is not supported with DELTA yet.
198
+      #endif
199
+
200
+    #endif
201
+
202
+  #endif
203
+
204
+  /**
205
+   * Allen Key Z Probe requires Auto Bed Leveling grid and Delta
206
+   */
207
+  #if defined(Z_PROBE_ALLEN_KEY) && !(defined(AUTO_BED_LEVELING_GRID) && defined(DELTA))
208
+    #error Invalid use of Z_PROBE_ALLEN_KEY.
209
+  #endif
210
+
211
+  /**
212
+   * Dual X Carriage requirements
213
+   */
214
+  #ifdef DUAL_X_CARRIAGE
215
+    #if EXTRUDERS == 1 || defined(COREXY) \
216
+        || !defined(X2_ENABLE_PIN) || !defined(X2_STEP_PIN) || !defined(X2_DIR_PIN) \
217
+        || !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \
218
+        || !defined(X_MAX_PIN) || X_MAX_PIN < 0
219
+      #error Missing or invalid definitions for DUAL_X_CARRIAGE mode.
220
+    #endif
221
+    #if X_HOME_DIR != -1 || X2_HOME_DIR != 1
222
+      #error Please use canonical x-carriage assignment.
223
+    #endif
224
+  #endif // DUAL_X_CARRIAGE
225
+
226
+  /**
227
+   * Make sure auto fan pins don't conflict with the fan pin
228
+   */
229
+  #if HAS_AUTO_FAN && HAS_FAN
230
+    #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
231
+      #error You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN
232
+    #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
233
+      #error You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN
234
+    #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
235
+      #error You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN
236
+    #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
237
+      #error You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN
238
+    #endif
239
+  #endif
240
+
241
+  /**
242
+   * Test required HEATER defines
243
+   */
244
+  #if EXTRUDERS > 3
245
+    #if !HAS_HEATER_3
246
+      #error HEATER_3_PIN not defined for this board
247
+    #endif
248
+  #elif EXTRUDERS > 2
249
+    #if !HAS_HEATER_2
250
+      #error HEATER_2_PIN not defined for this board
251
+    #endif
252
+  #elif EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
253
+    #if !HAS_HEATER_1
254
+      #error HEATER_1_PIN not defined for this board
255
+    #endif
256
+  #endif
257
+  #if !HAS_HEATER_0
258
+    #error HEATER_0_PIN not defined for this board
259
+  #endif
260
+
261
+#endif //SANITYCHECK_H

+ 20
- 159
Marlin/configurator/config/Configuration.h View File

@@ -328,15 +328,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
328 328
   // #define ENDSTOPPULLUP_ZMIN
329 329
 #endif
330 330
 
331
-#ifdef ENDSTOPPULLUPS
332
-  #define ENDSTOPPULLUP_XMAX
333
-  #define ENDSTOPPULLUP_YMAX
334
-  #define ENDSTOPPULLUP_ZMAX
335
-  #define ENDSTOPPULLUP_XMIN
336
-  #define ENDSTOPPULLUP_YMIN
337
-  #define ENDSTOPPULLUP_ZMIN
338
-#endif
339
-
340 331
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
341 332
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
342 333
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -403,12 +394,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
403 394
 #define Y_MAX_POS 205
404 395
 #define Z_MAX_POS 200
405 396
 
406
-// @section hidden
407
-
408
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
409
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
410
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
411
-
397
+//===========================================================================
398
+//============================= Filament Runout Sensor ======================
399
+//===========================================================================
400
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
401
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
402
+                                 // It is assumed that when logic high = filament available
403
+                                 //                    when logic  low = filament ran out
404
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
405
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
412 406
 
413 407
 //===========================================================================
414 408
 //============================= Bed Auto Leveling ===========================
@@ -654,114 +648,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
654 648
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
655 649
 //#define RA_CONTROL_PANEL
656 650
 
657
-// @section hidden
658
-
659
-//automatic expansion
660
-#if defined (MAKRPANEL)
661
- #define DOGLCD
662
- #define SDSUPPORT
663
- #define ULTIPANEL
664
- #define NEWPANEL
665
- #define DEFAULT_LCD_CONTRAST 17
666
-#endif
667
-
668
-#if defined(miniVIKI) || defined(VIKI2)
669
- #define ULTRA_LCD  //general LCD support, also 16x2
670
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
671
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
672
- 
673
-  #ifdef miniVIKI
674
-   #define DEFAULT_LCD_CONTRAST 95
675
-  #else
676
-   #define DEFAULT_LCD_CONTRAST 40
677
-  #endif
678
-  
679
- #define ENCODER_PULSES_PER_STEP 4
680
- #define ENCODER_STEPS_PER_MENU_ITEM 1
681
-#endif
682
-
683
-#if defined (PANEL_ONE)
684
- #define SDSUPPORT
685
- #define ULTIMAKERCONTROLLER
686
-#endif
687
-
688
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
689
- #define DOGLCD
690
- #define U8GLIB_ST7920
691
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
692
-#endif
693
-
694
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
695
- #define ULTIPANEL
696
- #define NEWPANEL
697
-#endif
698
-
699
-#if defined(REPRAPWORLD_KEYPAD)
700
-  #define NEWPANEL
701
-  #define ULTIPANEL
702
-#endif
703
-#if defined(RA_CONTROL_PANEL)
704
- #define ULTIPANEL
705
- #define NEWPANEL
706
- #define LCD_I2C_TYPE_PCA8574
707
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
708
-#endif
709
-
710
-//I2C PANELS
651
+/**
652
+ * I2C Panels
653
+ */
711 654
 
712 655
 //#define LCD_I2C_SAINSMART_YWROBOT
713
-#ifdef LCD_I2C_SAINSMART_YWROBOT
714
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
715
-  // Make sure it is placed in the Arduino libraries directory.
716
-  #define LCD_I2C_TYPE_PCF8575
717
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
718
-  #define NEWPANEL
719
-  #define ULTIPANEL
720
-#endif
721 656
 
722 657
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
723 658
 //#define LCD_I2C_PANELOLU2
724
-#ifdef LCD_I2C_PANELOLU2
725
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
726
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
727
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
728
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
729
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
730
-  #define LCD_I2C_TYPE_MCP23017
731
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
732
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
733
-  #define NEWPANEL
734
-  #define ULTIPANEL
735
-
736
-  #ifndef ENCODER_PULSES_PER_STEP
737
-	#define ENCODER_PULSES_PER_STEP 4
738
-  #endif
739
-
740
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
741
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
742
-  #endif
743
-
744
-
745
-  #ifdef LCD_USE_I2C_BUZZER
746
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
747
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
748
-  #endif
749
-
750
-#endif
751 659
 
752 660
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
753 661
 //#define LCD_I2C_VIKI
754
-#ifdef LCD_I2C_VIKI
755
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
756
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
757
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
758
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
759
-  #define LCD_I2C_TYPE_MCP23017
760
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
761
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
762
-  #define NEWPANEL
763
-  #define ULTIPANEL
764
-#endif
765 662
 
766 663
 // Shift register panels
767 664
 // ---------------------
@@ -769,55 +666,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
769 666
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
770 667
 
771 668
 //#define SAV_3DLCD
772
-#ifdef SAV_3DLCD
773
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
774
-   #define NEWPANEL
775
-   #define ULTIPANEL
776
-#endif
777
-
778
-
779
-#ifdef ULTIPANEL
780
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
781
-  #define SDSUPPORT
782
-  #define ULTRA_LCD
783
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
784
-    #define LCD_WIDTH 22
785
-    #define LCD_HEIGHT 5
786
-  #else
787
-    #define LCD_WIDTH 20
788
-    #define LCD_HEIGHT 4
789
-  #endif
790
-#else //no panel but just LCD
791
-  #ifdef ULTRA_LCD
792
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
793
-    #define LCD_WIDTH 22
794
-    #define LCD_HEIGHT 5
795
-  #else
796
-    #define LCD_WIDTH 16
797
-    #define LCD_HEIGHT 2
798
-  #endif
799
-  #endif
800
-#endif
801
-
802
-// @section lcd
803
-
804
-// default LCD contrast for dogm-like LCD displays
805
-#ifdef DOGLCD
806
-# ifndef DEFAULT_LCD_CONTRAST
807
-#  define DEFAULT_LCD_CONTRAST 32
808
-# endif
809
-#endif
810 669
 
811 670
 // @section extras
812 671
 
813 672
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
814 673
 //#define FAST_PWM_FAN
815 674
 
816
-// Temperature status LEDs that display the hotend and bet temperature.
817
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
818
-// Otherwise the RED led is on. There is 1C hysteresis.
819
-//#define TEMP_STAT_LEDS
820
-
821 675
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
822 676
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
823 677
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -829,6 +683,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
829 683
 // at zero value, there are 128 effective control positions.
830 684
 #define SOFT_PWM_SCALE 0
831 685
 
686
+// Temperature status LEDs that display the hotend and bet temperature.
687
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
688
+// Otherwise the RED led is on. There is 1C hysteresis.
689
+//#define TEMP_STAT_LEDS
690
+
832 691
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
833 692
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
834 693
 // #define PHOTOGRAPH_PIN     23
@@ -898,6 +757,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
898 757
 
899 758
 
900 759
 #include "Configuration_adv.h"
760
+#include "Conditionals.h"
761
+#include "SanityCheck.h"
901 762
 #include "thermistortables.h"
902 763
 
903
-#endif //__CONFIGURATION_H
764
+#endif //CONFIGURATION_H

+ 3
- 204
Marlin/configurator/config/Configuration_adv.h View File

@@ -99,56 +99,6 @@
99 99
 
100 100
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
101 101
 
102
-
103
-// @section hidden
104
-
105
-
106
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
107
-//// Added by ZetaPhoenix 09-15-2012
108
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
109
-  #define X_HOME_POS MANUAL_X_HOME_POS
110
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
111
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
112
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
113
-  //X axis
114
-  #if X_HOME_DIR == -1
115
-    #ifdef BED_CENTER_AT_0_0
116
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
117
-    #else
118
-      #define X_HOME_POS X_MIN_POS
119
-    #endif //BED_CENTER_AT_0_0
120
-  #else
121
-    #ifdef BED_CENTER_AT_0_0
122
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
123
-    #else
124
-      #define X_HOME_POS X_MAX_POS
125
-    #endif //BED_CENTER_AT_0_0
126
-  #endif //X_HOME_DIR == -1
127
-
128
-  //Y axis
129
-  #if Y_HOME_DIR == -1
130
-    #ifdef BED_CENTER_AT_0_0
131
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
132
-    #else
133
-      #define Y_HOME_POS Y_MIN_POS
134
-    #endif //BED_CENTER_AT_0_0
135
-  #else
136
-    #ifdef BED_CENTER_AT_0_0
137
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
138
-    #else
139
-      #define Y_HOME_POS Y_MAX_POS
140
-    #endif //BED_CENTER_AT_0_0
141
-  #endif //Y_HOME_DIR == -1
142
-
143
-  // Z axis
144
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
145
-    #define Z_HOME_POS Z_MIN_POS
146
-  #else
147
-    #define Z_HOME_POS Z_MAX_POS
148
-  #endif //Z_HOME_DIR == -1
149
-#endif //End auto min/max positions
150
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
151
-
152 102
 // @section extras
153 103
 
154 104
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
@@ -160,26 +110,12 @@
160 110
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
161 111
 //#define Z_DUAL_STEPPER_DRIVERS
162 112
 
163
-#ifdef Z_DUAL_STEPPER_DRIVERS
164
-  #undef EXTRUDERS
165
-  #define EXTRUDERS 1
166
-#endif
167
-
168 113
 // Same again but for Y Axis.
169 114
 //#define Y_DUAL_STEPPER_DRIVERS
170 115
 
171 116
 // Define if the two Y drives need to rotate in opposite directions
172 117
 #define INVERT_Y2_VS_Y_DIR true
173 118
 
174
-#ifdef Y_DUAL_STEPPER_DRIVERS
175
-  #undef EXTRUDERS
176
-  #define EXTRUDERS 1
177
-#endif
178
-
179
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
180
-  #error "You cannot have dual drivers for both Y and Z"
181
-#endif
182
-
183 119
 // Enable this for dual x-carriage printers.
184 120
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
185 121
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -236,14 +172,6 @@
236 172
 
237 173
 #define AXIS_RELATIVE_MODES {false, false, false, false}
238 174
 
239
-// @section hidden
240
-
241
-#ifdef CONFIG_STEPPERS_TOSHIBA
242
-  #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
243
-#else
244
-  #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
245
-#endif
246
-
247 175
 // @section machine
248 176
 
249 177
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
@@ -262,12 +190,12 @@
262 190
 
263 191
 // Feedrates for manual moves along X, Y, Z, E from panel
264 192
 #ifdef ULTIPANEL
265
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
193
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
266 194
 #endif
267 195
 
268 196
 //Comment to disable setting feedrate multiplier via encoder
269 197
 #ifdef ULTIPANEL
270
-    #define ULTIPANEL_FEEDMULTIPLY
198
+  #define ULTIPANEL_FEEDMULTIPLY
271 199
 #endif
272 200
 
273 201
 // @section extras
@@ -288,13 +216,6 @@
288 216
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
289 217
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
290 218
 
291
-// MS1 MS2 Stepper Driver Microstepping mode table
292
-#define MICROSTEP1 LOW,LOW
293
-#define MICROSTEP2 HIGH,LOW
294
-#define MICROSTEP4 LOW,HIGH
295
-#define MICROSTEP8 HIGH,HIGH
296
-#define MICROSTEP16 HIGH,HIGH
297
-
298 219
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
299 220
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
300 221
 
@@ -342,12 +263,6 @@
342 263
   #define PROGRESS_MSG_EXPIRE   0
343 264
   // Enable this to show messages for MSG_TIME then hide them
344 265
   //#define PROGRESS_MSG_ONCE
345
-  #ifdef DOGLCD
346
-    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
347
-  #endif
348
-  #ifdef FILAMENT_LCD_DISPLAY
349
-    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
350
-  #endif
351 266
 #endif
352 267
 
353 268
 // @section more
@@ -373,16 +288,6 @@
373 288
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
374 289
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
375 290
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
376
-
377
-  #ifdef COREXY
378
-    #error BABYSTEPPING not implemented for COREXY yet.
379
-  #endif
380
-
381
-  #ifdef DELTA
382
-    #ifdef BABYSTEP_XY
383
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
384
-    #endif
385
-  #endif
386 291
 #endif
387 292
 
388 293
 // extruder advance constant (s2/mm3)
@@ -418,28 +323,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
418 323
 // be commented out otherwise
419 324
 #define SDCARDDETECTINVERTED
420 325
 
421
-// @section hidden
422
-
423
-#ifdef ULTIPANEL
424
- #undef SDCARDDETECTINVERTED
425
-#endif
426
-
427
-// Power Signal Control Definitions
428
-// By default use ATX definition
429
-#ifndef POWER_SUPPLY
430
-  #define POWER_SUPPLY 1
431
-#endif
432
-// 1 = ATX
433
-#if (POWER_SUPPLY == 1)
434
-  #define PS_ON_AWAKE  LOW
435
-  #define PS_ON_ASLEEP HIGH
436
-#endif
437
-// 2 = X-Box 360 203W
438
-#if (POWER_SUPPLY == 2)
439
-  #define PS_ON_AWAKE  HIGH
440
-  #define PS_ON_ASLEEP LOW
441
-#endif
442
-
443 326
 // @section temperature
444 327
 
445 328
 // Control heater 0 and heater 1 in parallel.
@@ -497,88 +380,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
497 380
   #endif
498 381
 #endif
499 382
 
500
-#ifdef FILAMENTCHANGEENABLE
501
-  #ifdef EXTRUDER_RUNOUT_PREVENT
502
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
503
-  #endif
504
-#endif
505
-
506
-//===========================================================================
507
-//=============================  Define Defines  ============================
508
-//===========================================================================
509
-
510
-// @section hidden
511
-
512
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
513
-  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
514
-#endif
515
-
516
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
517
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
518
-#endif
519
-
520
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
521
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
522
-#endif
523
-
524
-#if TEMP_SENSOR_0 > 0
525
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
526
-  #define HEATER_0_USES_THERMISTOR
527
-#endif
528
-#if TEMP_SENSOR_1 > 0
529
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
530
-  #define HEATER_1_USES_THERMISTOR
531
-#endif
532
-#if TEMP_SENSOR_2 > 0
533
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
534
-  #define HEATER_2_USES_THERMISTOR
535
-#endif
536
-#if TEMP_SENSOR_3 > 0
537
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
538
-  #define HEATER_3_USES_THERMISTOR
539
-#endif
540
-#if TEMP_SENSOR_BED > 0
541
-  #define THERMISTORBED TEMP_SENSOR_BED
542
-  #define BED_USES_THERMISTOR
543
-#endif
544
-#if TEMP_SENSOR_0 == -1
545
-  #define HEATER_0_USES_AD595
546
-#endif
547
-#if TEMP_SENSOR_1 == -1
548
-  #define HEATER_1_USES_AD595
549
-#endif
550
-#if TEMP_SENSOR_2 == -1
551
-  #define HEATER_2_USES_AD595
552
-#endif
553
-#if TEMP_SENSOR_3 == -1
554
-  #define HEATER_3_USES_AD595
555
-#endif
556
-#if TEMP_SENSOR_BED == -1
557
-  #define BED_USES_AD595
558
-#endif
559
-#if TEMP_SENSOR_0 == -2
560
-  #define HEATER_0_USES_MAX6675
561
-#endif
562
-#if TEMP_SENSOR_0 == 0
563
-  #undef HEATER_0_MINTEMP
564
-  #undef HEATER_0_MAXTEMP
565
-#endif
566
-#if TEMP_SENSOR_1 == 0
567
-  #undef HEATER_1_MINTEMP
568
-  #undef HEATER_1_MAXTEMP
569
-#endif
570
-#if TEMP_SENSOR_2 == 0
571
-  #undef HEATER_2_MINTEMP
572
-  #undef HEATER_2_MAXTEMP
573
-#endif
574
-#if TEMP_SENSOR_3 == 0
575
-  #undef HEATER_3_MINTEMP
576
-  #undef HEATER_3_MAXTEMP
577
-#endif
578
-#if TEMP_SENSOR_BED == 0
579
-  #undef BED_MINTEMP
580
-  #undef BED_MAXTEMP
581
-#endif
582
-
583
-
584
-#endif //__CONFIGURATION_ADV_H
383
+#endif //CONFIGURATION_ADV_H

+ 19
- 171
Marlin/example_configurations/Felix/Configuration.h View File

@@ -294,15 +294,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
294 294
   // #define ENDSTOPPULLUP_ZMIN
295 295
 #endif
296 296
 
297
-#ifdef ENDSTOPPULLUPS
298
-  #define ENDSTOPPULLUP_XMAX
299
-  #define ENDSTOPPULLUP_YMAX
300
-  #define ENDSTOPPULLUP_ZMAX
301
-  #define ENDSTOPPULLUP_XMIN
302
-  #define ENDSTOPPULLUP_YMIN
303
-  #define ENDSTOPPULLUP_ZMIN
304
-#endif
305
-
306 297
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
307 298
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308 299
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -351,10 +342,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
351 342
 #define Z_MAX_POS 235
352 343
 #define Z_MIN_POS 0
353 344
 
354
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
355
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
356
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
357
-
345
+//===========================================================================
346
+//============================= Filament Runout Sensor ======================
347
+//===========================================================================
348
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
349
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
350
+                                 // It is assumed that when logic high = filament available
351
+                                 //                    when logic  low = filament ran out
352
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
353
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
358 354
 
359 355
 //===========================================================================
360 356
 //============================= Bed Auto Leveling ===========================
@@ -455,29 +451,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
455 451
 
456 452
   #endif
457 453
 
458
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
459
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
460
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
461
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
462
-	  #endif
463
-	#else
464
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
465
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
466
-	  #endif
467
-	#endif
468
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
469
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
470
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
471
-	  #endif
472
-	#else
473
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
474
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
475
-	  #endif
476
-	#endif
477
-
478
-
479
-  #endif
480
-
481 454
 #endif // ENABLE_AUTO_BED_LEVELING
482 455
 
483 456
 
@@ -613,112 +586,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
613 586
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
614 587
 //#define RA_CONTROL_PANEL
615 588
 
616
-//automatic expansion
617
-#if defined (MAKRPANEL)
618
- #define DOGLCD
619
- #define SDSUPPORT
620
- #define ULTIPANEL
621
- #define NEWPANEL
622
- #define DEFAULT_LCD_CONTRAST 17
623
-#endif
624
-
625
-#if defined(miniVIKI) || defined(VIKI2)
626
- #define ULTRA_LCD  //general LCD support, also 16x2
627
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
628
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
629
-
630
-  #ifdef miniVIKI
631
-   #define DEFAULT_LCD_CONTRAST 95
632
-  #else
633
-   #define DEFAULT_LCD_CONTRAST 40
634
-  #endif
635
-
636
- #define ENCODER_PULSES_PER_STEP 4
637
- #define ENCODER_STEPS_PER_MENU_ITEM 1
638
-#endif
639
-
640
-#if defined (PANEL_ONE)
641
- #define SDSUPPORT
642
- #define ULTIMAKERCONTROLLER
643
-#endif
644
-
645
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
646
- #define DOGLCD
647
- #define U8GLIB_ST7920
648
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
649
-#endif
650
-
651
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
652
- #define ULTIPANEL
653
- #define NEWPANEL
654
-#endif
655
-
656
-#if defined(REPRAPWORLD_KEYPAD)
657
-  #define NEWPANEL
658
-  #define ULTIPANEL
659
-#endif
660
-#if defined(RA_CONTROL_PANEL)
661
- #define ULTIPANEL
662
- #define NEWPANEL
663
- #define LCD_I2C_TYPE_PCA8574
664
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
665
-#endif
666
-
667
-//I2C PANELS
589
+/**
590
+ * I2C Panels
591
+ */
668 592
 
669 593
 //#define LCD_I2C_SAINSMART_YWROBOT
670
-#ifdef LCD_I2C_SAINSMART_YWROBOT
671
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
672
-  // Make sure it is placed in the Arduino libraries directory.
673
-  #define LCD_I2C_TYPE_PCF8575
674
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
675
-  #define NEWPANEL
676
-  #define ULTIPANEL
677
-#endif
678 594
 
679 595
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
680 596
 //#define LCD_I2C_PANELOLU2
681
-#ifdef LCD_I2C_PANELOLU2
682
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
683
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
684
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
685
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
686
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
687
-  #define LCD_I2C_TYPE_MCP23017
688
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
689
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
690
-  #define NEWPANEL
691
-  #define ULTIPANEL
692
-
693
-  #ifndef ENCODER_PULSES_PER_STEP
694
-	#define ENCODER_PULSES_PER_STEP 4
695
-  #endif
696
-
697
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
698
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
699
-  #endif
700
-
701
-
702
-  #ifdef LCD_USE_I2C_BUZZER
703
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
704
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
705
-  #endif
706
-
707
-#endif
708 597
 
709 598
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
710 599
 //#define LCD_I2C_VIKI
711
-#ifdef LCD_I2C_VIKI
712
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
713
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
714
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
715
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
716
-  #define LCD_I2C_TYPE_MCP23017
717
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
718
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
719
-  #define NEWPANEL
720
-  #define ULTIPANEL
721
-#endif
722 600
 
723 601
 // Shift register panels
724 602
 // ---------------------
@@ -726,42 +604,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
726 604
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
727 605
 
728 606
 //#define SAV_3DLCD
729
-#ifdef SAV_3DLCD
730
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
731
-   #define NEWPANEL
732
-   #define ULTIPANEL
733
-#endif
734
-
735
-
736
-#ifdef ULTIPANEL
737
-  #define NEWPANEL  //enable this if you have a click-encoder panel
738
-  #define SDSUPPORT
739
-  #define ULTRA_LCD
740
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
741
-    #define LCD_WIDTH 22
742
-    #define LCD_HEIGHT 5
743
-  #else
744
-    #define LCD_WIDTH 20
745
-    #define LCD_HEIGHT 4
746
-  #endif
747
-#else //no panel but just LCD
748
-  #ifdef ULTRA_LCD
749
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
750
-    #define LCD_WIDTH 22
751
-    #define LCD_HEIGHT 5
752
-  #else
753
-    #define LCD_WIDTH 16
754
-    #define LCD_HEIGHT 2
755
-  #endif
756
-  #endif
757
-#endif
758
-
759
-// default LCD contrast for dogm-like LCD displays
760
-#ifdef DOGLCD
761
-# ifndef DEFAULT_LCD_CONTRAST
762
-#  define DEFAULT_LCD_CONTRAST 32
763
-# endif
764
-#endif
765 607
 
766 608
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
767 609
 #define FAST_PWM_FAN
@@ -846,7 +688,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
846 688
 //#define FILAMENT_LCD_DISPLAY
847 689
 
848 690
 
691
+
692
+
693
+
694
+
849 695
 #include "Configuration_adv.h"
696
+#include "Conditionals.h"
697
+#include "SanityCheck.h"
850 698
 #include "thermistortables.h"
851 699
 
852
-#endif //__CONFIGURATION_H
700
+#endif //CONFIGURATION_H

+ 15
- 170
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -294,15 +294,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
294 294
   // #define ENDSTOPPULLUP_ZMIN
295 295
 #endif
296 296
 
297
-#ifdef ENDSTOPPULLUPS
298
-  #define ENDSTOPPULLUP_XMAX
299
-  #define ENDSTOPPULLUP_YMAX
300
-  #define ENDSTOPPULLUP_ZMAX
301
-  #define ENDSTOPPULLUP_XMIN
302
-  #define ENDSTOPPULLUP_YMIN
303
-  #define ENDSTOPPULLUP_ZMIN
304
-#endif
305
-
306 297
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
307 298
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
308 299
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -351,10 +342,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
351 342
 #define Z_MAX_POS 235
352 343
 #define Z_MIN_POS 0
353 344
 
354
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
355
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
356
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
357
-
345
+//===========================================================================
346
+//============================= Filament Runout Sensor ======================
347
+//===========================================================================
348
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
349
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
350
+                                 // It is assumed that when logic high = filament available
351
+                                 //                    when logic  low = filament ran out
352
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
353
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
358 354
 
359 355
 //===========================================================================
360 356
 //============================= Bed Auto Leveling ===========================
@@ -455,29 +451,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
455 451
 
456 452
   #endif
457 453
 
458
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
459
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
460
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
461
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
462
-	  #endif
463
-	#else
464
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
465
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
466
-	  #endif
467
-	#endif
468
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
469
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
470
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
471
-	  #endif
472
-	#else
473
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
474
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
475
-	  #endif
476
-	#endif
477
-
478
-
479
-  #endif
480
-
481 454
 #endif // ENABLE_AUTO_BED_LEVELING
482 455
 
483 456
 
@@ -613,112 +586,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
613 586
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
614 587
 //#define RA_CONTROL_PANEL
615 588
 
616
-//automatic expansion
617
-#if defined (MAKRPANEL)
618
- #define DOGLCD
619
- #define SDSUPPORT
620
- #define ULTIPANEL
621
- #define NEWPANEL
622
- #define DEFAULT_LCD_CONTRAST 17
623
-#endif
624
-
625
-#if defined(miniVIKI) || defined(VIKI2)
626
- #define ULTRA_LCD  //general LCD support, also 16x2
627
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
628
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
629
-
630
-  #ifdef miniVIKI
631
-   #define DEFAULT_LCD_CONTRAST 95
632
-  #else
633
-   #define DEFAULT_LCD_CONTRAST 40
634
-  #endif
635
-
636
- #define ENCODER_PULSES_PER_STEP 4
637
- #define ENCODER_STEPS_PER_MENU_ITEM 1
638
-#endif
639
-
640
-#if defined (PANEL_ONE)
641
- #define SDSUPPORT
642
- #define ULTIMAKERCONTROLLER
643
-#endif
644
-
645
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
646
- #define DOGLCD
647
- #define U8GLIB_ST7920
648
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
649
-#endif
650
-
651
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
652
- #define ULTIPANEL
653
- #define NEWPANEL
654
-#endif
655
-
656
-#if defined(REPRAPWORLD_KEYPAD)
657
-  #define NEWPANEL
658
-  #define ULTIPANEL
659
-#endif
660
-#if defined(RA_CONTROL_PANEL)
661
- #define ULTIPANEL
662
- #define NEWPANEL
663
- #define LCD_I2C_TYPE_PCA8574
664
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
665
-#endif
666
-
667
-//I2C PANELS
589
+/**
590
+ * I2C Panels
591
+ */
668 592
 
669 593
 //#define LCD_I2C_SAINSMART_YWROBOT
670
-#ifdef LCD_I2C_SAINSMART_YWROBOT
671
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
672
-  // Make sure it is placed in the Arduino libraries directory.
673
-  #define LCD_I2C_TYPE_PCF8575
674
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
675
-  #define NEWPANEL
676
-  #define ULTIPANEL
677
-#endif
678 594
 
679 595
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
680 596
 //#define LCD_I2C_PANELOLU2
681
-#ifdef LCD_I2C_PANELOLU2
682
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
683
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
684
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
685
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
686
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
687
-  #define LCD_I2C_TYPE_MCP23017
688
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
689
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
690
-  #define NEWPANEL
691
-  #define ULTIPANEL
692
-
693
-  #ifndef ENCODER_PULSES_PER_STEP
694
-	#define ENCODER_PULSES_PER_STEP 4
695
-  #endif
696
-
697
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
698
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
699
-  #endif
700
-
701
-
702
-  #ifdef LCD_USE_I2C_BUZZER
703
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
704
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
705
-  #endif
706
-
707
-#endif
708 597
 
709 598
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
710 599
 //#define LCD_I2C_VIKI
711
-#ifdef LCD_I2C_VIKI
712
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
713
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
714
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
715
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
716
-  #define LCD_I2C_TYPE_MCP23017
717
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
718
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
719
-  #define NEWPANEL
720
-  #define ULTIPANEL
721
-#endif
722 600
 
723 601
 // Shift register panels
724 602
 // ---------------------
@@ -726,42 +604,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
726 604
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
727 605
 
728 606
 //#define SAV_3DLCD
729
-#ifdef SAV_3DLCD
730
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
731
-   #define NEWPANEL
732
-   #define ULTIPANEL
733
-#endif
734
-
735
-
736
-#ifdef ULTIPANEL
737
-  #define NEWPANEL  //enable this if you have a click-encoder panel
738
-  #define SDSUPPORT
739
-  #define ULTRA_LCD
740
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
741
-    #define LCD_WIDTH 22
742
-    #define LCD_HEIGHT 5
743
-  #else
744
-    #define LCD_WIDTH 20
745
-    #define LCD_HEIGHT 4
746
-  #endif
747
-#else //no panel but just LCD
748
-  #ifdef ULTRA_LCD
749
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
750
-    #define LCD_WIDTH 22
751
-    #define LCD_HEIGHT 5
752
-  #else
753
-    #define LCD_WIDTH 16
754
-    #define LCD_HEIGHT 2
755
-  #endif
756
-  #endif
757
-#endif
758 607
 
759
-// default LCD contrast for dogm-like LCD displays
760
-#ifdef DOGLCD
761
-# ifndef DEFAULT_LCD_CONTRAST
762
-#  define DEFAULT_LCD_CONTRAST 32
763
-# endif
764
-#endif
765 608
 
766 609
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
767 610
 #define FAST_PWM_FAN
@@ -847,6 +690,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
847 690
 
848 691
 
849 692
 #include "Configuration_adv.h"
693
+#include "Conditionals.h"
694
+#include "SanityCheck.h"
850 695
 #include "thermistortables.h"
851 696
 
852
-#endif //__CONFIGURATION_H
697
+#endif //CONFIGURATION_H

+ 0
- 541
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -1,541 +0,0 @@
1
-#ifndef CONFIGURATION_ADV_H
2
-#define CONFIGURATION_ADV_H
3
-
4
-//===========================================================================
5
-//=============================Thermal Settings  ============================
6
-//===========================================================================
7
-
8
-#ifdef BED_LIMIT_SWITCHING
9
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
10
-#endif
11
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
12
-
13
-//// Heating sanity check:
14
-// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
15
-// If the temperature has not increased at the end of that period, the target temperature is set to zero.
16
-// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
17
-//  differ by at least 2x WATCH_TEMP_INCREASE
18
-//#define WATCH_TEMP_PERIOD 40000 //40 seconds
19
-//#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
20
-
21
-#ifdef PIDTEMP
22
-  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
23
-  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
24
-  #define PID_ADD_EXTRUSION_RATE
25
-  #ifdef PID_ADD_EXTRUSION_RATE
26
-    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
27
-  #endif
28
-#endif
29
-
30
-
31
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
32
-//The maximum buffered steps/sec of the extruder motor are called "se".
33
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
34
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
35
-// you exit the value by any M109 without F*
36
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
37
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
38
-#define AUTOTEMP
39
-#ifdef AUTOTEMP
40
-  #define AUTOTEMP_OLDWEIGHT 0.98
41
-#endif
42
-
43
-//Show Temperature ADC value
44
-//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
45
-//#define SHOW_TEMP_ADC_VALUES
46
-
47
-//  extruder run-out prevention.
48
-//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
49
-//#define EXTRUDER_RUNOUT_PREVENT
50
-#define EXTRUDER_RUNOUT_MINTEMP 190
51
-#define EXTRUDER_RUNOUT_SECONDS 30.
52
-#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
53
-#define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
54
-#define EXTRUDER_RUNOUT_EXTRUDE 100
55
-
56
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
57
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
58
-#define TEMP_SENSOR_AD595_OFFSET 0.0
59
-#define TEMP_SENSOR_AD595_GAIN   1.0
60
-
61
-//This is for controlling a fan to cool down the stepper drivers
62
-//it will turn on when any driver is enabled
63
-//and turn off after the set amount of seconds from last driver being disabled again
64
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
65
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
66
-#define CONTROLLERFAN_SPEED 255  // == full speed
67
-
68
-// When first starting the main fan, run it at full speed for the
69
-// given number of milliseconds.  This gets the fan spinning reliably
70
-// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
71
-//#define FAN_KICKSTART_TIME 100
72
-
73
-// Extruder cooling fans
74
-// Configure fan pin outputs to automatically turn on/off when the associated
75
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
76
-// Multiple extruders can be assigned to the same pin in which case
77
-// the fan will turn on when any selected extruder is above the threshold.
78
-#define EXTRUDER_0_AUTO_FAN_PIN -1
79
-#define EXTRUDER_1_AUTO_FAN_PIN -1
80
-#define EXTRUDER_2_AUTO_FAN_PIN -1
81
-#define EXTRUDER_3_AUTO_FAN_PIN -1
82
-#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
83
-#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
84
-
85
-
86
-//===========================================================================
87
-//=============================Mechanical Settings===========================
88
-//===========================================================================
89
-
90
-#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91
-
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140
-//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141
-
142
-// A single Z stepper driver is usually used to drive 2 stepper motors.
143
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
144
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
145
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
146
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147
-//#define Z_DUAL_STEPPER_DRIVERS
148
-
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154
-// Same again but for Y Axis.
155
-//#define Y_DUAL_STEPPER_DRIVERS
156
-
157
-// Define if the two Y drives need to rotate in opposite directions
158
-#define INVERT_Y2_VS_Y_DIR true
159
-
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169
-// Enable this for dual x-carriage printers.
170
-// A dual x-carriage design has the advantage that the inactive extruder can be parked which
171
-// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
172
-// allowing faster printing speeds.
173
-//#define DUAL_X_CARRIAGE
174
-#ifdef DUAL_X_CARRIAGE
175
-// Configuration for second X-carriage
176
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
177
-// the second x-carriage always homes to the maximum endstop.
178
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
179
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
180
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
181
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
182
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
183
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
184
-    // without modifying the firmware (through the "M218 T1 X???" command).
185
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
186
-
187
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
188
-#define X2_ENABLE_PIN 29
189
-#define X2_STEP_PIN 25
190
-#define X2_DIR_PIN 23
191
-
192
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
193
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
194
-//                           as long as it supports dual x-carriages. (M605 S0)
195
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
196
-//                           that additional slicer support is not required. (M605 S1)
197
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
198
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
199
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
200
-
201
-// This is the default power-up mode which can be later using M605.
202
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
203
-
204
-// Default settings in "Auto-park Mode"
205
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
206
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
207
-
208
-// Default x offset in duplication mode (typically set to half print bed width)
209
-#define DEFAULT_DUPLICATION_X_OFFSET 100
210
-
211
-#endif //DUAL_X_CARRIAGE
212
-
213
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
214
-#define X_HOME_RETRACT_MM 5
215
-#define Y_HOME_RETRACT_MM 5
216
-#define Z_HOME_RETRACT_MM 3
217
-#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
218
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
219
-
220
-#define AXIS_RELATIVE_MODES {false, false, false, false}
221
-#ifdef CONFIG_STEPPERS_TOSHIBA
222
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
223
-#else
224
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
225
-#endif
226
-//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
227
-#define INVERT_X_STEP_PIN false
228
-#define INVERT_Y_STEP_PIN false
229
-#define INVERT_Z_STEP_PIN false
230
-#define INVERT_E_STEP_PIN false
231
-
232
-//default stepper release if idle. Set to 0 to deactivate.
233
-#define DEFAULT_STEPPER_DEACTIVE_TIME 60
234
-
235
-#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
236
-#define DEFAULT_MINTRAVELFEEDRATE     0.0
237
-
238
-// Feedrates for manual moves along X, Y, Z, E from panel
239
-#ifdef ULTIPANEL
240
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
241
-#endif
242
-
243
-//Comment to disable setting feedrate multiplier via encoder
244
-#ifdef ULTIPANEL
245
-    #define ULTIPANEL_FEEDMULTIPLY
246
-#endif
247
-
248
-// minimum time in microseconds that a movement needs to take if the buffer is emptied.
249
-#define DEFAULT_MINSEGMENTTIME        20000
250
-
251
-// If defined the movements slow down when the look ahead buffer is only half full
252
-#define SLOWDOWN
253
-
254
-// Frequency limit
255
-// See nophead's blog for more info
256
-// Not working O
257
-//#define XY_FREQUENCY_LIMIT  15
258
-
259
-// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
260
-// of the buffer and all stops. This should not be much greater than zero and should only be changed
261
-// if unwanted behavior is observed on a user's machine when running at very slow speeds.
262
-#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263
-
264
-// MS1 MS2 Stepper Driver Microstepping mode table
265
-#define MICROSTEP1 LOW,LOW
266
-#define MICROSTEP2 HIGH,LOW
267
-#define MICROSTEP4 LOW,HIGH
268
-#define MICROSTEP8 HIGH,HIGH
269
-#define MICROSTEP16 HIGH,HIGH
270
-
271
-// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273
-
274
-// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
-#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276
-
277
-// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
-//#define DIGIPOT_I2C
279
-// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
280
-#define DIGIPOT_I2C_NUM_CHANNELS 8
281
-// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
282
-#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
283
-
284
-//===========================================================================
285
-//=============================Additional Features===========================
286
-//===========================================================================
287
-
288
-#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
289
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
290
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
291
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
292
-
293
-//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
294
-#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
295
-
296
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
297
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
298
-
299
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
300
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
301
-// using:
302
-//#define MENU_ADDAUTOSTART
303
-
304
-// Show a progress bar on HD44780 LCDs for SD printing
305
-//#define LCD_PROGRESS_BAR
306
-
307
-#ifdef LCD_PROGRESS_BAR
308
-  // Amount of time (ms) to show the bar
309
-  #define PROGRESS_BAR_BAR_TIME 2000
310
-  // Amount of time (ms) to show the status message
311
-  #define PROGRESS_BAR_MSG_TIME 3000
312
-  // Amount of time (ms) to retain the status message (0=forever)
313
-  #define PROGRESS_MSG_EXPIRE   0
314
-  // Enable this to show messages for MSG_TIME then hide them
315
-  //#define PROGRESS_MSG_ONCE
316
-  #ifdef DOGLCD
317
-    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
318
-  #endif
319
-  #ifdef FILAMENT_LCD_DISPLAY
320
-    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
321
-  #endif
322
-#endif
323
-
324
-// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
325
-//#define USE_WATCHDOG
326
-
327
-#ifdef USE_WATCHDOG
328
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
329
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
330
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
331
-//#define WATCHDOG_RESET_MANUAL
332
-#endif
333
-
334
-// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
335
-//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
336
-
337
-// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
338
-// it can e.g. be used to change z-positions in the print startup phase in real-time
339
-// does not respect endstops!
340
-//#define BABYSTEPPING
341
-#ifdef BABYSTEPPING
342
-  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
343
-  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
344
-  #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
345
-
346
-  #ifdef COREXY
347
-    #error BABYSTEPPING not implemented for COREXY yet.
348
-  #endif
349
-
350
-  #ifdef DELTA
351
-    #ifdef BABYSTEP_XY
352
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
353
-    #endif
354
-  #endif
355
-#endif
356
-
357
-// extruder advance constant (s2/mm3)
358
-//
359
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
360
-//
361
-// Hooke's law says:		force = k * distance
362
-// Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
363
-// so: v ^ 2 is proportional to number of steps we advance the extruder
364
-//#define ADVANCE
365
-
366
-#ifdef ADVANCE
367
-  #define EXTRUDER_ADVANCE_K .0
368
-
369
-  #define D_FILAMENT 2.85
370
-  #define STEPS_MM_E 836
371
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
372
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
373
-
374
-#endif // ADVANCE
375
-
376
-// Arc interpretation settings:
377
-#define MM_PER_ARC_SEGMENT 1
378
-#define N_ARC_CORRECTION 25
379
-
380
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
381
-
382
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
383
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
384
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
385
-// be commented out otherwise
386
-#define SDCARDDETECTINVERTED
387
-
388
-//#ifdef ULTIPANEL
389
-// #undef SDCARDDETECTINVERTED
390
-//#endif
391
-
392
-// Power Signal Control Definitions
393
-// By default use ATX definition
394
-#ifndef POWER_SUPPLY
395
-  #define POWER_SUPPLY 1
396
-#endif
397
-// 1 = ATX
398
-#if (POWER_SUPPLY == 1)
399
-  #define PS_ON_AWAKE  LOW
400
-  #define PS_ON_ASLEEP HIGH
401
-#endif
402
-// 2 = X-Box 360 203W
403
-#if (POWER_SUPPLY == 2)
404
-  #define PS_ON_AWAKE  HIGH
405
-  #define PS_ON_ASLEEP LOW
406
-#endif
407
-
408
-// Control heater 0 and heater 1 in parallel.
409
-//#define HEATERS_PARALLEL
410
-
411
-//===========================================================================
412
-//=============================Buffers           ============================
413
-//===========================================================================
414
-
415
-// The number of linear motions that can be in the plan at any give time.
416
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
417
-#if defined SDSUPPORT
418
-  #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
419
-#else
420
-  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
421
-#endif
422
-
423
-
424
-//The ASCII buffer for receiving from the serial:
425
-#define MAX_CMD_SIZE 96
426
-#define BUFSIZE 4
427
-
428
-
429
-// Firmware based and LCD controlled retract
430
-// M207 and M208 can be used to define parameters for the retraction.
431
-// The retraction can be called by the slicer using G10 and G11
432
-// until then, intended retractions can be detected by moves that only extrude and the direction.
433
-// the moves are than replaced by the firmware controlled ones.
434
-
435
-// #define FWRETRACT  //ONLY PARTIALLY TESTED
436
-#ifdef FWRETRACT
437
-  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
438
-  #define RETRACT_LENGTH 3               //default retract length (positive mm)
439
-  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
440
-  #define RETRACT_FEEDRATE 45            //default feedrate for retracting (mm/s)
441
-  #define RETRACT_ZLIFT 0                //default retract Z-lift
442
-  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
443
-  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
444
-  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
445
-#endif
446
-
447
-//adds support for experimental filament exchange support M600; requires display
448
-#ifdef ULTIPANEL
449
-  #define FILAMENTCHANGEENABLE
450
-  #ifdef FILAMENTCHANGEENABLE
451
-    #define FILAMENTCHANGE_XPOS 3
452
-    #define FILAMENTCHANGE_YPOS 3
453
-    #define FILAMENTCHANGE_ZADD 10
454
-    #define FILAMENTCHANGE_FIRSTRETRACT -2
455
-    #define FILAMENTCHANGE_FINALRETRACT -100
456
-  #endif
457
-#endif
458
-
459
-#ifdef FILAMENTCHANGEENABLE
460
-  #ifdef EXTRUDER_RUNOUT_PREVENT
461
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
-  #endif
463
-#endif
464
-
465
-//===========================================================================
466
-//=============================  Define Defines  ============================
467
-//===========================================================================
468
-
469
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
470
-  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
471
-#endif
472
-
473
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
474
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
475
-#endif
476
-
477
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
478
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
479
-#endif
480
-
481
-#if TEMP_SENSOR_0 > 0
482
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
483
-  #define HEATER_0_USES_THERMISTOR
484
-#endif
485
-#if TEMP_SENSOR_1 > 0
486
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
487
-  #define HEATER_1_USES_THERMISTOR
488
-#endif
489
-#if TEMP_SENSOR_2 > 0
490
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
491
-  #define HEATER_2_USES_THERMISTOR
492
-#endif
493
-#if TEMP_SENSOR_3 > 0
494
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
495
-  #define HEATER_3_USES_THERMISTOR
496
-#endif
497
-#if TEMP_SENSOR_BED > 0
498
-  #define THERMISTORBED TEMP_SENSOR_BED
499
-  #define BED_USES_THERMISTOR
500
-#endif
501
-#if TEMP_SENSOR_0 == -1
502
-  #define HEATER_0_USES_AD595
503
-#endif
504
-#if TEMP_SENSOR_1 == -1
505
-  #define HEATER_1_USES_AD595
506
-#endif
507
-#if TEMP_SENSOR_2 == -1
508
-  #define HEATER_2_USES_AD595
509
-#endif
510
-#if TEMP_SENSOR_3 == -1
511
-  #define HEATER_3_USES_AD595
512
-#endif
513
-#if TEMP_SENSOR_BED == -1
514
-  #define BED_USES_AD595
515
-#endif
516
-#if TEMP_SENSOR_0 == -2
517
-  #define HEATER_0_USES_MAX6675
518
-#endif
519
-#if TEMP_SENSOR_0 == 0
520
-  #undef HEATER_0_MINTEMP
521
-  #undef HEATER_0_MAXTEMP
522
-#endif
523
-#if TEMP_SENSOR_1 == 0
524
-  #undef HEATER_1_MINTEMP
525
-  #undef HEATER_1_MAXTEMP
526
-#endif
527
-#if TEMP_SENSOR_2 == 0
528
-  #undef HEATER_2_MINTEMP
529
-  #undef HEATER_2_MAXTEMP
530
-#endif
531
-#if TEMP_SENSOR_3 == 0
532
-  #undef HEATER_3_MINTEMP
533
-  #undef HEATER_3_MAXTEMP
534
-#endif
535
-#if TEMP_SENSOR_BED == 0
536
-  #undef BED_MINTEMP
537
-  #undef BED_MAXTEMP
538
-#endif
539
-
540
-
541
-#endif //__CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -320,15 +320,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
320 320
   // #define ENDSTOPPULLUP_ZMIN
321 321
 #endif
322 322
 
323
-#ifdef ENDSTOPPULLUPS
324
-  #define ENDSTOPPULLUP_XMAX
325
-  #define ENDSTOPPULLUP_YMAX
326
-  #define ENDSTOPPULLUP_ZMAX
327
-  #define ENDSTOPPULLUP_XMIN
328
-  #define ENDSTOPPULLUP_YMIN
329
-  #define ENDSTOPPULLUP_ZMIN
330
-#endif
331
-
332 323
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
333 324
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
334 325
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -377,10 +368,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
377 368
 #define Z_MAX_POS 180
378 369
 #define Z_MIN_POS 0
379 370
 
380
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
381
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
382
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
383
-
371
+//===========================================================================
372
+//============================= Filament Runout Sensor ======================
373
+//===========================================================================
374
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
375
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
376
+                                 // It is assumed that when logic high = filament available
377
+                                 //                    when logic  low = filament ran out
378
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
379
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
384 380
 
385 381
 //===========================================================================
386 382
 //============================= Bed Auto Leveling ===========================
@@ -618,112 +614,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
618 614
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
619 615
 //#define RA_CONTROL_PANEL
620 616
 
621
-//automatic expansion
622
-#if defined (MAKRPANEL)
623
- #define DOGLCD
624
- #define SDSUPPORT
625
- #define ULTIPANEL
626
- #define NEWPANEL
627
- #define DEFAULT_LCD_CONTRAST 17
628
-#endif
629
-
630
-#if defined(miniVIKI) || defined(VIKI2)
631
- #define ULTRA_LCD  //general LCD support, also 16x2
632
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
633
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
634
- 
635
-  #ifdef miniVIKI
636
-   #define DEFAULT_LCD_CONTRAST 95
637
-  #else
638
-   #define DEFAULT_LCD_CONTRAST 40
639
-  #endif
640
-  
641
- #define ENCODER_PULSES_PER_STEP 4
642
- #define ENCODER_STEPS_PER_MENU_ITEM 1
643
-#endif
644
-
645
-#if defined (PANEL_ONE)
646
- #define SDSUPPORT
647
- #define ULTIMAKERCONTROLLER
648
-#endif
649
-
650
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
651
- #define DOGLCD
652
- #define U8GLIB_ST7920
653
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
654
-#endif
655
-
656
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
657
- #define ULTIPANEL
658
- #define NEWPANEL
659
-#endif
660
-
661
-#if defined(REPRAPWORLD_KEYPAD)
662
-  #define NEWPANEL
663
-  #define ULTIPANEL
664
-#endif
665
-#if defined(RA_CONTROL_PANEL)
666
- #define ULTIPANEL
667
- #define NEWPANEL
668
- #define LCD_I2C_TYPE_PCA8574
669
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
670
-#endif
671
-
672
-//I2C PANELS
617
+/**
618
+ * I2C Panels
619
+ */
673 620
 
674 621
 //#define LCD_I2C_SAINSMART_YWROBOT
675
-#ifdef LCD_I2C_SAINSMART_YWROBOT
676
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
677
-  // Make sure it is placed in the Arduino libraries directory.
678
-  #define LCD_I2C_TYPE_PCF8575
679
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
680
-  #define NEWPANEL
681
-  #define ULTIPANEL
682
-#endif
683 622
 
684 623
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
685 624
 //#define LCD_I2C_PANELOLU2
686
-#ifdef LCD_I2C_PANELOLU2
687
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
688
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
689
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
690
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
691
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
692
-  #define LCD_I2C_TYPE_MCP23017
693
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
694
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
695
-  #define NEWPANEL
696
-  #define ULTIPANEL
697
-
698
-  #ifndef ENCODER_PULSES_PER_STEP
699
-	#define ENCODER_PULSES_PER_STEP 4
700
-  #endif
701
-
702
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
703
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
704
-  #endif
705
-
706
-
707
-  #ifdef LCD_USE_I2C_BUZZER
708
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
709
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
710
-  #endif
711
-
712
-#endif
713 625
 
714 626
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
715 627
 //#define LCD_I2C_VIKI
716
-#ifdef LCD_I2C_VIKI
717
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
718
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
719
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
720
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
721
-  #define LCD_I2C_TYPE_MCP23017
722
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
723
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
724
-  #define NEWPANEL
725
-  #define ULTIPANEL
726
-#endif
727 628
 
728 629
 // Shift register panels
729 630
 // ---------------------
@@ -731,51 +632,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
731 632
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
732 633
 
733 634
 //#define SAV_3DLCD
734
-#ifdef SAV_3DLCD
735
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
736
-   #define NEWPANEL
737
-   #define ULTIPANEL
738
-#endif
739
-
740
-
741
-#ifdef ULTIPANEL
742
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
743
-  #define SDSUPPORT
744
-  #define ULTRA_LCD
745
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
746
-    #define LCD_WIDTH 22
747
-    #define LCD_HEIGHT 5
748
-  #else
749
-    #define LCD_WIDTH 20
750
-    #define LCD_HEIGHT 4
751
-  #endif
752
-#else //no panel but just LCD
753
-  #ifdef ULTRA_LCD
754
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
755
-    #define LCD_WIDTH 22
756
-    #define LCD_HEIGHT 5
757
-  #else
758
-    #define LCD_WIDTH 16
759
-    #define LCD_HEIGHT 2
760
-  #endif
761
-  #endif
762
-#endif
763
-
764
-// default LCD contrast for dogm-like LCD displays
765
-#ifdef DOGLCD
766
-# ifndef DEFAULT_LCD_CONTRAST
767
-#  define DEFAULT_LCD_CONTRAST 32
768
-# endif
769
-#endif
770 635
 
771 636
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
772 637
 //#define FAST_PWM_FAN
773 638
 
774
-// Temperature status LEDs that display the hotend and bet temperature.
775
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
776
-// Otherwise the RED led is on. There is 1C hysteresis.
777
-//#define TEMP_STAT_LEDS
778
-
779 639
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
780 640
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
781 641
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -787,6 +647,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
787 647
 // at zero value, there are 128 effective control positions.
788 648
 #define SOFT_PWM_SCALE 0
789 649
 
650
+// Temperature status LEDs that display the hotend and bet temperature.
651
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
652
+// Otherwise the RED led is on. There is 1C hysteresis.
653
+//#define TEMP_STAT_LEDS
654
+
790 655
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
791 656
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
792 657
 // #define PHOTOGRAPH_PIN     23
@@ -856,6 +721,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
856 721
 
857 722
 
858 723
 #include "Configuration_adv.h"
724
+#include "Conditionals.h"
725
+#include "SanityCheck.h"
859 726
 #include "thermistortables.h"
860 727
 
861
-#endif //__CONFIGURATION_H
728
+#endif //CONFIGURATION_H

+ 0
- 541
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -1,541 +0,0 @@
1
-#ifndef CONFIGURATION_ADV_H
2
-#define CONFIGURATION_ADV_H
3
-
4
-//===========================================================================
5
-//=============================Thermal Settings  ============================
6
-//===========================================================================
7
-
8
-#ifdef BED_LIMIT_SWITCHING
9
-  #define BED_HYSTERESIS 2 //only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
10
-#endif
11
-#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
12
-
13
-//// Heating sanity check:
14
-// This waits for the watch period in milliseconds whenever an M104 or M109 increases the target temperature
15
-// If the temperature has not increased at the end of that period, the target temperature is set to zero.
16
-// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
17
-//  differ by at least 2x WATCH_TEMP_INCREASE
18
-//#define WATCH_TEMP_PERIOD 40000 //40 seconds
19
-//#define WATCH_TEMP_INCREASE 10  //Heat up at least 10 degree in 20 seconds
20
-
21
-#ifdef PIDTEMP
22
-  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
23
-  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
24
-  #define PID_ADD_EXTRUSION_RATE
25
-  #ifdef PID_ADD_EXTRUSION_RATE
26
-    #define  DEFAULT_Kc (1) //heating power=Kc*(e_speed)
27
-  #endif
28
-#endif
29
-
30
-
31
-//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
32
-//The maximum buffered steps/sec of the extruder motor are called "se".
33
-//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
34
-// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
35
-// you exit the value by any M109 without F*
36
-// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
37
-// on an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
38
-#define AUTOTEMP
39
-#ifdef AUTOTEMP
40
-  #define AUTOTEMP_OLDWEIGHT 0.98
41
-#endif
42
-
43
-//Show Temperature ADC value
44
-//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
45
-//#define SHOW_TEMP_ADC_VALUES
46
-
47
-//  extruder run-out prevention.
48
-//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
49
-//#define EXTRUDER_RUNOUT_PREVENT
50
-#define EXTRUDER_RUNOUT_MINTEMP 190
51
-#define EXTRUDER_RUNOUT_SECONDS 30.
52
-#define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
53
-#define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
54
-#define EXTRUDER_RUNOUT_EXTRUDE 100
55
-
56
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
57
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
58
-#define TEMP_SENSOR_AD595_OFFSET 0.0
59
-#define TEMP_SENSOR_AD595_GAIN   1.0
60
-
61
-//This is for controlling a fan to cool down the stepper drivers
62
-//it will turn on when any driver is enabled
63
-//and turn off after the set amount of seconds from last driver being disabled again
64
-#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
65
-#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
66
-#define CONTROLLERFAN_SPEED 255  // == full speed
67
-
68
-// When first starting the main fan, run it at full speed for the
69
-// given number of milliseconds.  This gets the fan spinning reliably
70
-// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
71
-//#define FAN_KICKSTART_TIME 100
72
-
73
-// Extruder cooling fans
74
-// Configure fan pin outputs to automatically turn on/off when the associated
75
-// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
76
-// Multiple extruders can be assigned to the same pin in which case
77
-// the fan will turn on when any selected extruder is above the threshold.
78
-#define EXTRUDER_0_AUTO_FAN_PIN -1
79
-#define EXTRUDER_1_AUTO_FAN_PIN -1
80
-#define EXTRUDER_2_AUTO_FAN_PIN -1
81
-#define EXTRUDER_3_AUTO_FAN_PIN -1
82
-#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
83
-#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
84
-
85
-
86
-//===========================================================================
87
-//=============================Mechanical Settings===========================
88
-//===========================================================================
89
-
90
-//#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91
-
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140
-//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141
-
142
-// A single Z stepper driver is usually used to drive 2 stepper motors.
143
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
144
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
145
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
146
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147
-//#define Z_DUAL_STEPPER_DRIVERS
148
-
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154
-// Same again but for Y Axis.
155
-//#define Y_DUAL_STEPPER_DRIVERS
156
-
157
-// Define if the two Y drives need to rotate in opposite directions
158
-#define INVERT_Y2_VS_Y_DIR true
159
-
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169
-// Enable this for dual x-carriage printers.
170
-// A dual x-carriage design has the advantage that the inactive extruder can be parked which
171
-// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
172
-// allowing faster printing speeds.
173
-//#define DUAL_X_CARRIAGE
174
-#ifdef DUAL_X_CARRIAGE
175
-// Configuration for second X-carriage
176
-// Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
177
-// the second x-carriage always homes to the maximum endstop.
178
-#define X2_MIN_POS 80     // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
179
-#define X2_MAX_POS 353    // set maximum to the distance between toolheads when both heads are homed
180
-#define X2_HOME_DIR 1     // the second X-carriage always homes to the maximum endstop position
181
-#define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
182
-    // However: In this mode the EXTRUDER_OFFSET_X value for the second extruder provides a software
183
-    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
184
-    // without modifying the firmware (through the "M218 T1 X???" command).
185
-    // Remember: you should set the second extruder x-offset to 0 in your slicer.
186
-
187
-// Pins for second x-carriage stepper driver (defined here to avoid further complicating pins.h)
188
-#define X2_ENABLE_PIN 29
189
-#define X2_STEP_PIN 25
190
-#define X2_DIR_PIN 23
191
-
192
-// There are a few selectable movement modes for dual x-carriages using M605 S<mode>
193
-//    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
194
-//                           as long as it supports dual x-carriages. (M605 S0)
195
-//    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
196
-//                           that additional slicer support is not required. (M605 S1)
197
-//    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
198
-//                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
199
-//                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
200
-
201
-// This is the default power-up mode which can be later using M605.
202
-#define DEFAULT_DUAL_X_CARRIAGE_MODE 0
203
-
204
-// Default settings in "Auto-park Mode"
205
-#define TOOLCHANGE_PARK_ZLIFT   0.2      // the distance to raise Z axis when parking an extruder
206
-#define TOOLCHANGE_UNPARK_ZLIFT 1        // the distance to raise Z axis when unparking an extruder
207
-
208
-// Default x offset in duplication mode (typically set to half print bed width)
209
-#define DEFAULT_DUPLICATION_X_OFFSET 100
210
-
211
-#endif //DUAL_X_CARRIAGE
212
-
213
-//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
214
-#define X_HOME_RETRACT_MM 5
215
-#define Y_HOME_RETRACT_MM 5
216
-#define Z_HOME_RETRACT_MM 2
217
-#define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
218
-//#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
219
-
220
-#define AXIS_RELATIVE_MODES {false, false, false, false}
221
-#ifdef CONFIG_STEPPERS_TOSHIBA
222
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
223
-#else
224
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
225
-#endif
226
-//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
227
-#define INVERT_X_STEP_PIN false
228
-#define INVERT_Y_STEP_PIN false
229
-#define INVERT_Z_STEP_PIN false
230
-#define INVERT_E_STEP_PIN false
231
-
232
-//default stepper release if idle. Set to 0 to deactivate.
233
-#define DEFAULT_STEPPER_DEACTIVE_TIME 60
234
-
235
-#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
236
-#define DEFAULT_MINTRAVELFEEDRATE     0.0
237
-
238
-// Feedrates for manual moves along X, Y, Z, E from panel
239
-#ifdef ULTIPANEL
240
-#define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60}  // set the speeds for manual moves (mm/min)
241
-#endif
242
-
243
-//Comment to disable setting feedrate multiplier via encoder
244
-#ifdef ULTIPANEL
245
-    #define ULTIPANEL_FEEDMULTIPLY
246
-#endif
247
-
248
-// minimum time in microseconds that a movement needs to take if the buffer is emptied.
249
-#define DEFAULT_MINSEGMENTTIME        20000
250
-
251
-// If defined the movements slow down when the look ahead buffer is only half full
252
-#define SLOWDOWN
253
-
254
-// Frequency limit
255
-// See nophead's blog for more info
256
-// Not working O
257
-//#define XY_FREQUENCY_LIMIT  15
258
-
259
-// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
260
-// of the buffer and all stops. This should not be much greater than zero and should only be changed
261
-// if unwanted behavior is observed on a user's machine when running at very slow speeds.
262
-#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263
-
264
-// MS1 MS2 Stepper Driver Microstepping mode table
265
-#define MICROSTEP1 LOW,LOW
266
-#define MICROSTEP2 HIGH,LOW
267
-#define MICROSTEP4 LOW,HIGH
268
-#define MICROSTEP8 HIGH,HIGH
269
-#define MICROSTEP16 HIGH,HIGH
270
-
271
-// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273
-
274
-// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
275
-#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
276
-
277
-// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro
278
-//#define DIGIPOT_I2C
279
-// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
280
-#define DIGIPOT_I2C_NUM_CHANNELS 8
281
-// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
282
-#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
283
-
284
-//===========================================================================
285
-//=============================Additional Features===========================
286
-//===========================================================================
287
-
288
-#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
289
-#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
290
-#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
291
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
292
-
293
-//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
294
-#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
295
-
296
-#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
297
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
298
-
299
-#define SDCARD_RATHERRECENTFIRST  //reverse file order of sd card menu display. Its sorted practically after the file system block order.
300
-// if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that.
301
-// using:
302
-#define MENU_ADDAUTOSTART
303
-
304
-// Show a progress bar on HD44780 LCDs for SD printing
305
-//#define LCD_PROGRESS_BAR
306
-
307
-#ifdef LCD_PROGRESS_BAR
308
-  // Amount of time (ms) to show the bar
309
-  #define PROGRESS_BAR_BAR_TIME 2000
310
-  // Amount of time (ms) to show the status message
311
-  #define PROGRESS_BAR_MSG_TIME 3000
312
-  // Amount of time (ms) to retain the status message (0=forever)
313
-  #define PROGRESS_MSG_EXPIRE   0
314
-  // Enable this to show messages for MSG_TIME then hide them
315
-  //#define PROGRESS_MSG_ONCE
316
-  #ifdef DOGLCD
317
-    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
318
-  #endif
319
-  #ifdef FILAMENT_LCD_DISPLAY
320
-    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
321
-  #endif
322
-#endif
323
-
324
-// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
325
-//#define USE_WATCHDOG
326
-
327
-#ifdef USE_WATCHDOG
328
-// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
329
-// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
330
-//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
331
-//#define WATCHDOG_RESET_MANUAL
332
-#endif
333
-
334
-// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
335
-//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
336
-
337
-// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
338
-// it can e.g. be used to change z-positions in the print startup phase in real-time
339
-// does not respect endstops!
340
-//#define BABYSTEPPING
341
-#ifdef BABYSTEPPING
342
-  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
343
-  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
344
-  #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
345
-
346
-  #ifdef COREXY
347
-    #error BABYSTEPPING not implemented for COREXY yet.
348
-  #endif
349
-
350
-  #ifdef DELTA
351
-    #ifdef BABYSTEP_XY
352
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
353
-    #endif
354
-  #endif
355
-#endif
356
-
357
-// extruder advance constant (s2/mm3)
358
-//
359
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
360
-//
361
-// Hooke's law says:		force = k * distance
362
-// Bernoulli's principle says:	v ^ 2 / 2 + g . h + pressure / density = constant
363
-// so: v ^ 2 is proportional to number of steps we advance the extruder
364
-//#define ADVANCE
365
-
366
-#ifdef ADVANCE
367
-  #define EXTRUDER_ADVANCE_K .0
368
-
369
-  #define D_FILAMENT 1.75
370
-  #define STEPS_MM_E 100.47095761381482
371
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
372
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
373
-
374
-#endif // ADVANCE
375
-
376
-// Arc interpretation settings:
377
-#define MM_PER_ARC_SEGMENT 1
378
-#define N_ARC_CORRECTION 25
379
-
380
-const unsigned int dropsegments=5; //everything with less than this number of steps will be ignored as move and joined with the next movement
381
-
382
-// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
383
-// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
384
-// in the pins.h file.  When using a push button pulling the pin to ground this will need inverted.  This setting should
385
-// be commented out otherwise
386
-#define SDCARDDETECTINVERTED
387
-
388
-#ifdef ULTIPANEL
389
- #undef SDCARDDETECTINVERTED
390
-#endif
391
-
392
-// Power Signal Control Definitions
393
-// By default use ATX definition
394
-#ifndef POWER_SUPPLY
395
-  #define POWER_SUPPLY 1
396
-#endif
397
-// 1 = ATX
398
-#if (POWER_SUPPLY == 1)
399
-  #define PS_ON_AWAKE  LOW
400
-  #define PS_ON_ASLEEP HIGH
401
-#endif
402
-// 2 = X-Box 360 203W
403
-#if (POWER_SUPPLY == 2)
404
-  #define PS_ON_AWAKE  HIGH
405
-  #define PS_ON_ASLEEP LOW
406
-#endif
407
-
408
-// Control heater 0 and heater 1 in parallel.
409
-//#define HEATERS_PARALLEL
410
-
411
-//===========================================================================
412
-//=============================Buffers           ============================
413
-//===========================================================================
414
-
415
-// The number of linear motions that can be in the plan at any give time.
416
-// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering.
417
-#if defined SDSUPPORT
418
-  #define BLOCK_BUFFER_SIZE 16   // SD,LCD,Buttons take more memory, block buffer needs to be smaller
419
-#else
420
-  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
421
-#endif
422
-
423
-
424
-//The ASCII buffer for receiving from the serial:
425
-#define MAX_CMD_SIZE 96
426
-#define BUFSIZE 5
427
-
428
-
429
-// Firmware based and LCD controlled retract
430
-// M207 and M208 can be used to define parameters for the retraction.
431
-// The retraction can be called by the slicer using G10 and G11
432
-// until then, intended retractions can be detected by moves that only extrude and the direction.
433
-// the moves are than replaced by the firmware controlled ones.
434
-
435
-// #define FWRETRACT  //ONLY PARTIALLY TESTED
436
-#ifdef FWRETRACT
437
-  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
438
-  #define RETRACT_LENGTH 3               //default retract length (positive mm)
439
-  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
440
-  #define RETRACT_FEEDRATE 80*60            //default feedrate for retracting (mm/s)
441
-  #define RETRACT_ZLIFT 0                //default retract Z-lift
442
-  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
443
-  //#define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
444
-  #define RETRACT_RECOVER_FEEDRATE 8*60     //default feedrate for recovering from retraction (mm/s)
445
-#endif
446
-
447
-//adds support for experimental filament exchange support M600; requires display
448
-#ifdef ULTIPANEL
449
-  #define FILAMENTCHANGEENABLE
450
-  #ifdef FILAMENTCHANGEENABLE
451
-    #define FILAMENTCHANGE_XPOS 3
452
-    #define FILAMENTCHANGE_YPOS 3
453
-    #define FILAMENTCHANGE_ZADD 10
454
-    #define FILAMENTCHANGE_FIRSTRETRACT -2
455
-    #define FILAMENTCHANGE_FINALRETRACT -100
456
-  #endif
457
-#endif
458
-
459
-#ifdef FILAMENTCHANGEENABLE
460
-  #ifdef EXTRUDER_RUNOUT_PREVENT
461
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
-  #endif
463
-#endif
464
-
465
-//===========================================================================
466
-//=============================  Define Defines  ============================
467
-//===========================================================================
468
-
469
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
470
-  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
471
-#endif
472
-
473
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
474
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
475
-#endif
476
-
477
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
478
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
479
-#endif
480
-
481
-#if TEMP_SENSOR_0 > 0
482
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
483
-  #define HEATER_0_USES_THERMISTOR
484
-#endif
485
-#if TEMP_SENSOR_1 > 0
486
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
487
-  #define HEATER_1_USES_THERMISTOR
488
-#endif
489
-#if TEMP_SENSOR_2 > 0
490
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
491
-  #define HEATER_2_USES_THERMISTOR
492
-#endif
493
-#if TEMP_SENSOR_3 > 0
494
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
495
-  #define HEATER_3_USES_THERMISTOR
496
-#endif
497
-#if TEMP_SENSOR_BED > 0
498
-  #define THERMISTORBED TEMP_SENSOR_BED
499
-  #define BED_USES_THERMISTOR
500
-#endif
501
-#if TEMP_SENSOR_0 == -1
502
-  #define HEATER_0_USES_AD595
503
-#endif
504
-#if TEMP_SENSOR_1 == -1
505
-  #define HEATER_1_USES_AD595
506
-#endif
507
-#if TEMP_SENSOR_2 == -1
508
-  #define HEATER_2_USES_AD595
509
-#endif
510
-#if TEMP_SENSOR_3 == -1
511
-  #define HEATER_3_USES_AD595
512
-#endif
513
-#if TEMP_SENSOR_BED == -1
514
-  #define BED_USES_AD595
515
-#endif
516
-#if TEMP_SENSOR_0 == -2
517
-  #define HEATER_0_USES_MAX6675
518
-#endif
519
-#if TEMP_SENSOR_0 == 0
520
-  #undef HEATER_0_MINTEMP
521
-  #undef HEATER_0_MAXTEMP
522
-#endif
523
-#if TEMP_SENSOR_1 == 0
524
-  #undef HEATER_1_MINTEMP
525
-  #undef HEATER_1_MAXTEMP
526
-#endif
527
-#if TEMP_SENSOR_2 == 0
528
-  #undef HEATER_2_MINTEMP
529
-  #undef HEATER_2_MAXTEMP
530
-#endif
531
-#if TEMP_SENSOR_3 == 0
532
-  #undef HEATER_3_MINTEMP
533
-  #undef HEATER_3_MAXTEMP
534
-#endif
535
-#if TEMP_SENSOR_BED == 0
536
-  #undef BED_MINTEMP
537
-  #undef BED_MAXTEMP
538
-#endif
539
-
540
-
541
-#endif //__CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/K8200/Configuration.h View File

@@ -325,15 +325,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
325 325
   #define ENDSTOPPULLUP_ZMIN
326 326
 #endif
327 327
 
328
-#ifdef ENDSTOPPULLUPS
329
-  // #define ENDSTOPPULLUP_XMAX
330
-  // #define ENDSTOPPULLUP_YMAX
331
-  // #define ENDSTOPPULLUP_ZMAX
332
-  #define ENDSTOPPULLUP_XMIN
333
-  #define ENDSTOPPULLUP_YMIN
334
-  #define ENDSTOPPULLUP_ZMIN
335
-#endif
336
-
337 328
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
338 329
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
339 330
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -382,10 +373,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
382 373
 #define Z_MAX_POS 200
383 374
 #define Z_MIN_POS 0
384 375
 
385
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
386
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
387
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
388
-
376
+//===========================================================================
377
+//============================= Filament Runout Sensor ======================
378
+//===========================================================================
379
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
380
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
381
+                                 // It is assumed that when logic high = filament available
382
+                                 //                    when logic  low = filament ran out
383
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
384
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
389 385
 
390 386
 //===========================================================================
391 387
 //============================= Bed Auto Leveling ===========================
@@ -622,112 +618,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
622 618
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
623 619
 //#define RA_CONTROL_PANEL
624 620
 
625
-//automatic expansion
626
-#if defined (MAKRPANEL)
627
- #define DOGLCD
628
- #define SDSUPPORT
629
- #define ULTIPANEL
630
- #define NEWPANEL
631
- #define DEFAULT_LCD_CONTRAST 17
632
-#endif
633
-
634
-#if defined(miniVIKI) || defined(VIKI2)
635
- #define ULTRA_LCD  //general LCD support, also 16x2
636
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
637
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
638
- 
639
-  #ifdef miniVIKI
640
-   #define DEFAULT_LCD_CONTRAST 95
641
-  #else
642
-   #define DEFAULT_LCD_CONTRAST 40
643
-  #endif
644
-  
645
- #define ENCODER_PULSES_PER_STEP 4
646
- #define ENCODER_STEPS_PER_MENU_ITEM 1
647
-#endif
648
-
649
-#if defined (PANEL_ONE)
650
- #define SDSUPPORT
651
- #define ULTIMAKERCONTROLLER
652
-#endif
653
-
654
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
655
- #define DOGLCD
656
- #define U8GLIB_ST7920
657
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
658
-#endif
659
-
660
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
661
- #define ULTIPANEL
662
- #define NEWPANEL
663
-#endif
664
-
665
-#if defined(REPRAPWORLD_KEYPAD)
666
-  #define NEWPANEL
667
-  #define ULTIPANEL
668
-#endif
669
-#if defined(RA_CONTROL_PANEL)
670
- #define ULTIPANEL
671
- #define NEWPANEL
672
- #define LCD_I2C_TYPE_PCA8574
673
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
674
-#endif
675
-
676
-//I2C PANELS
621
+/**
622
+ * I2C Panels
623
+ */
677 624
 
678 625
 //#define LCD_I2C_SAINSMART_YWROBOT
679
-#ifdef LCD_I2C_SAINSMART_YWROBOT
680
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
681
-  // Make sure it is placed in the Arduino libraries directory.
682
-  #define LCD_I2C_TYPE_PCF8575
683
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
684
-  #define NEWPANEL
685
-  #define ULTIPANEL
686
-#endif
687 626
 
688 627
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
689 628
 //#define LCD_I2C_PANELOLU2
690
-#ifdef LCD_I2C_PANELOLU2
691
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
692
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
693
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
694
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
695
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
696
-  #define LCD_I2C_TYPE_MCP23017
697
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
698
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
699
-  #define NEWPANEL
700
-  #define ULTIPANEL
701
-
702
-  #ifndef ENCODER_PULSES_PER_STEP
703
-	#define ENCODER_PULSES_PER_STEP 4
704
-  #endif
705
-
706
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
707
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
708
-  #endif
709
-
710
-
711
-  #ifdef LCD_USE_I2C_BUZZER
712
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
713
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
714
-  #endif
715
-
716
-#endif
717 629
 
718 630
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
719 631
 //#define LCD_I2C_VIKI
720
-#ifdef LCD_I2C_VIKI
721
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
722
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
723
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
724
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
725
-  #define LCD_I2C_TYPE_MCP23017
726
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
727
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
728
-  #define NEWPANEL
729
-  #define ULTIPANEL
730
-#endif
731 632
 
732 633
 // Shift register panels
733 634
 // ---------------------
@@ -735,51 +636,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
735 636
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
736 637
 
737 638
 //#define SAV_3DLCD
738
-#ifdef SAV_3DLCD
739
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
740
-   #define NEWPANEL
741
-   #define ULTIPANEL
742
-#endif
743
-
744
-
745
-#ifdef ULTIPANEL
746
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
747
-  #define SDSUPPORT
748
-  #define ULTRA_LCD
749
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
750
-    #define LCD_WIDTH 22
751
-    #define LCD_HEIGHT 5
752
-  #else
753
-    #define LCD_WIDTH 20
754
-    #define LCD_HEIGHT 4
755
-  #endif
756
-#else //no panel but just LCD
757
-  #ifdef ULTRA_LCD
758
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
759
-    #define LCD_WIDTH 22
760
-    #define LCD_HEIGHT 5
761
-  #else
762
-    #define LCD_WIDTH 16
763
-    #define LCD_HEIGHT 2
764
-  #endif
765
-  #endif
766
-#endif
767
-
768
-// default LCD contrast for dogm-like LCD displays
769
-#ifdef DOGLCD
770
-# ifndef DEFAULT_LCD_CONTRAST
771
-#  define DEFAULT_LCD_CONTRAST 32
772
-# endif
773
-#endif
774 639
 
775 640
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
776 641
 //#define FAST_PWM_FAN
777 642
 
778
-// Temperature status LEDs that display the hotend and bet temperature.
779
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
780
-// Otherwise the RED led is on. There is 1C hysteresis.
781
-//#define TEMP_STAT_LEDS
782
-
783 643
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
784 644
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
785 645
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -791,6 +651,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
791 651
 // at zero value, there are 128 effective control positions.
792 652
 #define SOFT_PWM_SCALE 0
793 653
 
654
+// Temperature status LEDs that display the hotend and bet temperature.
655
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
656
+// Otherwise the RED led is on. There is 1C hysteresis.
657
+//#define TEMP_STAT_LEDS
658
+
794 659
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
795 660
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
796 661
 // #define PHOTOGRAPH_PIN     23
@@ -860,6 +725,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
860 725
 
861 726
 
862 727
 #include "Configuration_adv.h"
728
+#include "Conditionals.h"
729
+#include "SanityCheck.h"
863 730
 #include "thermistortables.h"
864 731
 
865
-#endif //__CONFIGURATION_H
732
+#endif //CONFIGURATION_H

+ 4
- 199
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers.
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -218,11 +156,7 @@
218 156
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
219 157
 
220 158
 #define AXIS_RELATIVE_MODES {false, false, false, false}
221
-#ifdef CONFIG_STEPPERS_TOSHIBA
222
-#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
223
-#else
224
-#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
225
-#endif
159
+
226 160
 //By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
227 161
 #define INVERT_X_STEP_PIN false
228 162
 #define INVERT_Y_STEP_PIN false
@@ -237,12 +171,12 @@
237 171
 
238 172
 // Feedrates for manual moves along X, Y, Z, E from panel
239 173
 #ifdef ULTIPANEL
240
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
174
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
241 175
 #endif
242 176
 
243 177
 //Comment to disable setting feedrate multiplier via encoder
244 178
 #ifdef ULTIPANEL
245
-    #define ULTIPANEL_FEEDMULTIPLY
179
+  #define ULTIPANEL_FEEDMULTIPLY
246 180
 #endif
247 181
 
248 182
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -261,13 +195,6 @@
261 195
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
262 196
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263 197
 
264
-// MS1 MS2 Stepper Driver Microstepping mode table
265
-#define MICROSTEP1 LOW,LOW
266
-#define MICROSTEP2 HIGH,LOW
267
-#define MICROSTEP4 LOW,HIGH
268
-#define MICROSTEP8 HIGH,HIGH
269
-#define MICROSTEP16 HIGH,HIGH
270
-
271 198
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272 199
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273 200
 
@@ -313,12 +240,6 @@
313 240
   #define PROGRESS_MSG_EXPIRE   0
314 241
   // Enable this to show messages for MSG_TIME then hide them
315 242
   //#define PROGRESS_MSG_ONCE
316
-  #ifdef DOGLCD
317
-    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
318
-  #endif
319
-  #ifdef FILAMENT_LCD_DISPLAY
320
-    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
321
-  #endif
322 243
 #endif
323 244
 
324 245
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
@@ -342,16 +263,6 @@
342 263
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
343 264
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
344 265
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
345
-
346
-  #ifdef COREXY
347
-    #error BABYSTEPPING not implemented for COREXY yet.
348
-  #endif
349
-
350
-  #ifdef DELTA
351
-    #ifdef BABYSTEP_XY
352
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
353
-    #endif
354
-  #endif
355 266
 #endif
356 267
 
357 268
 // extruder advance constant (s2/mm3)
@@ -365,12 +276,8 @@
365 276
 
366 277
 #ifdef ADVANCE
367 278
   #define EXTRUDER_ADVANCE_K .0
368
-
369 279
   #define D_FILAMENT 2.85
370 280
   #define STEPS_MM_E 836
371
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
372
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
373
-
374 281
 #endif // ADVANCE
375 282
 
376 283
 // Arc interpretation settings:
@@ -385,26 +292,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
385 292
 // be commented out otherwise
386 293
 #define SDCARDDETECTINVERTED
387 294
 
388
-#ifdef ULTIPANEL
389
- #undef SDCARDDETECTINVERTED
390
-#endif
391
-
392
-// Power Signal Control Definitions
393
-// By default use ATX definition
394
-#ifndef POWER_SUPPLY
395
-  #define POWER_SUPPLY 1
396
-#endif
397
-// 1 = ATX
398
-#if (POWER_SUPPLY == 1)
399
-  #define PS_ON_AWAKE  LOW
400
-  #define PS_ON_ASLEEP HIGH
401
-#endif
402
-// 2 = X-Box 360 203W
403
-#if (POWER_SUPPLY == 2)
404
-  #define PS_ON_AWAKE  HIGH
405
-  #define PS_ON_ASLEEP LOW
406
-#endif
407
-
408 295
 // Control heater 0 and heater 1 in parallel.
409 296
 //#define HEATERS_PARALLEL
410 297
 
@@ -456,86 +343,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
456 343
   #endif
457 344
 #endif
458 345
 
459
-#ifdef FILAMENTCHANGEENABLE
460
-  #ifdef EXTRUDER_RUNOUT_PREVENT
461
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
-  #endif
463
-#endif
464
-
465
-//===========================================================================
466
-//=============================  Define Defines  ============================
467
-//===========================================================================
468
-
469
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
470
-  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
471
-#endif
472
-
473
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
474
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
475
-#endif
476
-
477
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
478
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
479
-#endif
480
-
481
-#if TEMP_SENSOR_0 > 0
482
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
483
-  #define HEATER_0_USES_THERMISTOR
484
-#endif
485
-#if TEMP_SENSOR_1 > 0
486
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
487
-  #define HEATER_1_USES_THERMISTOR
488
-#endif
489
-#if TEMP_SENSOR_2 > 0
490
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
491
-  #define HEATER_2_USES_THERMISTOR
492
-#endif
493
-#if TEMP_SENSOR_3 > 0
494
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
495
-  #define HEATER_3_USES_THERMISTOR
496
-#endif
497
-#if TEMP_SENSOR_BED > 0
498
-  #define THERMISTORBED TEMP_SENSOR_BED
499
-  #define BED_USES_THERMISTOR
500
-#endif
501
-#if TEMP_SENSOR_0 == -1
502
-  #define HEATER_0_USES_AD595
503
-#endif
504
-#if TEMP_SENSOR_1 == -1
505
-  #define HEATER_1_USES_AD595
506
-#endif
507
-#if TEMP_SENSOR_2 == -1
508
-  #define HEATER_2_USES_AD595
509
-#endif
510
-#if TEMP_SENSOR_3 == -1
511
-  #define HEATER_3_USES_AD595
512
-#endif
513
-#if TEMP_SENSOR_BED == -1
514
-  #define BED_USES_AD595
515
-#endif
516
-#if TEMP_SENSOR_0 == -2
517
-  #define HEATER_0_USES_MAX6675
518
-#endif
519
-#if TEMP_SENSOR_0 == 0
520
-  #undef HEATER_0_MINTEMP
521
-  #undef HEATER_0_MAXTEMP
522
-#endif
523
-#if TEMP_SENSOR_1 == 0
524
-  #undef HEATER_1_MINTEMP
525
-  #undef HEATER_1_MAXTEMP
526
-#endif
527
-#if TEMP_SENSOR_2 == 0
528
-  #undef HEATER_2_MINTEMP
529
-  #undef HEATER_2_MAXTEMP
530
-#endif
531
-#if TEMP_SENSOR_3 == 0
532
-  #undef HEATER_3_MINTEMP
533
-  #undef HEATER_3_MAXTEMP
534
-#endif
535
-#if TEMP_SENSOR_BED == 0
536
-  #undef BED_MINTEMP
537
-  #undef BED_MAXTEMP
538
-#endif
539
-
540
-
541
-#endif //__CONFIGURATION_ADV_H
346
+#endif //CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -349,15 +349,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
349 349
   // #define ENDSTOPPULLUP_ZMIN
350 350
 #endif
351 351
 
352
-#ifdef ENDSTOPPULLUPS
353
-  #define ENDSTOPPULLUP_XMAX
354
-  #define ENDSTOPPULLUP_YMAX
355
-  #define ENDSTOPPULLUP_ZMAX
356
-  #define ENDSTOPPULLUP_XMIN
357
-  #define ENDSTOPPULLUP_YMIN
358
-  #define ENDSTOPPULLUP_ZMIN
359
-#endif
360
-
361 352
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
362 353
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
363 354
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -406,10 +397,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
406 397
 #define Z_MAX_POS 225
407 398
 #define Z_MIN_POS MANUAL_Z_HOME_POS
408 399
 
409
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
410
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
411
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
412
-
400
+//===========================================================================
401
+//============================= Filament Runout Sensor ======================
402
+//===========================================================================
403
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
404
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
405
+                                 // It is assumed that when logic high = filament available
406
+                                 //                    when logic  low = filament ran out
407
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
408
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
413 409
 
414 410
 //===========================================================================
415 411
 //============================= Bed Auto Leveling ===========================
@@ -648,112 +644,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
648 644
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
649 645
 //#define RA_CONTROL_PANEL
650 646
 
651
-//automatic expansion
652
-#if defined (MAKRPANEL)
653
- #define DOGLCD
654
- #define SDSUPPORT
655
- #define ULTIPANEL
656
- #define NEWPANEL
657
- #define DEFAULT_LCD_CONTRAST 17
658
-#endif
659
-
660
-#if defined(miniVIKI) || defined(VIKI2)
661
- #define ULTRA_LCD  //general LCD support, also 16x2
662
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
663
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
664
- 
665
-  #ifdef miniVIKI
666
-   #define DEFAULT_LCD_CONTRAST 95
667
-  #else
668
-   #define DEFAULT_LCD_CONTRAST 40
669
-  #endif
670
-  
671
- #define ENCODER_PULSES_PER_STEP 4
672
- #define ENCODER_STEPS_PER_MENU_ITEM 1
673
-#endif
674
-
675
-#if defined (PANEL_ONE)
676
- #define SDSUPPORT
677
- #define ULTIMAKERCONTROLLER
678
-#endif
679
-
680
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
681
- #define DOGLCD
682
- #define U8GLIB_ST7920
683
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
684
-#endif
685
-
686
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
687
- #define ULTIPANEL
688
- #define NEWPANEL
689
-#endif
690
-
691
-#if defined(REPRAPWORLD_KEYPAD)
692
-  #define NEWPANEL
693
-  #define ULTIPANEL
694
-#endif
695
-#if defined(RA_CONTROL_PANEL)
696
- #define ULTIPANEL
697
- #define NEWPANEL
698
- #define LCD_I2C_TYPE_PCA8574
699
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
700
-#endif
701
-
702
-//I2C PANELS
647
+/**
648
+ * I2C Panels
649
+ */
703 650
 
704 651
 //#define LCD_I2C_SAINSMART_YWROBOT
705
-#ifdef LCD_I2C_SAINSMART_YWROBOT
706
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
707
-  // Make sure it is placed in the Arduino libraries directory.
708
-  #define LCD_I2C_TYPE_PCF8575
709
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
710
-  #define NEWPANEL
711
-  #define ULTIPANEL
712
-#endif
713 652
 
714 653
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
715 654
 //#define LCD_I2C_PANELOLU2
716
-#ifdef LCD_I2C_PANELOLU2
717
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
718
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
719
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
720
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
721
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
722
-  #define LCD_I2C_TYPE_MCP23017
723
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
724
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
725
-  #define NEWPANEL
726
-  #define ULTIPANEL
727
-
728
-  #ifndef ENCODER_PULSES_PER_STEP
729
-	#define ENCODER_PULSES_PER_STEP 4
730
-  #endif
731
-
732
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
733
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
734
-  #endif
735
-
736
-
737
-  #ifdef LCD_USE_I2C_BUZZER
738
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
739
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
740
-  #endif
741
-
742
-#endif
743 655
 
744 656
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
745 657
 //#define LCD_I2C_VIKI
746
-#ifdef LCD_I2C_VIKI
747
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
748
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
749
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
750
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
751
-  #define LCD_I2C_TYPE_MCP23017
752
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
753
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
754
-  #define NEWPANEL
755
-  #define ULTIPANEL
756
-#endif
757 658
 
758 659
 // Shift register panels
759 660
 // ---------------------
@@ -761,51 +662,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
761 662
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
762 663
 
763 664
 //#define SAV_3DLCD
764
-#ifdef SAV_3DLCD
765
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
766
-   #define NEWPANEL
767
-   #define ULTIPANEL
768
-#endif
769
-
770
-
771
-#ifdef ULTIPANEL
772
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
773
-  #define SDSUPPORT
774
-  #define ULTRA_LCD
775
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
776
-    #define LCD_WIDTH 22
777
-    #define LCD_HEIGHT 5
778
-  #else
779
-    #define LCD_WIDTH 20
780
-    #define LCD_HEIGHT 4
781
-  #endif
782
-#else //no panel but just LCD
783
-  #ifdef ULTRA_LCD
784
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
785
-    #define LCD_WIDTH 22
786
-    #define LCD_HEIGHT 5
787
-  #else
788
-    #define LCD_WIDTH 16
789
-    #define LCD_HEIGHT 2
790
-  #endif
791
-  #endif
792
-#endif
793
-
794
-// default LCD contrast for dogm-like LCD displays
795
-#ifdef DOGLCD
796
-# ifndef DEFAULT_LCD_CONTRAST
797
-#  define DEFAULT_LCD_CONTRAST 32
798
-# endif
799
-#endif
800 665
 
801 666
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
802 667
 //#define FAST_PWM_FAN
803 668
 
804
-// Temperature status LEDs that display the hotend and bet temperature.
805
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
806
-// Otherwise the RED led is on. There is 1C hysteresis.
807
-//#define TEMP_STAT_LEDS
808
-
809 669
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
810 670
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
811 671
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -817,6 +677,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
817 677
 // at zero value, there are 128 effective control positions.
818 678
 #define SOFT_PWM_SCALE 0
819 679
 
680
+// Temperature status LEDs that display the hotend and bet temperature.
681
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
682
+// Otherwise the RED led is on. There is 1C hysteresis.
683
+//#define TEMP_STAT_LEDS
684
+
820 685
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
821 686
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
822 687
 // #define PHOTOGRAPH_PIN     23
@@ -886,6 +751,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
886 751
 
887 752
 
888 753
 #include "Configuration_adv.h"
754
+#include "Conditionals.h"
755
+#include "SanityCheck.h"
889 756
 #include "thermistortables.h"
890 757
 
891
-#endif //__CONFIGURATION_H
758
+#endif //CONFIGURATION_H

+ 4
- 190
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers.
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -216,9 +154,6 @@
216 154
 #define Z_HOME_RETRACT_MM 3
217 155
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
218 156
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
219
-#ifdef SCARA
220
-	#define QUICK_HOME //SCARA needs Quickhome
221
-#endif
222 157
 
223 158
 #define AXIS_RELATIVE_MODES {false, false, false, false}
224 159
 
@@ -238,12 +173,12 @@
238 173
 
239 174
 // Feedrates for manual moves along X, Y, Z, E from panel
240 175
 #ifdef ULTIPANEL
241
-#define MANUAL_FEEDRATE {50*60, 50*60, 10*60, 60}  // set the speeds for manual moves (mm/min)
176
+  #define MANUAL_FEEDRATE {50*60, 50*60, 10*60, 60}  // set the speeds for manual moves (mm/min)
242 177
 #endif
243 178
 
244 179
 //Comment to disable setting feedrate multiplier via encoder
245 180
 #ifdef ULTIPANEL
246
-    #define ULTIPANEL_FEEDMULTIPLY
181
+  #define ULTIPANEL_FEEDMULTIPLY
247 182
 #endif
248 183
 
249 184
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -251,9 +186,7 @@
251 186
 
252 187
 // If defined the movements slow down when the look ahead buffer is only half full
253 188
 //#define SLOWDOWN
254
-#ifdef SCARA
255
- #undef SLOWDOWN
256
-#endif
189
+
257 190
 // Frequency limit
258 191
 // See nophead's blog for more info
259 192
 // Not working O
@@ -264,13 +197,6 @@
264 197
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
265 198
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
266 199
 
267
-// MS1 MS2 Stepper Driver Microstepping mode table
268
-#define MICROSTEP1 LOW,LOW
269
-#define MICROSTEP2 HIGH,LOW
270
-#define MICROSTEP4 LOW,HIGH
271
-#define MICROSTEP8 HIGH,HIGH
272
-#define MICROSTEP16 HIGH,HIGH
273
-
274 200
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
275 201
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
276 202
 
@@ -339,21 +265,6 @@
339 265
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
340 266
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
341 267
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
342
-
343
-  #ifdef COREXY
344
-    #error BABYSTEPPING not implemented for COREXY yet.
345
-  #endif
346
-
347
-  #ifdef DELTA
348
-    #ifdef BABYSTEP_XY
349
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
350
-    #endif
351
-  #endif
352
-  
353
-  #ifdef SCARA
354
-    #error BABYSTEPPING not implemented for SCARA yet.
355
-  #endif
356
-  
357 268
 #endif
358 269
 
359 270
 // extruder advance constant (s2/mm3)
@@ -387,26 +298,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
387 298
 // be commented out otherwise
388 299
 #define SDCARDDETECTINVERTED
389 300
 
390
-#ifdef ULTIPANEL
391
- #undef SDCARDDETECTINVERTED
392
-#endif
393
-
394
-// Power Signal Control Definitions
395
-// By default use ATX definition
396
-#ifndef POWER_SUPPLY
397
-  #define POWER_SUPPLY 1
398
-#endif
399
-// 1 = ATX
400
-#if (POWER_SUPPLY == 1)
401
-  #define PS_ON_AWAKE  LOW
402
-  #define PS_ON_ASLEEP HIGH
403
-#endif
404
-// 2 = X-Box 360 203W
405
-#if (POWER_SUPPLY == 2)
406
-  #define PS_ON_AWAKE  HIGH
407
-  #define PS_ON_ASLEEP LOW
408
-#endif
409
-
410 301
 // Control heater 0 and heater 1 in parallel.
411 302
 //#define HEATERS_PARALLEL
412 303
 
@@ -456,81 +347,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
456 347
   #endif
457 348
 #endif
458 349
 
459
-#ifdef FILAMENTCHANGEENABLE
460
-  #ifdef EXTRUDER_RUNOUT_PREVENT
461
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
-  #endif
463
-#endif
464
-
465
-//===========================================================================
466
-//=============================  Define Defines  ============================
467
-//===========================================================================
468
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
469
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
470
-#endif
471
-
472
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
473
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
474
-#endif
475
-
476
-#if TEMP_SENSOR_0 > 0
477
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
478
-  #define HEATER_0_USES_THERMISTOR
479
-#endif
480
-#if TEMP_SENSOR_1 > 0
481
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
482
-  #define HEATER_1_USES_THERMISTOR
483
-#endif
484
-#if TEMP_SENSOR_2 > 0
485
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
486
-  #define HEATER_2_USES_THERMISTOR
487
-#endif
488
-#if TEMP_SENSOR_3 > 0
489
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
490
-  #define HEATER_3_USES_THERMISTOR
491
-#endif
492
-#if TEMP_SENSOR_BED > 0
493
-  #define THERMISTORBED TEMP_SENSOR_BED
494
-  #define BED_USES_THERMISTOR
495
-#endif
496
-#if TEMP_SENSOR_0 == -1
497
-  #define HEATER_0_USES_AD595
498
-#endif
499
-#if TEMP_SENSOR_1 == -1
500
-  #define HEATER_1_USES_AD595
501
-#endif
502
-#if TEMP_SENSOR_2 == -1
503
-  #define HEATER_2_USES_AD595
504
-#endif
505
-#if TEMP_SENSOR_3 == -1
506
-  #define HEATER_3_USES_AD595
507
-#endif
508
-#if TEMP_SENSOR_BED == -1
509
-  #define BED_USES_AD595
510
-#endif
511
-#if TEMP_SENSOR_0 == -2
512
-  #define HEATER_0_USES_MAX6675
513
-#endif
514
-#if TEMP_SENSOR_0 == 0
515
-  #undef HEATER_0_MINTEMP
516
-  #undef HEATER_0_MAXTEMP
517
-#endif
518
-#if TEMP_SENSOR_1 == 0
519
-  #undef HEATER_1_MINTEMP
520
-  #undef HEATER_1_MAXTEMP
521
-#endif
522
-#if TEMP_SENSOR_2 == 0
523
-  #undef HEATER_2_MINTEMP
524
-  #undef HEATER_2_MAXTEMP
525
-#endif
526
-#if TEMP_SENSOR_3 == 0
527
-  #undef HEATER_3_MINTEMP
528
-  #undef HEATER_3_MAXTEMP
529
-#endif
530
-#if TEMP_SENSOR_BED == 0
531
-  #undef BED_MINTEMP
532
-  #undef BED_MAXTEMP
533
-#endif
534
-
535
-
536
-#endif //__CONFIGURATION_ADV_H
350
+#endif //CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -319,15 +319,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
319 319
   // #define ENDSTOPPULLUP_ZMIN
320 320
 #endif
321 321
 
322
-#ifdef ENDSTOPPULLUPS
323
-  #define ENDSTOPPULLUP_XMAX
324
-  #define ENDSTOPPULLUP_YMAX
325
-  #define ENDSTOPPULLUP_ZMAX
326
-  #define ENDSTOPPULLUP_XMIN
327
-  #define ENDSTOPPULLUP_YMIN
328
-  #define ENDSTOPPULLUP_ZMIN
329
-#endif
330
-
331 322
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
332 323
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
333 324
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -376,10 +367,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
376 367
 #define Z_MAX_POS 200
377 368
 #define Z_MIN_POS 0
378 369
 
379
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
380
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
381
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
382
-
370
+//===========================================================================
371
+//============================= Filament Runout Sensor ======================
372
+//===========================================================================
373
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
374
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
375
+                                 // It is assumed that when logic high = filament available
376
+                                 //                    when logic  low = filament ran out
377
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
378
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
383 379
 
384 380
 //===========================================================================
385 381
 //============================= Bed Auto Leveling ===========================
@@ -615,112 +611,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
615 611
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
616 612
 //#define RA_CONTROL_PANEL
617 613
 
618
-//automatic expansion
619
-#if defined (MAKRPANEL)
620
- #define DOGLCD
621
- #define SDSUPPORT
622
- #define ULTIPANEL
623
- #define NEWPANEL
624
- #define DEFAULT_LCD_CONTRAST 17
625
-#endif
626
-
627
-#if defined(miniVIKI) || defined(VIKI2)
628
- #define ULTRA_LCD  //general LCD support, also 16x2
629
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
630
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
631
- 
632
-  #ifdef miniVIKI
633
-   #define DEFAULT_LCD_CONTRAST 95
634
-  #else
635
-   #define DEFAULT_LCD_CONTRAST 40
636
-  #endif
637
-  
638
- #define ENCODER_PULSES_PER_STEP 4
639
- #define ENCODER_STEPS_PER_MENU_ITEM 1
640
-#endif
641
-
642
-#if defined (PANEL_ONE)
643
- #define SDSUPPORT
644
- #define ULTIMAKERCONTROLLER
645
-#endif
646
-
647
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
648
- #define DOGLCD
649
- #define U8GLIB_ST7920
650
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
651
-#endif
652
-
653
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
654
- #define ULTIPANEL
655
- #define NEWPANEL
656
-#endif
657
-
658
-#if defined(REPRAPWORLD_KEYPAD)
659
-  #define NEWPANEL
660
-  #define ULTIPANEL
661
-#endif
662
-#if defined(RA_CONTROL_PANEL)
663
- #define ULTIPANEL
664
- #define NEWPANEL
665
- #define LCD_I2C_TYPE_PCA8574
666
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
667
-#endif
668
-
669
-//I2C PANELS
614
+/**
615
+ * I2C Panels
616
+ */
670 617
 
671 618
 //#define LCD_I2C_SAINSMART_YWROBOT
672
-#ifdef LCD_I2C_SAINSMART_YWROBOT
673
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
674
-  // Make sure it is placed in the Arduino libraries directory.
675
-  #define LCD_I2C_TYPE_PCF8575
676
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
677
-  #define NEWPANEL
678
-  #define ULTIPANEL
679
-#endif
680 619
 
681 620
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
682 621
 //#define LCD_I2C_PANELOLU2
683
-#ifdef LCD_I2C_PANELOLU2
684
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
685
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
686
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
687
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
688
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
689
-  #define LCD_I2C_TYPE_MCP23017
690
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
691
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
692
-  #define NEWPANEL
693
-  #define ULTIPANEL
694
-
695
-  #ifndef ENCODER_PULSES_PER_STEP
696
-	#define ENCODER_PULSES_PER_STEP 4
697
-  #endif
698
-
699
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
700
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
701
-  #endif
702
-
703
-
704
-  #ifdef LCD_USE_I2C_BUZZER
705
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
706
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
707
-  #endif
708
-
709
-#endif
710 622
 
711 623
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
712 624
 //#define LCD_I2C_VIKI
713
-#ifdef LCD_I2C_VIKI
714
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
715
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
716
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
717
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
718
-  #define LCD_I2C_TYPE_MCP23017
719
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
720
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
721
-  #define NEWPANEL
722
-  #define ULTIPANEL
723
-#endif
724 625
 
725 626
 // Shift register panels
726 627
 // ---------------------
@@ -728,51 +629,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
728 629
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
729 630
 
730 631
 //#define SAV_3DLCD
731
-#ifdef SAV_3DLCD
732
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
733
-   #define NEWPANEL
734
-   #define ULTIPANEL
735
-#endif
736
-
737
-
738
-#ifdef ULTIPANEL
739
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
740
-  #define SDSUPPORT
741
-  #define ULTRA_LCD
742
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
743
-    #define LCD_WIDTH 22
744
-    #define LCD_HEIGHT 5
745
-  #else
746
-    #define LCD_WIDTH 20
747
-    #define LCD_HEIGHT 4
748
-  #endif
749
-#else //no panel but just LCD
750
-  #ifdef ULTRA_LCD
751
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
752
-    #define LCD_WIDTH 22
753
-    #define LCD_HEIGHT 5
754
-  #else
755
-    #define LCD_WIDTH 16
756
-    #define LCD_HEIGHT 2
757
-  #endif
758
-  #endif
759
-#endif
760
-
761
-// default LCD contrast for dogm-like LCD displays
762
-#ifdef DOGLCD
763
-# ifndef DEFAULT_LCD_CONTRAST
764
-#  define DEFAULT_LCD_CONTRAST 32
765
-# endif
766
-#endif
767 632
 
768 633
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
769 634
 //#define FAST_PWM_FAN
770 635
 
771
-// Temperature status LEDs that display the hotend and bet temperature.
772
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
773
-// Otherwise the RED led is on. There is 1C hysteresis.
774
-//#define TEMP_STAT_LEDS
775
-
776 636
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
777 637
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
778 638
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -784,6 +644,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
784 644
 // at zero value, there are 128 effective control positions.
785 645
 #define SOFT_PWM_SCALE 0
786 646
 
647
+// Temperature status LEDs that display the hotend and bet temperature.
648
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
649
+// Otherwise the RED led is on. There is 1C hysteresis.
650
+//#define TEMP_STAT_LEDS
651
+
787 652
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
788 653
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
789 654
 // #define PHOTOGRAPH_PIN     23
@@ -853,6 +718,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
853 718
 
854 719
 
855 720
 #include "Configuration_adv.h"
721
+#include "Conditionals.h"
722
+#include "SanityCheck.h"
856 723
 #include "thermistortables.h"
857 724
 
858
-#endif //__CONFIGURATION_H
725
+#endif //CONFIGURATION_H

+ 3
- 194
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 //#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers.
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -237,12 +175,12 @@
237 175
 
238 176
 // Feedrates for manual moves along X, Y, Z, E from panel
239 177
 #ifdef ULTIPANEL
240
-#define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60}  // set the speeds for manual moves (mm/min)
178
+  #define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60}  // set the speeds for manual moves (mm/min)
241 179
 #endif
242 180
 
243 181
 //Comment to disable setting feedrate multiplier via encoder
244 182
 #ifdef ULTIPANEL
245
-    #define ULTIPANEL_FEEDMULTIPLY
183
+  #define ULTIPANEL_FEEDMULTIPLY
246 184
 #endif
247 185
 
248 186
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -261,13 +199,6 @@
261 199
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
262 200
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263 201
 
264
-// MS1 MS2 Stepper Driver Microstepping mode table
265
-#define MICROSTEP1 LOW,LOW
266
-#define MICROSTEP2 HIGH,LOW
267
-#define MICROSTEP4 LOW,HIGH
268
-#define MICROSTEP8 HIGH,HIGH
269
-#define MICROSTEP16 HIGH,HIGH
270
-
271 202
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272 203
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273 204
 
@@ -313,12 +244,6 @@
313 244
   #define PROGRESS_MSG_EXPIRE   0
314 245
   // Enable this to show messages for MSG_TIME then hide them
315 246
   //#define PROGRESS_MSG_ONCE
316
-  #ifdef DOGLCD
317
-    #warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
318
-  #endif
319
-  #ifdef FILAMENT_LCD_DISPLAY
320
-    #error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
321
-  #endif
322 247
 #endif
323 248
 
324 249
 // The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
@@ -342,16 +267,6 @@
342 267
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
343 268
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
344 269
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
345
-
346
-  #ifdef COREXY
347
-    #error BABYSTEPPING not implemented for COREXY yet.
348
-  #endif
349
-
350
-  #ifdef DELTA
351
-    #ifdef BABYSTEP_XY
352
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
353
-    #endif
354
-  #endif
355 270
 #endif
356 271
 
357 272
 // extruder advance constant (s2/mm3)
@@ -365,12 +280,8 @@
365 280
 
366 281
 #ifdef ADVANCE
367 282
   #define EXTRUDER_ADVANCE_K .0
368
-
369 283
   #define D_FILAMENT 1.75
370 284
   #define STEPS_MM_E 100.47095761381482
371
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
372
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
373
-
374 285
 #endif // ADVANCE
375 286
 
376 287
 // Arc interpretation settings:
@@ -385,26 +296,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
385 296
 // be commented out otherwise
386 297
 #define SDCARDDETECTINVERTED
387 298
 
388
-#ifdef ULTIPANEL
389
- #undef SDCARDDETECTINVERTED
390
-#endif
391
-
392
-// Power Signal Control Definitions
393
-// By default use ATX definition
394
-#ifndef POWER_SUPPLY
395
-  #define POWER_SUPPLY 1
396
-#endif
397
-// 1 = ATX
398
-#if (POWER_SUPPLY == 1)
399
-  #define PS_ON_AWAKE  LOW
400
-  #define PS_ON_ASLEEP HIGH
401
-#endif
402
-// 2 = X-Box 360 203W
403
-#if (POWER_SUPPLY == 2)
404
-  #define PS_ON_AWAKE  HIGH
405
-  #define PS_ON_ASLEEP LOW
406
-#endif
407
-
408 299
 // Control heater 0 and heater 1 in parallel.
409 300
 //#define HEATERS_PARALLEL
410 301
 
@@ -456,86 +347,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
456 347
   #endif
457 348
 #endif
458 349
 
459
-#ifdef FILAMENTCHANGEENABLE
460
-  #ifdef EXTRUDER_RUNOUT_PREVENT
461
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
462
-  #endif
463
-#endif
464
-
465
-//===========================================================================
466
-//=============================  Define Defines  ============================
467
-//===========================================================================
468
-
469
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
470
-  #error "Bed Auto Leveling is still not compatible with Delta Kinematics."
471
-#endif
472
-
473
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
474
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
475
-#endif
476
-
477
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
478
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
479
-#endif
480
-
481
-#if TEMP_SENSOR_0 > 0
482
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
483
-  #define HEATER_0_USES_THERMISTOR
484
-#endif
485
-#if TEMP_SENSOR_1 > 0
486
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
487
-  #define HEATER_1_USES_THERMISTOR
488
-#endif
489
-#if TEMP_SENSOR_2 > 0
490
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
491
-  #define HEATER_2_USES_THERMISTOR
492
-#endif
493
-#if TEMP_SENSOR_3 > 0
494
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
495
-  #define HEATER_3_USES_THERMISTOR
496
-#endif
497
-#if TEMP_SENSOR_BED > 0
498
-  #define THERMISTORBED TEMP_SENSOR_BED
499
-  #define BED_USES_THERMISTOR
500
-#endif
501
-#if TEMP_SENSOR_0 == -1
502
-  #define HEATER_0_USES_AD595
503
-#endif
504
-#if TEMP_SENSOR_1 == -1
505
-  #define HEATER_1_USES_AD595
506
-#endif
507
-#if TEMP_SENSOR_2 == -1
508
-  #define HEATER_2_USES_AD595
509
-#endif
510
-#if TEMP_SENSOR_3 == -1
511
-  #define HEATER_3_USES_AD595
512
-#endif
513
-#if TEMP_SENSOR_BED == -1
514
-  #define BED_USES_AD595
515
-#endif
516
-#if TEMP_SENSOR_0 == -2
517
-  #define HEATER_0_USES_MAX6675
518
-#endif
519
-#if TEMP_SENSOR_0 == 0
520
-  #undef HEATER_0_MINTEMP
521
-  #undef HEATER_0_MAXTEMP
522
-#endif
523
-#if TEMP_SENSOR_1 == 0
524
-  #undef HEATER_1_MINTEMP
525
-  #undef HEATER_1_MAXTEMP
526
-#endif
527
-#if TEMP_SENSOR_2 == 0
528
-  #undef HEATER_2_MINTEMP
529
-  #undef HEATER_2_MAXTEMP
530
-#endif
531
-#if TEMP_SENSOR_3 == 0
532
-  #undef HEATER_3_MINTEMP
533
-  #undef HEATER_3_MAXTEMP
534
-#endif
535
-#if TEMP_SENSOR_BED == 0
536
-  #undef BED_MINTEMP
537
-  #undef BED_MAXTEMP
538
-#endif
539
-
540
-
541
-#endif //__CONFIGURATION_ADV_H
350
+#endif //CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -347,15 +347,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
347 347
   // #define ENDSTOPPULLUP_ZMIN
348 348
 #endif
349 349
 
350
-#ifdef ENDSTOPPULLUPS
351
-  #define ENDSTOPPULLUP_XMAX
352
-  #define ENDSTOPPULLUP_YMAX
353
-  #define ENDSTOPPULLUP_ZMAX
354
-  #define ENDSTOPPULLUP_XMIN
355
-  #define ENDSTOPPULLUP_YMIN
356
-  #define ENDSTOPPULLUP_ZMIN
357
-#endif
358
-
359 350
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
360 351
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
361 352
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -406,10 +397,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
406 397
 #define Z_MAX_POS MANUAL_Z_HOME_POS
407 398
 #define Z_MIN_POS 0
408 399
 
409
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
410
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
411
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
412
-
400
+//===========================================================================
401
+//============================= Filament Runout Sensor ======================
402
+//===========================================================================
403
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
404
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
405
+                                 // It is assumed that when logic high = filament available
406
+                                 //                    when logic  low = filament ran out
407
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
408
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
413 409
 
414 410
 //===========================================================================
415 411
 //============================= Bed Auto Leveling ===========================
@@ -632,112 +628,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
632 628
 // in ultralcd.cpp@lcd_delta_calibrate_menu()
633 629
 // #define DELTA_CALIBRATION_MENU
634 630
 
635
-//automatic expansion
636
-#if defined (MAKRPANEL)
637
- #define DOGLCD
638
- #define SDSUPPORT
639
- #define ULTIPANEL
640
- #define NEWPANEL
641
- #define DEFAULT_LCD_CONTRAST 17
642
-#endif
643
-
644
-#if defined(miniVIKI) || defined(VIKI2)
645
- #define ULTRA_LCD  //general LCD support, also 16x2
646
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
647
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
648
- 
649
-  #ifdef miniVIKI
650
-   #define DEFAULT_LCD_CONTRAST 95
651
-  #else
652
-   #define DEFAULT_LCD_CONTRAST 40
653
-  #endif
654
-  
655
- #define ENCODER_PULSES_PER_STEP 4
656
- #define ENCODER_STEPS_PER_MENU_ITEM 1
657
-#endif
658
-
659
-#if defined (PANEL_ONE)
660
- #define SDSUPPORT
661
- #define ULTIMAKERCONTROLLER
662
-#endif
663
-
664
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
665
- #define DOGLCD
666
- #define U8GLIB_ST7920
667
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
668
-#endif
669
-
670
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
671
- #define ULTIPANEL
672
- #define NEWPANEL
673
-#endif
674
-
675
-#if defined(REPRAPWORLD_KEYPAD)
676
-  #define NEWPANEL
677
-  #define ULTIPANEL
678
-#endif
679
-#if defined(RA_CONTROL_PANEL)
680
- #define ULTIPANEL
681
- #define NEWPANEL
682
- #define LCD_I2C_TYPE_PCA8574
683
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
684
-#endif
685
-
686
-//I2C PANELS
631
+/**
632
+ * I2C PANELS
633
+ */
687 634
 
688 635
 //#define LCD_I2C_SAINSMART_YWROBOT
689
-#ifdef LCD_I2C_SAINSMART_YWROBOT
690
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
691
-  // Make sure it is placed in the Arduino libraries directory.
692
-  #define LCD_I2C_TYPE_PCF8575
693
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
694
-  #define NEWPANEL
695
-  #define ULTIPANEL
696
-#endif
697 636
 
698 637
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
699 638
 //#define LCD_I2C_PANELOLU2
700
-#ifdef LCD_I2C_PANELOLU2
701
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
702
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
703
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
704
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
705
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
706
-  #define LCD_I2C_TYPE_MCP23017
707
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
708
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
709
-  #define NEWPANEL
710
-  #define ULTIPANEL
711
-
712
-  #ifndef ENCODER_PULSES_PER_STEP
713
-	#define ENCODER_PULSES_PER_STEP 4
714
-  #endif
715
-
716
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
717
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
718
-  #endif
719
-
720
-
721
-  #ifdef LCD_USE_I2C_BUZZER
722
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
723
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
724
-  #endif
725
-
726
-#endif
727 639
 
728 640
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
729 641
 //#define LCD_I2C_VIKI
730
-#ifdef LCD_I2C_VIKI
731
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
732
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
733
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
734
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
735
-  #define LCD_I2C_TYPE_MCP23017
736
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
737
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
738
-  #define NEWPANEL
739
-  #define ULTIPANEL
740
-#endif
741 642
 
742 643
 // Shift register panels
743 644
 // ---------------------
@@ -745,51 +646,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
745 646
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
746 647
 
747 648
 //#define SAV_3DLCD
748
-#ifdef SAV_3DLCD
749
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
750
-   #define NEWPANEL
751
-   #define ULTIPANEL
752
-#endif
753
-
754
-
755
-#ifdef ULTIPANEL
756
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
757
-  #define SDSUPPORT
758
-  #define ULTRA_LCD
759
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
760
-    #define LCD_WIDTH 22
761
-    #define LCD_HEIGHT 5
762
-  #else
763
-    #define LCD_WIDTH 20
764
-    #define LCD_HEIGHT 4
765
-  #endif
766
-#else //no panel but just LCD
767
-  #ifdef ULTRA_LCD
768
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
769
-    #define LCD_WIDTH 22
770
-    #define LCD_HEIGHT 5
771
-  #else
772
-    #define LCD_WIDTH 16
773
-    #define LCD_HEIGHT 2
774
-  #endif
775
-  #endif
776
-#endif
777
-
778
-// default LCD contrast for dogm-like LCD displays
779
-#ifdef DOGLCD
780
-# ifndef DEFAULT_LCD_CONTRAST
781
-#  define DEFAULT_LCD_CONTRAST 32
782
-# endif
783
-#endif
784 649
 
785 650
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
786 651
 //#define FAST_PWM_FAN
787 652
 
788
-// Temperature status LEDs that display the hotend and bet temperature.
789
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
790
-// Otherwise the RED led is on. There is 1C hysteresis.
791
-//#define TEMP_STAT_LEDS
792
-
793 653
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
794 654
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
795 655
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -801,6 +661,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
801 661
 // at zero value, there are 128 effective control positions.
802 662
 #define SOFT_PWM_SCALE 0
803 663
 
664
+// Temperature status LEDs that display the hotend and bet temperature.
665
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
666
+// Otherwise the RED led is on. There is 1C hysteresis.
667
+//#define TEMP_STAT_LEDS
668
+
804 669
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
805 670
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
806 671
 // #define PHOTOGRAPH_PIN     23
@@ -870,6 +735,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
870 735
 
871 736
 
872 737
 #include "Configuration_adv.h"
738
+#include "Conditionals.h"
739
+#include "SanityCheck.h"
873 740
 #include "thermistortables.h"
874 741
 
875
-#endif //__CONFIGURATION_H
742
+#endif //CONFIGURATION_H

+ 2
- 205
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else    
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-  
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else    
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-  
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else    
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers. 
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -236,7 +174,7 @@
236 174
 
237 175
 // Feedrates for manual moves along X, Y, Z, E from panel
238 176
 #ifdef ULTIPANEL
239
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
177
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
240 178
 #endif
241 179
 
242 180
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -256,13 +194,6 @@
256 194
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
257 195
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
258 196
 
259
-// MS1 MS2 Stepper Driver Microstepping mode table
260
-#define MICROSTEP1 LOW,LOW
261
-#define MICROSTEP2 HIGH,LOW
262
-#define MICROSTEP4 LOW,HIGH
263
-#define MICROSTEP8 HIGH,HIGH
264
-#define MICROSTEP16 HIGH,HIGH
265
-
266 197
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
267 198
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
268 199
 
@@ -331,16 +262,6 @@
331 262
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
332 263
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
333 264
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
334
-  
335
-  #ifdef COREXY
336
-    #error BABYSTEPPING not implemented for COREXY yet.
337
-  #endif
338
-
339
-  #ifdef DELTA
340
-    #ifdef BABYSTEP_XY
341
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
342
-    #endif
343
-  #endif
344 265
 #endif
345 266
 
346 267
 // extruder advance constant (s2/mm3)
@@ -354,12 +275,8 @@
354 275
 
355 276
 #ifdef ADVANCE
356 277
   #define EXTRUDER_ADVANCE_K .0
357
-
358 278
   #define D_FILAMENT 2.85
359 279
   #define STEPS_MM_E 836
360
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
361
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
362
-
363 280
 #endif // ADVANCE
364 281
 
365 282
 // Arc interpretation settings:
@@ -374,26 +291,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
374 291
 // be commented out otherwise
375 292
 #define SDCARDDETECTINVERTED 
376 293
 
377
-#ifdef ULTIPANEL
378
- #undef SDCARDDETECTINVERTED
379
-#endif
380
-
381
-// Power Signal Control Definitions
382
-// By default use ATX definition
383
-#ifndef POWER_SUPPLY
384
-  #define POWER_SUPPLY 1
385
-#endif
386
-// 1 = ATX
387
-#if (POWER_SUPPLY == 1) 
388
-  #define PS_ON_AWAKE  LOW
389
-  #define PS_ON_ASLEEP HIGH
390
-#endif
391
-// 2 = X-Box 360 203W
392
-#if (POWER_SUPPLY == 2) 
393
-  #define PS_ON_AWAKE  HIGH
394
-  #define PS_ON_ASLEEP LOW
395
-#endif
396
-
397 294
 // Control heater 0 and heater 1 in parallel.
398 295
 //#define HEATERS_PARALLEL
399 296
 
@@ -445,104 +342,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
445 342
   #endif
446 343
 #endif
447 344
 
448
-#ifdef FILAMENTCHANGEENABLE
449
-  #ifdef EXTRUDER_RUNOUT_PREVENT
450
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
451
-  #endif 
452
-#endif
453
- 
454
-//===========================================================================
455
-//=============================  Define Defines  ============================
456
-//===========================================================================
457
-
458
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
459
-
460
-  #if not defined(AUTO_BED_LEVELING_GRID)
461
-    #error "Only Grid Bed Auto Leveling is supported on Deltas."
462
-  #endif
463
-  
464
-  #if defined(Z_PROBE_SLED)
465
-    #error "You cannot use Z_PROBE_SLED together with DELTA."
466
-  #endif
467
-
468
-  #if defined(Z_PROBE_REPEATABILITY_TEST)
469
-    #error "Z-probe repeatability test is not supported on Deltas yet."
470
-  #endif
471
-
472
-#endif  
473
-
474
-#if defined(Z_PROBE_ALLEN_KEY)
475
-  #if !defined(AUTO_BED_LEVELING_GRID) || !defined(DELTA)
476
-    #error "Invalid use of Z_PROBE_ALLEN_KEY."
477
-  #endif
478
-#endif
479
-
480
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
481
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
482
-#endif
483
-
484
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
485
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
486
-#endif
487
-
488
-#if TEMP_SENSOR_0 > 0
489
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
490
-  #define HEATER_0_USES_THERMISTOR
491
-#endif
492
-#if TEMP_SENSOR_1 > 0
493
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
494
-  #define HEATER_1_USES_THERMISTOR
495
-#endif
496
-#if TEMP_SENSOR_2 > 0
497
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
498
-  #define HEATER_2_USES_THERMISTOR
499
-#endif
500
-#if TEMP_SENSOR_3 > 0
501
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
502
-  #define HEATER_3_USES_THERMISTOR
503
-#endif
504
-#if TEMP_SENSOR_BED > 0
505
-  #define THERMISTORBED TEMP_SENSOR_BED
506
-  #define BED_USES_THERMISTOR
507
-#endif
508
-#if TEMP_SENSOR_0 == -1
509
-  #define HEATER_0_USES_AD595
510
-#endif
511
-#if TEMP_SENSOR_1 == -1
512
-  #define HEATER_1_USES_AD595
513
-#endif
514
-#if TEMP_SENSOR_2 == -1
515
-  #define HEATER_2_USES_AD595
516
-#endif
517
-#if TEMP_SENSOR_3 == -1
518
-  #define HEATER_3_USES_AD595
519
-#endif
520
-#if TEMP_SENSOR_BED == -1
521
-  #define BED_USES_AD595
522
-#endif
523
-#if TEMP_SENSOR_0 == -2
524
-  #define HEATER_0_USES_MAX6675
525
-#endif
526
-#if TEMP_SENSOR_0 == 0
527
-  #undef HEATER_0_MINTEMP
528
-  #undef HEATER_0_MAXTEMP
529
-#endif
530
-#if TEMP_SENSOR_1 == 0
531
-  #undef HEATER_1_MINTEMP
532
-  #undef HEATER_1_MAXTEMP
533
-#endif
534
-#if TEMP_SENSOR_2 == 0
535
-  #undef HEATER_2_MINTEMP
536
-  #undef HEATER_2_MAXTEMP
537
-#endif
538
-#if TEMP_SENSOR_3 == 0
539
-  #undef HEATER_3_MINTEMP
540
-  #undef HEATER_3_MAXTEMP
541
-#endif
542
-#if TEMP_SENSOR_BED == 0
543
-  #undef BED_MINTEMP
544
-  #undef BED_MAXTEMP
545
-#endif
546
-
547
-
548
-#endif //__CONFIGURATION_ADV_H
345
+#endif //CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -348,15 +348,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
348 348
   // #define ENDSTOPPULLUP_ZMIN
349 349
 #endif
350 350
 
351
-#ifdef ENDSTOPPULLUPS
352
-  #define ENDSTOPPULLUP_XMAX
353
-  #define ENDSTOPPULLUP_YMAX
354
-  #define ENDSTOPPULLUP_ZMAX
355
-  #define ENDSTOPPULLUP_XMIN
356
-  #define ENDSTOPPULLUP_YMIN
357
-  #define ENDSTOPPULLUP_ZMIN
358
-#endif
359
-
360 351
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
361 352
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
362 353
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -407,10 +398,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
407 398
 #define Z_MAX_POS MANUAL_Z_HOME_POS
408 399
 #define Z_MIN_POS 0
409 400
 
410
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
411
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
412
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
413
-
401
+//===========================================================================
402
+//============================= Filament Runout Sensor ======================
403
+//===========================================================================
404
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
405
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
406
+                                 // It is assumed that when logic high = filament available
407
+                                 //                    when logic  low = filament ran out
408
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
409
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
414 410
 
415 411
 //===========================================================================
416 412
 //============================= Bed Auto Leveling ===========================
@@ -634,112 +630,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
634 630
 // in ultralcd.cpp@lcd_delta_calibrate_menu()
635 631
 // #define DELTA_CALIBRATION_MENU
636 632
 
637
-//automatic expansion
638
-#if defined (MAKRPANEL)
639
- #define DOGLCD
640
- #define SDSUPPORT
641
- #define ULTIPANEL
642
- #define NEWPANEL
643
- #define DEFAULT_LCD_CONTRAST 17
644
-#endif
645
-
646
-#if defined(miniVIKI) || defined(VIKI2)
647
- #define ULTRA_LCD  //general LCD support, also 16x2
648
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
649
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
650
- 
651
-  #ifdef miniVIKI
652
-   #define DEFAULT_LCD_CONTRAST 95
653
-  #else
654
-   #define DEFAULT_LCD_CONTRAST 40
655
-  #endif
656
-  
657
- #define ENCODER_PULSES_PER_STEP 4
658
- #define ENCODER_STEPS_PER_MENU_ITEM 1
659
-#endif
660
-
661
-#if defined (PANEL_ONE)
662
- #define SDSUPPORT
663
- #define ULTIMAKERCONTROLLER
664
-#endif
665
-
666
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
667
- #define DOGLCD
668
- #define U8GLIB_ST7920
669
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
670
-#endif
671
-
672
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
673
- #define ULTIPANEL
674
- #define NEWPANEL
675
-#endif
676
-
677
-#if defined(REPRAPWORLD_KEYPAD)
678
-  #define NEWPANEL
679
-  #define ULTIPANEL
680
-#endif
681
-#if defined(RA_CONTROL_PANEL)
682
- #define ULTIPANEL
683
- #define NEWPANEL
684
- #define LCD_I2C_TYPE_PCA8574
685
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
686
-#endif
687
-
688
-//I2C PANELS
633
+/**
634
+ * I2C Panels
635
+ */
689 636
 
690 637
 //#define LCD_I2C_SAINSMART_YWROBOT
691
-#ifdef LCD_I2C_SAINSMART_YWROBOT
692
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
693
-  // Make sure it is placed in the Arduino libraries directory.
694
-  #define LCD_I2C_TYPE_PCF8575
695
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
696
-  #define NEWPANEL
697
-  #define ULTIPANEL
698
-#endif
699 638
 
700 639
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
701 640
 //#define LCD_I2C_PANELOLU2
702
-#ifdef LCD_I2C_PANELOLU2
703
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
704
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
705
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
706
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
707
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
708
-  #define LCD_I2C_TYPE_MCP23017
709
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
710
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
711
-  #define NEWPANEL
712
-  #define ULTIPANEL
713
-
714
-  #ifndef ENCODER_PULSES_PER_STEP
715
-	#define ENCODER_PULSES_PER_STEP 4
716
-  #endif
717
-
718
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
719
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
720
-  #endif
721
-
722
-
723
-  #ifdef LCD_USE_I2C_BUZZER
724
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
725
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
726
-  #endif
727
-
728
-#endif
729 641
 
730 642
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
731 643
 //#define LCD_I2C_VIKI
732
-#ifdef LCD_I2C_VIKI
733
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
734
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
735
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
736
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
737
-  #define LCD_I2C_TYPE_MCP23017
738
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
739
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
740
-  #define NEWPANEL
741
-  #define ULTIPANEL
742
-#endif
743 644
 
744 645
 // Shift register panels
745 646
 // ---------------------
@@ -747,51 +648,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
747 648
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
748 649
 
749 650
 //#define SAV_3DLCD
750
-#ifdef SAV_3DLCD
751
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
752
-   #define NEWPANEL
753
-   #define ULTIPANEL
754
-#endif
755
-
756
-
757
-#ifdef ULTIPANEL
758
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
759
-  #define SDSUPPORT
760
-  #define ULTRA_LCD
761
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
762
-    #define LCD_WIDTH 22
763
-    #define LCD_HEIGHT 5
764
-  #else
765
-    #define LCD_WIDTH 20
766
-    #define LCD_HEIGHT 4
767
-  #endif
768
-#else //no panel but just LCD
769
-  #ifdef ULTRA_LCD
770
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
771
-    #define LCD_WIDTH 22
772
-    #define LCD_HEIGHT 5
773
-  #else
774
-    #define LCD_WIDTH 16
775
-    #define LCD_HEIGHT 2
776
-  #endif
777
-  #endif
778
-#endif
779
-
780
-// default LCD contrast for dogm-like LCD displays
781
-#ifdef DOGLCD
782
-# ifndef DEFAULT_LCD_CONTRAST
783
-#  define DEFAULT_LCD_CONTRAST 32
784
-# endif
785
-#endif
786 651
 
787 652
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
788 653
 //#define FAST_PWM_FAN
789 654
 
790
-// Temperature status LEDs that display the hotend and bet temperature.
791
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
792
-// Otherwise the RED led is on. There is 1C hysteresis.
793
-//#define TEMP_STAT_LEDS
794
-
795 655
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
796 656
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
797 657
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -803,6 +663,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
803 663
 // at zero value, there are 128 effective control positions.
804 664
 #define SOFT_PWM_SCALE 0
805 665
 
666
+// Temperature status LEDs that display the hotend and bet temperature.
667
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
668
+// Otherwise the RED led is on. There is 1C hysteresis.
669
+//#define TEMP_STAT_LEDS
670
+
806 671
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
807 672
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
808 673
 // #define PHOTOGRAPH_PIN     23
@@ -872,6 +737,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
872 737
 
873 738
 
874 739
 #include "Configuration_adv.h"
740
+#include "Conditionals.h"
741
+#include "SanityCheck.h"
875 742
 #include "thermistortables.h"
876 743
 
877
-#endif //__CONFIGURATION_H
744
+#endif //CONFIGURATION_H

+ 2
- 205
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else    
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-  
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else    
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-  
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else    
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers. 
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -236,7 +174,7 @@
236 174
 
237 175
 // Feedrates for manual moves along X, Y, Z, E from panel
238 176
 #ifdef ULTIPANEL
239
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
177
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
240 178
 #endif
241 179
 
242 180
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -255,13 +193,6 @@
255 193
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
256 194
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
257 195
 
258
-// MS1 MS2 Stepper Driver Microstepping mode table
259
-#define MICROSTEP1 LOW,LOW
260
-#define MICROSTEP2 HIGH,LOW
261
-#define MICROSTEP4 LOW,HIGH
262
-#define MICROSTEP8 HIGH,HIGH
263
-#define MICROSTEP16 HIGH,HIGH
264
-
265 196
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
266 197
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
267 198
 
@@ -330,16 +261,6 @@
330 261
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
331 262
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
332 263
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
333
-  
334
-  #ifdef COREXY
335
-    #error BABYSTEPPING not implemented for COREXY yet.
336
-  #endif
337
-
338
-  #ifdef DELTA
339
-    #ifdef BABYSTEP_XY
340
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
341
-    #endif
342
-  #endif
343 264
 #endif
344 265
 
345 266
 // extruder advance constant (s2/mm3)
@@ -353,12 +274,8 @@
353 274
 
354 275
 #ifdef ADVANCE
355 276
   #define EXTRUDER_ADVANCE_K .0
356
-
357 277
   #define D_FILAMENT 2.85
358 278
   #define STEPS_MM_E 836
359
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
360
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
361
-
362 279
 #endif // ADVANCE
363 280
 
364 281
 // Arc interpretation settings:
@@ -373,26 +290,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
373 290
 // be commented out otherwise
374 291
 #define SDCARDDETECTINVERTED 
375 292
 
376
-#ifdef ULTIPANEL
377
- #undef SDCARDDETECTINVERTED
378
-#endif
379
-
380
-// Power Signal Control Definitions
381
-// By default use ATX definition
382
-#ifndef POWER_SUPPLY
383
-  #define POWER_SUPPLY 1
384
-#endif
385
-// 1 = ATX
386
-#if (POWER_SUPPLY == 1) 
387
-  #define PS_ON_AWAKE  LOW
388
-  #define PS_ON_ASLEEP HIGH
389
-#endif
390
-// 2 = X-Box 360 203W
391
-#if (POWER_SUPPLY == 2) 
392
-  #define PS_ON_AWAKE  HIGH
393
-  #define PS_ON_ASLEEP LOW
394
-#endif
395
-
396 293
 // Control heater 0 and heater 1 in parallel.
397 294
 //#define HEATERS_PARALLEL
398 295
 
@@ -444,104 +341,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
444 341
   #endif
445 342
 #endif
446 343
 
447
-#ifdef FILAMENTCHANGEENABLE
448
-  #ifdef EXTRUDER_RUNOUT_PREVENT
449
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
450
-  #endif 
451
-#endif
452
- 
453
-//===========================================================================
454
-//=============================  Define Defines  ============================
455
-//===========================================================================
456
-
457
-#if defined (ENABLE_AUTO_BED_LEVELING) && defined (DELTA)
458
-
459
-  #if not defined(AUTO_BED_LEVELING_GRID)
460
-    #error "Only Grid Bed Auto Leveling is supported on Deltas."
461
-  #endif
462
-  
463
-  #if defined(Z_PROBE_SLED)
464
-    #error "You cannot use Z_PROBE_SLED together with DELTA."
465
-  #endif
466
-
467
-  #if defined(Z_PROBE_REPEATABILITY_TEST)
468
-    #error "Z-probe repeatability test is not supported on Deltas yet."
469
-  #endif
470
-
471
-#endif  
472
-
473
-#if defined(Z_PROBE_ALLEN_KEY)
474
-  #if !defined(AUTO_BED_LEVELING_GRID) || !defined(DELTA)
475
-    #error "Invalid use of Z_PROBE_ALLEN_KEY."
476
-  #endif
477
-#endif
478
-
479
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
480
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
481
-#endif
482
-
483
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
484
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
485
-#endif
486
-
487
-#if TEMP_SENSOR_0 > 0
488
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
489
-  #define HEATER_0_USES_THERMISTOR
490
-#endif
491
-#if TEMP_SENSOR_1 > 0
492
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
493
-  #define HEATER_1_USES_THERMISTOR
494
-#endif
495
-#if TEMP_SENSOR_2 > 0
496
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
497
-  #define HEATER_2_USES_THERMISTOR
498
-#endif
499
-#if TEMP_SENSOR_3 > 0
500
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
501
-  #define HEATER_3_USES_THERMISTOR
502
-#endif
503
-#if TEMP_SENSOR_BED > 0
504
-  #define THERMISTORBED TEMP_SENSOR_BED
505
-  #define BED_USES_THERMISTOR
506
-#endif
507
-#if TEMP_SENSOR_0 == -1
508
-  #define HEATER_0_USES_AD595
509
-#endif
510
-#if TEMP_SENSOR_1 == -1
511
-  #define HEATER_1_USES_AD595
512
-#endif
513
-#if TEMP_SENSOR_2 == -1
514
-  #define HEATER_2_USES_AD595
515
-#endif
516
-#if TEMP_SENSOR_3 == -1
517
-  #define HEATER_3_USES_AD595
518
-#endif
519
-#if TEMP_SENSOR_BED == -1
520
-  #define BED_USES_AD595
521
-#endif
522
-#if TEMP_SENSOR_0 == -2
523
-  #define HEATER_0_USES_MAX6675
524
-#endif
525
-#if TEMP_SENSOR_0 == 0
526
-  #undef HEATER_0_MINTEMP
527
-  #undef HEATER_0_MAXTEMP
528
-#endif
529
-#if TEMP_SENSOR_1 == 0
530
-  #undef HEATER_1_MINTEMP
531
-  #undef HEATER_1_MAXTEMP
532
-#endif
533
-#if TEMP_SENSOR_2 == 0
534
-  #undef HEATER_2_MINTEMP
535
-  #undef HEATER_2_MAXTEMP
536
-#endif
537
-#if TEMP_SENSOR_3 == 0
538
-  #undef HEATER_3_MINTEMP
539
-  #undef HEATER_3_MAXTEMP
540
-#endif
541
-#if TEMP_SENSOR_BED == 0
542
-  #undef BED_MINTEMP
543
-  #undef BED_MAXTEMP
544
-#endif
545
-
546
-
547
-#endif //__CONFIGURATION_ADV_H
344
+#endif //CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/makibox/Configuration.h View File

@@ -317,15 +317,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
317 317
   // #define ENDSTOPPULLUP_ZMIN
318 318
 #endif
319 319
 
320
-#ifdef ENDSTOPPULLUPS
321
-  #define ENDSTOPPULLUP_XMAX
322
-  #define ENDSTOPPULLUP_YMAX
323
-  #define ENDSTOPPULLUP_ZMAX
324
-  #define ENDSTOPPULLUP_XMIN
325
-  #define ENDSTOPPULLUP_YMIN
326
-  #define ENDSTOPPULLUP_ZMIN
327
-#endif
328
-
329 320
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
330 321
 const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
331 322
 const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
@@ -374,10 +365,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
374 365
 #define Z_MAX_POS 86
375 366
 #define Z_MIN_POS 0
376 367
 
377
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
378
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
379
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
380
-
368
+//===========================================================================
369
+//============================= Filament Runout Sensor ======================
370
+//===========================================================================
371
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
372
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
373
+                                 // It is assumed that when logic high = filament available
374
+                                 //                    when logic  low = filament ran out
375
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
376
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
381 377
 
382 378
 //===========================================================================
383 379
 //============================= Bed Auto Leveling ===========================
@@ -613,112 +609,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
613 609
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
614 610
 //#define RA_CONTROL_PANEL
615 611
 
616
-//automatic expansion
617
-#if defined (MAKRPANEL)
618
- #define DOGLCD
619
- #define SDSUPPORT
620
- #define ULTIPANEL
621
- #define NEWPANEL
622
- #define DEFAULT_LCD_CONTRAST 17
623
-#endif
624
-
625
-#if defined(miniVIKI) || defined(VIKI2)
626
- #define ULTRA_LCD  //general LCD support, also 16x2
627
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
628
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
629
- 
630
-  #ifdef miniVIKI
631
-   #define DEFAULT_LCD_CONTRAST 95
632
-  #else
633
-   #define DEFAULT_LCD_CONTRAST 40
634
-  #endif
635
-  
636
- #define ENCODER_PULSES_PER_STEP 4
637
- #define ENCODER_STEPS_PER_MENU_ITEM 1
638
-#endif
639
-
640
-#if defined (PANEL_ONE)
641
- #define SDSUPPORT
642
- #define ULTIMAKERCONTROLLER
643
-#endif
644
-
645
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
646
- #define DOGLCD
647
- #define U8GLIB_ST7920
648
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
649
-#endif
650
-
651
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
652
- #define ULTIPANEL
653
- #define NEWPANEL
654
-#endif
655
-
656
-#if defined(REPRAPWORLD_KEYPAD)
657
-  #define NEWPANEL
658
-  #define ULTIPANEL
659
-#endif
660
-#if defined(RA_CONTROL_PANEL)
661
- #define ULTIPANEL
662
- #define NEWPANEL
663
- #define LCD_I2C_TYPE_PCA8574
664
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
665
-#endif
666
-
667
-//I2C PANELS
612
+/**
613
+ * I2C Panels
614
+ */
668 615
 
669 616
 //#define LCD_I2C_SAINSMART_YWROBOT
670
-#ifdef LCD_I2C_SAINSMART_YWROBOT
671
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
672
-  // Make sure it is placed in the Arduino libraries directory.
673
-  #define LCD_I2C_TYPE_PCF8575
674
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
675
-  #define NEWPANEL
676
-  #define ULTIPANEL
677
-#endif
678 617
 
679 618
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
680 619
 //#define LCD_I2C_PANELOLU2
681
-#ifdef LCD_I2C_PANELOLU2
682
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
683
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
684
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
685
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
686
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
687
-  #define LCD_I2C_TYPE_MCP23017
688
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
689
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
690
-  #define NEWPANEL
691
-  #define ULTIPANEL
692
-
693
-  #ifndef ENCODER_PULSES_PER_STEP
694
-	#define ENCODER_PULSES_PER_STEP 4
695
-  #endif
696
-
697
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
698
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
699
-  #endif
700
-
701
-
702
-  #ifdef LCD_USE_I2C_BUZZER
703
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
704
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
705
-  #endif
706
-
707
-#endif
708 620
 
709 621
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
710 622
 //#define LCD_I2C_VIKI
711
-#ifdef LCD_I2C_VIKI
712
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
713
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
714
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
715
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
716
-  #define LCD_I2C_TYPE_MCP23017
717
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
718
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
719
-  #define NEWPANEL
720
-  #define ULTIPANEL
721
-#endif
722 623
 
723 624
 // Shift register panels
724 625
 // ---------------------
@@ -726,51 +627,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
726 627
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
727 628
 
728 629
 //#define SAV_3DLCD
729
-#ifdef SAV_3DLCD
730
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
731
-   #define NEWPANEL
732
-   #define ULTIPANEL
733
-#endif
734
-
735
-
736
-#ifdef ULTIPANEL
737
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
738
-  #define SDSUPPORT
739
-  #define ULTRA_LCD
740
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
741
-    #define LCD_WIDTH 22
742
-    #define LCD_HEIGHT 5
743
-  #else
744
-    #define LCD_WIDTH 20
745
-    #define LCD_HEIGHT 4
746
-  #endif
747
-#else //no panel but just LCD
748
-  #ifdef ULTRA_LCD
749
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
750
-    #define LCD_WIDTH 22
751
-    #define LCD_HEIGHT 5
752
-  #else
753
-    #define LCD_WIDTH 16
754
-    #define LCD_HEIGHT 2
755
-  #endif
756
-  #endif
757
-#endif
758
-
759
-// default LCD contrast for dogm-like LCD displays
760
-#ifdef DOGLCD
761
-# ifndef DEFAULT_LCD_CONTRAST
762
-#  define DEFAULT_LCD_CONTRAST 32
763
-# endif
764
-#endif
765 630
 
766 631
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
767 632
 //#define FAST_PWM_FAN
768 633
 
769
-// Temperature status LEDs that display the hotend and bet temperature.
770
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
771
-// Otherwise the RED led is on. There is 1C hysteresis.
772
-//#define TEMP_STAT_LEDS
773
-
774 634
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
775 635
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
776 636
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -782,6 +642,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
782 642
 // at zero value, there are 128 effective control positions.
783 643
 #define SOFT_PWM_SCALE 0
784 644
 
645
+// Temperature status LEDs that display the hotend and bet temperature.
646
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
647
+// Otherwise the RED led is on. There is 1C hysteresis.
648
+//#define TEMP_STAT_LEDS
649
+
785 650
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
786 651
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
787 652
 // #define PHOTOGRAPH_PIN     23
@@ -851,6 +716,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
851 716
 
852 717
 
853 718
 #include "Configuration_adv.h"
719
+#include "Conditionals.h"
720
+#include "SanityCheck.h"
854 721
 #include "thermistortables.h"
855 722
 
856
-#endif //__CONFIGURATION_H
723
+#endif //CONFIGURATION_H

+ 3
- 183
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers.
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -235,12 +173,12 @@
235 173
 
236 174
 // Feedrates for manual moves along X, Y, Z, E from panel
237 175
 #ifdef ULTIPANEL
238
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
176
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
239 177
 #endif
240 178
 
241 179
 //Comment to disable setting feedrate multiplier via encoder
242 180
 #ifdef ULTIPANEL
243
-    #define ULTIPANEL_FEEDMULTIPLY
181
+  #define ULTIPANEL_FEEDMULTIPLY
244 182
 #endif
245 183
 
246 184
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -259,13 +197,6 @@
259 197
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
260 198
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
261 199
 
262
-// MS1 MS2 Stepper Driver Microstepping mode table
263
-#define MICROSTEP1 LOW,LOW
264
-#define MICROSTEP2 HIGH,LOW
265
-#define MICROSTEP4 LOW,HIGH
266
-#define MICROSTEP8 HIGH,HIGH
267
-#define MICROSTEP16 HIGH,HIGH
268
-
269 200
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
270 201
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
271 202
 
@@ -335,16 +266,6 @@
335 266
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
336 267
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
337 268
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
338
-
339
-  #ifdef COREXY
340
-    #error BABYSTEPPING not implemented for COREXY yet.
341
-  #endif
342
-
343
-  #ifdef DELTA
344
-    #ifdef BABYSTEP_XY
345
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
346
-    #endif
347
-  #endif
348 269
 #endif
349 270
 
350 271
 // extruder advance constant (s2/mm3)
@@ -358,12 +279,8 @@
358 279
 
359 280
 #ifdef ADVANCE
360 281
   #define EXTRUDER_ADVANCE_K .0
361
-
362 282
   #define D_FILAMENT 2.85
363 283
   #define STEPS_MM_E 836
364
-  #define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
365
-  #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUSION_AREA)
366
-
367 284
 #endif // ADVANCE
368 285
 
369 286
 // Arc interpretation settings:
@@ -378,26 +295,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
378 295
 // be commented out otherwise
379 296
 //#define SDCARDDETECTINVERTED
380 297
 
381
-#ifdef ULTIPANEL
382
- #undef SDCARDDETECTINVERTED
383
-#endif
384
-
385
-// Power Signal Control Definitions
386
-// By default use ATX definition
387
-#ifndef POWER_SUPPLY
388
-  #define POWER_SUPPLY 1
389
-#endif
390
-// 1 = ATX
391
-#if (POWER_SUPPLY == 1)
392
-  #define PS_ON_AWAKE  LOW
393
-  #define PS_ON_ASLEEP HIGH
394
-#endif
395
-// 2 = X-Box 360 203W
396
-#if (POWER_SUPPLY == 2)
397
-  #define PS_ON_AWAKE  HIGH
398
-  #define PS_ON_ASLEEP LOW
399
-#endif
400
-
401 298
 // Control heater 0 and heater 1 in parallel.
402 299
 //#define HEATERS_PARALLEL
403 300
 
@@ -447,81 +344,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
447 344
   #endif
448 345
 #endif
449 346
 
450
-#ifdef FILAMENTCHANGEENABLE
451
-  #ifdef EXTRUDER_RUNOUT_PREVENT
452
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
453
-  #endif
454
-#endif
455
-
456
-//===========================================================================
457
-//=============================  Define Defines  ============================
458
-//===========================================================================
459
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
460
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
461
-#endif
462
-
463
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
464
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
465
-#endif
466
-
467
-#if TEMP_SENSOR_0 > 0
468
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
469
-  #define HEATER_0_USES_THERMISTOR
470
-#endif
471
-#if TEMP_SENSOR_1 > 0
472
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
473
-  #define HEATER_1_USES_THERMISTOR
474
-#endif
475
-#if TEMP_SENSOR_2 > 0
476
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
477
-  #define HEATER_2_USES_THERMISTOR
478
-#endif
479
-#if TEMP_SENSOR_3 > 0
480
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
481
-  #define HEATER_3_USES_THERMISTOR
482
-#endif
483
-#if TEMP_SENSOR_BED > 0
484
-  #define THERMISTORBED TEMP_SENSOR_BED
485
-  #define BED_USES_THERMISTOR
486
-#endif
487
-#if TEMP_SENSOR_0 == -1
488
-  #define HEATER_0_USES_AD595
489
-#endif
490
-#if TEMP_SENSOR_1 == -1
491
-  #define HEATER_1_USES_AD595
492
-#endif
493
-#if TEMP_SENSOR_2 == -1
494
-  #define HEATER_2_USES_AD595
495
-#endif
496
-#if TEMP_SENSOR_3 == -1
497
-  #define HEATER_3_USES_AD595
498
-#endif
499
-#if TEMP_SENSOR_BED == -1
500
-  #define BED_USES_AD595
501
-#endif
502
-#if TEMP_SENSOR_0 == -2
503
-  #define HEATER_0_USES_MAX6675
504
-#endif
505
-#if TEMP_SENSOR_0 == 0
506
-  #undef HEATER_0_MINTEMP
507
-  #undef HEATER_0_MAXTEMP
508
-#endif
509
-#if TEMP_SENSOR_1 == 0
510
-  #undef HEATER_1_MINTEMP
511
-  #undef HEATER_1_MAXTEMP
512
-#endif
513
-#if TEMP_SENSOR_2 == 0
514
-  #undef HEATER_2_MINTEMP
515
-  #undef HEATER_2_MAXTEMP
516
-#endif
517
-#if TEMP_SENSOR_3 == 0
518
-  #undef HEATER_3_MINTEMP
519
-  #undef HEATER_3_MAXTEMP
520
-#endif
521
-#if TEMP_SENSOR_BED == 0
522
-  #undef BED_MINTEMP
523
-  #undef BED_MAXTEMP
524
-#endif
525
-
526
-
527
-#endif //__CONFIGURATION_ADV_H
347
+#endif //CONFIGURATION_ADV_H

+ 20
- 153
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -319,15 +319,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
319 319
   // #define ENDSTOPPULLUP_ZMIN
320 320
 #endif
321 321
 
322
-#ifdef ENDSTOPPULLUPS
323
-  #define ENDSTOPPULLUP_XMAX
324
-  #define ENDSTOPPULLUP_YMAX
325
-  #define ENDSTOPPULLUP_ZMAX
326
-  #define ENDSTOPPULLUP_XMIN
327
-  #define ENDSTOPPULLUP_YMIN
328
-  #define ENDSTOPPULLUP_ZMIN
329
-#endif
330
-
331 322
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
332 323
 const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
333 324
 const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
@@ -376,10 +367,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
376 367
 #define Z_MAX_POS 120
377 368
 #define Z_MIN_POS 0
378 369
 
379
-#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
380
-#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
381
-#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
382
-
370
+//===========================================================================
371
+//============================= Filament Runout Sensor ======================
372
+//===========================================================================
373
+//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
374
+                                 // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made.
375
+                                 // It is assumed that when logic high = filament available
376
+                                 //                    when logic  low = filament ran out
377
+//const bool FIL_RUNOUT_INVERTING = true;  // Should be uncommented and true or false should assigned
378
+//#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
383 379
 
384 380
 //===========================================================================
385 381
 //============================= Bed Auto Leveling ===========================
@@ -620,112 +616,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
620 616
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
621 617
 //#define RA_CONTROL_PANEL
622 618
 
623
-//automatic expansion
624
-#if defined (MAKRPANEL)
625
- #define DOGLCD
626
- #define SDSUPPORT
627
- #define ULTIPANEL
628
- #define NEWPANEL
629
- #define DEFAULT_LCD_CONTRAST 17
630
-#endif
631
-
632
-#if defined(miniVIKI) || defined(VIKI2)
633
- #define ULTRA_LCD  //general LCD support, also 16x2
634
- #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
635
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
636
- 
637
-  #ifdef miniVIKI
638
-   #define DEFAULT_LCD_CONTRAST 95
639
-  #else
640
-   #define DEFAULT_LCD_CONTRAST 40
641
-  #endif
642
-  
643
- #define ENCODER_PULSES_PER_STEP 4
644
- #define ENCODER_STEPS_PER_MENU_ITEM 1
645
-#endif
646
-
647
-#if defined (PANEL_ONE)
648
- #define SDSUPPORT
649
- #define ULTIMAKERCONTROLLER
650
-#endif
651
-
652
-#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
653
- #define DOGLCD
654
- #define U8GLIB_ST7920
655
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
656
-#endif
657
-
658
-#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
659
- #define ULTIPANEL
660
- #define NEWPANEL
661
-#endif
662
-
663
-#if defined(REPRAPWORLD_KEYPAD)
664
-  #define NEWPANEL
665
-  #define ULTIPANEL
666
-#endif
667
-#if defined(RA_CONTROL_PANEL)
668
- #define ULTIPANEL
669
- #define NEWPANEL
670
- #define LCD_I2C_TYPE_PCA8574
671
- #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
672
-#endif
673
-
674
-//I2C PANELS
619
+/**
620
+ * I2C Panels
621
+ */
675 622
 
676 623
 //#define LCD_I2C_SAINSMART_YWROBOT
677
-#ifdef LCD_I2C_SAINSMART_YWROBOT
678
-  // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
679
-  // Make sure it is placed in the Arduino libraries directory.
680
-  #define LCD_I2C_TYPE_PCF8575
681
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
682
-  #define NEWPANEL
683
-  #define ULTIPANEL
684
-#endif
685 624
 
686 625
 // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
687 626
 //#define LCD_I2C_PANELOLU2
688
-#ifdef LCD_I2C_PANELOLU2
689
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
690
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
691
-  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
692
-  // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
693
-  //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
694
-  #define LCD_I2C_TYPE_MCP23017
695
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
696
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
697
-  #define NEWPANEL
698
-  #define ULTIPANEL
699
-
700
-  #ifndef ENCODER_PULSES_PER_STEP
701
-	#define ENCODER_PULSES_PER_STEP 4
702
-  #endif
703
-
704
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
705
-	#define ENCODER_STEPS_PER_MENU_ITEM 1
706
-  #endif
707
-
708
-
709
-  #ifdef LCD_USE_I2C_BUZZER
710
-	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
711
-	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
712
-  #endif
713
-
714
-#endif
715 627
 
716 628
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
717 629
 //#define LCD_I2C_VIKI
718
-#ifdef LCD_I2C_VIKI
719
-  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
720
-  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
721
-  // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
722
-  //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
723
-  #define LCD_I2C_TYPE_MCP23017
724
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
725
-  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
726
-  #define NEWPANEL
727
-  #define ULTIPANEL
728
-#endif
729 630
 
730 631
 // Shift register panels
731 632
 // ---------------------
@@ -733,51 +634,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
733 634
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
734 635
 
735 636
 //#define SAV_3DLCD
736
-#ifdef SAV_3DLCD
737
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
738
-   #define NEWPANEL
739
-   #define ULTIPANEL
740
-#endif
741
-
742
-
743
-#ifdef ULTIPANEL
744
-//  #define NEWPANEL  //enable this if you have a click-encoder panel
745
-  #define SDSUPPORT
746
-  #define ULTRA_LCD
747
-  #ifdef DOGLCD // Change number of lines to match the DOG graphic display
748
-    #define LCD_WIDTH 22
749
-    #define LCD_HEIGHT 5
750
-  #else
751
-    #define LCD_WIDTH 20
752
-    #define LCD_HEIGHT 4
753
-  #endif
754
-#else //no panel but just LCD
755
-  #ifdef ULTRA_LCD
756
-  #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
757
-    #define LCD_WIDTH 22
758
-    #define LCD_HEIGHT 5
759
-  #else
760
-    #define LCD_WIDTH 16
761
-    #define LCD_HEIGHT 2
762
-  #endif
763
-  #endif
764
-#endif
765
-
766
-// default LCD contrast for dogm-like LCD displays
767
-#ifdef DOGLCD
768
-# ifndef DEFAULT_LCD_CONTRAST
769
-#  define DEFAULT_LCD_CONTRAST 32
770
-# endif
771
-#endif
772 637
 
773 638
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
774 639
 //#define FAST_PWM_FAN
775 640
 
776
-// Temperature status LEDs that display the hotend and bet temperature.
777
-// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
778
-// Otherwise the RED led is on. There is 1C hysteresis.
779
-//#define TEMP_STAT_LEDS
780
-
781 641
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
782 642
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
783 643
 // is too low, you should also increment SOFT_PWM_SCALE.
@@ -789,6 +649,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
789 649
 // at zero value, there are 128 effective control positions.
790 650
 #define SOFT_PWM_SCALE 0
791 651
 
652
+// Temperature status LEDs that display the hotend and bet temperature.
653
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
654
+// Otherwise the RED led is on. There is 1C hysteresis.
655
+//#define TEMP_STAT_LEDS
656
+
792 657
 // M240  Triggers a camera by emulating a Canon RC-1 Remote
793 658
 // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
794 659
 // #define PHOTOGRAPH_PIN     23
@@ -858,6 +723,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
858 723
 
859 724
 
860 725
 #include "Configuration_adv.h"
726
+#include "Conditionals.h"
727
+#include "SanityCheck.h"
861 728
 #include "thermistortables.h"
862 729
 
863
-#endif //__CONFIGURATION_H
730
+#endif //CONFIGURATION_H

+ 4
- 180
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -89,54 +89,6 @@
89 89
 
90 90
 #define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
91 91
 
92
-
93
-//// AUTOSET LOCATIONS OF LIMIT SWITCHES
94
-//// Added by ZetaPhoenix 09-15-2012
95
-#ifdef MANUAL_HOME_POSITIONS  // Use manual limit switch locations
96
-  #define X_HOME_POS MANUAL_X_HOME_POS
97
-  #define Y_HOME_POS MANUAL_Y_HOME_POS
98
-  #define Z_HOME_POS MANUAL_Z_HOME_POS
99
-#else //Set min/max homing switch positions based upon homing direction and min/max travel limits
100
-  //X axis
101
-  #if X_HOME_DIR == -1
102
-    #ifdef BED_CENTER_AT_0_0
103
-      #define X_HOME_POS X_MAX_LENGTH * -0.5
104
-    #else
105
-      #define X_HOME_POS X_MIN_POS
106
-    #endif //BED_CENTER_AT_0_0
107
-  #else
108
-    #ifdef BED_CENTER_AT_0_0
109
-      #define X_HOME_POS X_MAX_LENGTH * 0.5
110
-    #else
111
-      #define X_HOME_POS X_MAX_POS
112
-    #endif //BED_CENTER_AT_0_0
113
-  #endif //X_HOME_DIR == -1
114
-
115
-  //Y axis
116
-  #if Y_HOME_DIR == -1
117
-    #ifdef BED_CENTER_AT_0_0
118
-      #define Y_HOME_POS Y_MAX_LENGTH * -0.5
119
-    #else
120
-      #define Y_HOME_POS Y_MIN_POS
121
-    #endif //BED_CENTER_AT_0_0
122
-  #else
123
-    #ifdef BED_CENTER_AT_0_0
124
-      #define Y_HOME_POS Y_MAX_LENGTH * 0.5
125
-    #else
126
-      #define Y_HOME_POS Y_MAX_POS
127
-    #endif //BED_CENTER_AT_0_0
128
-  #endif //Y_HOME_DIR == -1
129
-
130
-  // Z axis
131
-  #if Z_HOME_DIR == -1 //BED_CENTER_AT_0_0 not used
132
-    #define Z_HOME_POS Z_MIN_POS
133
-  #else
134
-    #define Z_HOME_POS Z_MAX_POS
135
-  #endif //Z_HOME_DIR == -1
136
-#endif //End auto min/max positions
137
-//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
138
-
139
-
140 92
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
141 93
 
142 94
 // A single Z stepper driver is usually used to drive 2 stepper motors.
@@ -146,26 +98,12 @@
146 98
 // On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
147 99
 //#define Z_DUAL_STEPPER_DRIVERS
148 100
 
149
-#ifdef Z_DUAL_STEPPER_DRIVERS
150
-  #undef EXTRUDERS
151
-  #define EXTRUDERS 1
152
-#endif
153
-
154 101
 // Same again but for Y Axis.
155 102
 //#define Y_DUAL_STEPPER_DRIVERS
156 103
 
157 104
 // Define if the two Y drives need to rotate in opposite directions
158 105
 #define INVERT_Y2_VS_Y_DIR true
159 106
 
160
-#ifdef Y_DUAL_STEPPER_DRIVERS
161
-  #undef EXTRUDERS
162
-  #define EXTRUDERS 1
163
-#endif
164
-
165
-#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
166
-  #error "You cannot have dual drivers for both Y and Z"
167
-#endif
168
-
169 107
 // Enable this for dual x-carriage printers.
170 108
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
171 109
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
@@ -237,12 +175,12 @@
237 175
 
238 176
 // Feedrates for manual moves along X, Y, Z, E from panel
239 177
 #ifdef ULTIPANEL
240
-#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
178
+  #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60}  // set the speeds for manual moves (mm/min)
241 179
 #endif
242 180
 
243
-//Comment to disable setting feedrate multiplier via encoder
181
+// Comment to disable setting feedrate multiplier via encoder
244 182
 #ifdef ULTIPANEL
245
-    #define ULTIPANEL_FEEDMULTIPLY
183
+  #define ULTIPANEL_FEEDMULTIPLY
246 184
 #endif
247 185
 
248 186
 // minimum time in microseconds that a movement needs to take if the buffer is emptied.
@@ -261,13 +199,6 @@
261 199
 // if unwanted behavior is observed on a user's machine when running at very slow speeds.
262 200
 #define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)
263 201
 
264
-// MS1 MS2 Stepper Driver Microstepping mode table
265
-#define MICROSTEP1 LOW,LOW
266
-#define MICROSTEP2 HIGH,LOW
267
-#define MICROSTEP4 LOW,HIGH
268
-#define MICROSTEP8 HIGH,HIGH
269
-#define MICROSTEP16 HIGH,HIGH
270
-
271 202
 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
272 203
 #define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
273 204
 
@@ -336,16 +267,6 @@
336 267
   #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
337 268
   #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
338 269
   #define BABYSTEP_Z_MULTIPLICATOR 2 //faster z movements
339
-
340
-  #ifdef COREXY
341
-    #error BABYSTEPPING not implemented for COREXY yet.
342
-  #endif
343
-
344
-  #ifdef DELTA
345
-    #ifdef BABYSTEP_XY
346
-      #error BABYSTEPPING only implemented for Z axis on deltabots.
347
-    #endif
348
-  #endif
349 270
 #endif
350 271
 
351 272
 // extruder advance constant (s2/mm3)
@@ -379,26 +300,6 @@ const unsigned int dropsegments=5; //everything with less than this number of st
379 300
 // be commented out otherwise
380 301
 #define SDCARDDETECTINVERTED
381 302
 
382
-#ifdef ULTIPANEL
383
- #undef SDCARDDETECTINVERTED
384
-#endif
385
-
386
-// Power Signal Control Definitions
387
-// By default use ATX definition
388
-#ifndef POWER_SUPPLY
389
-  #define POWER_SUPPLY 1
390
-#endif
391
-// 1 = ATX
392
-#if (POWER_SUPPLY == 1)
393
-  #define PS_ON_AWAKE  LOW
394
-  #define PS_ON_ASLEEP HIGH
395
-#endif
396
-// 2 = X-Box 360 203W
397
-#if (POWER_SUPPLY == 2)
398
-  #define PS_ON_AWAKE  HIGH
399
-  #define PS_ON_ASLEEP LOW
400
-#endif
401
-
402 303
 // Control heater 0 and heater 1 in parallel.
403 304
 //#define HEATERS_PARALLEL
404 305
 
@@ -450,81 +351,4 @@ const unsigned int dropsegments=5; //everything with less than this number of st
450 351
   #endif
451 352
 #endif
452 353
 
453
-#ifdef FILAMENTCHANGEENABLE
454
-  #ifdef EXTRUDER_RUNOUT_PREVENT
455
-    #error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
456
-  #endif
457
-#endif
458
-
459
-//===========================================================================
460
-//=============================  Define Defines  ============================
461
-//===========================================================================
462
-#if EXTRUDERS > 1 && defined TEMP_SENSOR_1_AS_REDUNDANT
463
-  #error "You cannot use TEMP_SENSOR_1_AS_REDUNDANT if EXTRUDERS > 1"
464
-#endif
465
-
466
-#if EXTRUDERS > 1 && defined HEATERS_PARALLEL
467
-  #error "You cannot use HEATERS_PARALLEL if EXTRUDERS > 1"
468
-#endif
469
-
470
-#if TEMP_SENSOR_0 > 0
471
-  #define THERMISTORHEATER_0 TEMP_SENSOR_0
472
-  #define HEATER_0_USES_THERMISTOR
473
-#endif
474
-#if TEMP_SENSOR_1 > 0
475
-  #define THERMISTORHEATER_1 TEMP_SENSOR_1
476
-  #define HEATER_1_USES_THERMISTOR
477
-#endif
478
-#if TEMP_SENSOR_2 > 0
479
-  #define THERMISTORHEATER_2 TEMP_SENSOR_2
480
-  #define HEATER_2_USES_THERMISTOR
481
-#endif
482
-#if TEMP_SENSOR_3 > 0
483
-  #define THERMISTORHEATER_3 TEMP_SENSOR_3
484
-  #define HEATER_3_USES_THERMISTOR
485
-#endif
486
-#if TEMP_SENSOR_BED > 0
487
-  #define THERMISTORBED TEMP_SENSOR_BED
488
-  #define BED_USES_THERMISTOR
489
-#endif
490
-#if TEMP_SENSOR_0 == -1
491
-  #define HEATER_0_USES_AD595
492
-#endif
493
-#if TEMP_SENSOR_1 == -1
494
-  #define HEATER_1_USES_AD595
495
-#endif
496
-#if TEMP_SENSOR_2 == -1
497
-  #define HEATER_2_USES_AD595
498
-#endif
499
-#if TEMP_SENSOR_3 == -1
500
-  #define HEATER_3_USES_AD595
501
-#endif
502
-#if TEMP_SENSOR_BED == -1
503
-  #define BED_USES_AD595
504
-#endif
505
-#if TEMP_SENSOR_0 == -2
506
-  #define HEATER_0_USES_MAX6675
507
-#endif
508
-#if TEMP_SENSOR_0 == 0
509
-  #undef HEATER_0_MINTEMP
510
-  #undef HEATER_0_MAXTEMP
511
-#endif
512
-#if TEMP_SENSOR_1 == 0
513
-  #undef HEATER_1_MINTEMP
514
-  #undef HEATER_1_MAXTEMP
515
-#endif
516
-#if TEMP_SENSOR_2 == 0
517
-  #undef HEATER_2_MINTEMP
518
-  #undef HEATER_2_MAXTEMP
519
-#endif
520
-#if TEMP_SENSOR_3 == 0
521
-  #undef HEATER_3_MINTEMP
522
-  #undef HEATER_3_MAXTEMP
523
-#endif
524
-#if TEMP_SENSOR_BED == 0
525
-  #undef BED_MINTEMP
526
-  #undef BED_MAXTEMP
527
-#endif
528
-
529
-
530
-#endif //__CONFIGURATION_ADV_H
354
+#endif //CONFIGURATION_ADV_H

+ 0
- 2
Marlin/language.h View File

@@ -238,8 +238,6 @@
238 238
     #define STR_h3 "\263"
239 239
     #define STR_Deg "\337"
240 240
     #define STR_THERMOMETER "\002"
241
-  #elif defined(ULTRA_LCD)
242
-    #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN for your LCD controller.
243 241
   #endif
244 242
 #endif
245 243
 /*

+ 1
- 1
Marlin/stepper.cpp View File

@@ -89,7 +89,7 @@ static bool old_x_min_endstop = false,
89 89
 static bool check_endstops = true;
90 90
 
91 91
 volatile long count_position[NUM_AXIS] = { 0 };
92
-volatile signed char count_direction[NUM_AXIS] = { 1 };
92
+volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
93 93
 
94 94
 
95 95
 //===========================================================================

+ 3
- 88
Marlin/temperature.cpp View File

@@ -41,50 +41,14 @@
41 41
 //================================== macros =================================
42 42
 //===========================================================================
43 43
 
44
-#if EXTRUDERS > 4
45
-  #error Unsupported number of extruders
46
-#elif EXTRUDERS > 3
47
-  #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1, v2, v3, v4 }
48
-#elif EXTRUDERS > 2
49
-  #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1, v2, v3 }
50
-#elif EXTRUDERS > 1
51
-  #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1, v2 }
52
-#else
53
-  #define ARRAY_BY_EXTRUDERS(v1, v2, v3, v4) { v1 }
44
+#ifdef K1 // Defined in Configuration.h in the PID settings
45
+  #define K2 (1.0-K1)
54 46
 #endif
55 47
 
56
-#define HAS_TEMP_0 (defined(TEMP_0_PIN) && TEMP_0_PIN >= 0)
57
-#define HAS_TEMP_1 (defined(TEMP_1_PIN) && TEMP_1_PIN >= 0)
58
-#define HAS_TEMP_2 (defined(TEMP_2_PIN) && TEMP_2_PIN >= 0)
59
-#define HAS_TEMP_3 (defined(TEMP_3_PIN) && TEMP_3_PIN >= 0)
60
-#define HAS_TEMP_BED (defined(TEMP_BED_PIN) && TEMP_BED_PIN >= 0)
61
-#define HAS_FILAMENT_SENSOR (defined(FILAMENT_SENSOR) && defined(FILWIDTH_PIN) && FILWIDTH_PIN >= 0)
62
-#define HAS_HEATER_0 (defined(HEATER_0_PIN) && HEATER_0_PIN >= 0)
63
-#define HAS_HEATER_1 (defined(HEATER_1_PIN) && HEATER_1_PIN >= 0)
64
-#define HAS_HEATER_2 (defined(HEATER_2_PIN) && HEATER_2_PIN >= 0)
65
-#define HAS_HEATER_3 (defined(HEATER_3_PIN) && HEATER_3_PIN >= 0)
66
-#define HAS_HEATER_BED (defined(HEATER_BED_PIN) && HEATER_BED_PIN >= 0)
67
-#define HAS_AUTO_FAN_0 (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN >= 0)
68
-#define HAS_AUTO_FAN_1 (defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN >= 0)
69
-#define HAS_AUTO_FAN_2 (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN >= 0)
70
-#define HAS_AUTO_FAN_3 (defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN >= 0)
71
-#define HAS_AUTO_FAN HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3
72
-#define HAS_FAN (defined(FAN_PIN) && FAN_PIN >= 0)
73
-
74 48
 //===========================================================================
75 49
 //============================= public variables ============================
76 50
 //===========================================================================
77 51
 
78
-#ifdef K1 // Defined in Configuration.h in the PID settings
79
-  #define K2 (1.0-K1)
80
-#endif
81
-
82
-// Sampling period of the temperature routine
83
-#ifdef PID_dT
84
-  #undef PID_dT
85
-#endif
86
-#define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
87
-
88 52
 int target_temperature[EXTRUDERS] = { 0 };
89 53
 int target_temperature_bed = 0;
90 54
 int current_temperature_raw[EXTRUDERS] = { 0 };
@@ -391,21 +355,6 @@ int getHeaterPower(int heater) {
391 355
 
392 356
 #if HAS_AUTO_FAN
393 357
 
394
-  #if HAS_FAN
395
-    #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN
396
-       #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN"
397
-    #endif
398
-    #if EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN
399
-       #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN"
400
-    #endif
401
-    #if EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN
402
-       #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN"
403
-    #endif
404
-    #if EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN
405
-       #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN"
406
-    #endif
407
-  #endif 
408
-
409 358
 void setExtruderAutoFanState(int pin, bool state)
410 359
 {
411 360
   unsigned char newFanSpeed = (state != 0) ? EXTRUDER_AUTO_FAN_SPEED : 0;
@@ -482,42 +431,8 @@ void checkExtruderAutoFans()
482 431
 #endif // any extruder auto fan pins set
483 432
 
484 433
 //
485
-// Error checking and Write Routines
434
+// Temperature Error Handlers
486 435
 //
487
-#if !HAS_HEATER_0
488
-  #error HEATER_0_PIN not defined for this board
489
-#endif
490
-#define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
491
-#if EXTRUDERS > 1 || defined(HEATERS_PARALLEL)
492
-  #if !HAS_HEATER_1
493
-    #error HEATER_1_PIN not defined for this board
494
-  #endif
495
-  #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v)
496
-  #if EXTRUDERS > 2
497
-    #if !HAS_HEATER_2
498
-      #error HEATER_2_PIN not defined for this board
499
-    #endif
500
-    #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
501
-    #if EXTRUDERS > 3
502
-      #if !HAS_HEATER_3
503
-        #error HEATER_3_PIN not defined for this board
504
-      #endif
505
-      #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
506
-    #endif
507
-  #endif
508
-#endif
509
-#ifdef HEATERS_PARALLEL
510
-  #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
511
-#else
512
-  #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
513
-#endif
514
-#if HAS_HEATER_BED
515
-  #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
516
-#endif
517
-#if HAS_FAN
518
-  #define WRITE_FAN(v) WRITE(FAN_PIN, v)
519
-#endif
520
-
521 436
 inline void _temp_error(int e, const char *msg1, const char *msg2) {
522 437
   if (!IsStopped()) {
523 438
     SERIAL_ERROR_START;

+ 0
- 4
Marlin/ultralcd.cpp View File

@@ -1189,10 +1189,6 @@ void lcd_init() {
1189 1189
      WRITE(SHIFT_OUT,HIGH);
1190 1190
      WRITE(SHIFT_LD,HIGH);
1191 1191
      WRITE(SHIFT_EN,LOW);
1192
-  #else
1193
-     #ifdef ULTIPANEL
1194
-     #error ULTIPANEL requires an encoder
1195
-     #endif
1196 1192
   #endif // SR_LCD_2W_NL
1197 1193
 #endif//!NEWPANEL
1198 1194
 

Loading…
Cancel
Save