|
@@ -26,273 +26,16 @@
|
26
|
26
|
*/
|
27
|
27
|
|
28
|
28
|
#ifndef CONDITIONALS_H
|
29
|
|
-
|
30
|
|
-/**
|
31
|
|
-* Miscellaneous
|
32
|
|
-*/
|
33
|
|
-#ifndef M_PI
|
34
|
|
- #define M_PI 3.1415926536
|
35
|
|
-#endif
|
36
|
|
-
|
37
|
|
-/**
|
38
|
|
- * This value is used by M109 when tying to calculate a ballpark safe margin
|
39
|
|
- * to prevent wait-forever situation.
|
40
|
|
- */
|
41
|
|
-#ifndef EXTRUDE_MINTEMP
|
42
|
|
- #define EXTRUDE_MINTEMP 170
|
43
|
|
-#endif
|
44
|
|
-
|
45
|
|
-#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
|
46
|
|
-#define CONFIGURATION_LCD
|
47
|
|
-
|
48
|
|
- #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
|
49
|
|
-
|
50
|
|
- #if ENABLED(CARTESIO_UI)
|
51
|
|
- #define DOGLCD
|
52
|
|
- #define ULTIPANEL
|
53
|
|
- #define NEWPANEL
|
54
|
|
- #define DEFAULT_LCD_CONTRAST 90
|
55
|
|
- #define LCD_CONTRAST_MIN 60
|
56
|
|
- #define LCD_CONTRAST_MAX 140
|
57
|
|
- #endif
|
58
|
|
-
|
59
|
|
- #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
|
60
|
|
- #define DOGLCD
|
61
|
|
- #define ULTIPANEL
|
62
|
|
- #define NEWPANEL
|
63
|
|
- #define DEFAULT_LCD_CONTRAST 17
|
64
|
|
- #endif
|
65
|
|
-
|
66
|
|
- #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
67
|
|
- #define ULTRA_LCD //general LCD support, also 16x2
|
68
|
|
- #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
69
|
|
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
70
|
|
-
|
71
|
|
- #if ENABLED(miniVIKI)
|
72
|
|
- #define LCD_CONTRAST_MIN 75
|
73
|
|
- #define LCD_CONTRAST_MAX 115
|
74
|
|
- #define DEFAULT_LCD_CONTRAST 95
|
75
|
|
- #elif ENABLED(VIKI2)
|
76
|
|
- #define DEFAULT_LCD_CONTRAST 40
|
77
|
|
- #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
78
|
|
- #define LCD_CONTRAST_MIN 90
|
79
|
|
- #define LCD_CONTRAST_MAX 130
|
80
|
|
- #define DEFAULT_LCD_CONTRAST 110
|
81
|
|
- #define U8GLIB_LM6059_AF
|
82
|
|
- #define SD_DETECT_INVERTED
|
83
|
|
- #endif
|
84
|
|
-
|
85
|
|
- #define ENCODER_PULSES_PER_STEP 4
|
86
|
|
- #define ENCODER_STEPS_PER_MENU_ITEM 1
|
87
|
|
- #endif
|
88
|
|
-
|
89
|
|
- // Generic support for SSD1306 / SH1106 OLED based LCDs.
|
90
|
|
- #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
|
91
|
|
- #define ULTRA_LCD //general LCD support, also 16x2
|
92
|
|
- #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
|
93
|
|
- #endif
|
94
|
|
-
|
95
|
|
- #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
|
96
|
|
- #define ULTIMAKERCONTROLLER
|
97
|
|
- #endif
|
98
|
|
-
|
99
|
|
- #if ENABLED(BQ_LCD_SMART_CONTROLLER)
|
100
|
|
- #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
101
|
|
-
|
102
|
|
- #ifndef ENCODER_PULSES_PER_STEP
|
103
|
|
- #define ENCODER_PULSES_PER_STEP 4
|
104
|
|
- #endif
|
105
|
|
-
|
106
|
|
- #ifndef ENCODER_STEPS_PER_MENU_ITEM
|
107
|
|
- #define ENCODER_STEPS_PER_MENU_ITEM 1
|
108
|
|
- #endif
|
109
|
|
-
|
110
|
|
- #ifndef LONG_FILENAME_HOST_SUPPORT
|
111
|
|
- #define LONG_FILENAME_HOST_SUPPORT
|
112
|
|
- #endif
|
113
|
|
- #endif
|
114
|
|
-
|
115
|
|
- #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
116
|
|
- #define DOGLCD
|
117
|
|
- #define U8GLIB_ST7920
|
118
|
|
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
119
|
|
- #endif
|
120
|
|
-
|
121
|
|
- #if ENABLED(ULTIMAKERCONTROLLER) \
|
122
|
|
- || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
|
123
|
|
- || ENABLED(G3D_PANEL) \
|
124
|
|
- || ENABLED(RIGIDBOT_PANEL) \
|
125
|
|
- || ENABLED(REPRAPWORLD_KEYPAD)
|
126
|
|
- #define ULTIPANEL
|
127
|
|
- #define NEWPANEL
|
128
|
|
- #endif
|
129
|
|
-
|
130
|
|
- #if ENABLED(RA_CONTROL_PANEL)
|
131
|
|
- #define LCD_I2C_TYPE_PCA8574
|
132
|
|
- #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
133
|
|
- #define ULTIPANEL
|
134
|
|
- #define NEWPANEL
|
135
|
|
- #endif
|
136
|
|
-
|
137
|
|
- #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
138
|
|
- #define DOGLCD
|
139
|
|
- #define U8GLIB_ST7920
|
140
|
|
- #define ULTIPANEL
|
141
|
|
- #define NEWPANEL
|
142
|
|
- #endif
|
143
|
|
-
|
144
|
|
- /**
|
145
|
|
- * I2C PANELS
|
146
|
|
- */
|
147
|
|
-
|
148
|
|
- #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
|
149
|
|
- // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
|
150
|
|
- // Make sure it is placed in the Arduino libraries directory.
|
151
|
|
- #define LCD_I2C_TYPE_PCF8575
|
152
|
|
- #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
153
|
|
- #define ULTIPANEL
|
154
|
|
- #define NEWPANEL
|
155
|
|
- #endif
|
156
|
|
-
|
157
|
|
- // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
158
|
|
- #if ENABLED(LCD_I2C_PANELOLU2)
|
159
|
|
- #define LCD_I2C_TYPE_MCP23017
|
160
|
|
- #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
161
|
|
- #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
|
162
|
|
-
|
163
|
|
- #ifndef ENCODER_PULSES_PER_STEP
|
164
|
|
- #define ENCODER_PULSES_PER_STEP 4
|
165
|
|
- #endif
|
166
|
|
-
|
167
|
|
- #ifndef ENCODER_STEPS_PER_MENU_ITEM
|
168
|
|
- #define ENCODER_STEPS_PER_MENU_ITEM 1
|
169
|
|
- #endif
|
170
|
|
-
|
171
|
|
- #define ULTIPANEL
|
172
|
|
- #define NEWPANEL
|
173
|
|
- #endif
|
174
|
|
-
|
175
|
|
- // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
176
|
|
- #if ENABLED(LCD_I2C_VIKI)
|
177
|
|
- // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
178
|
|
- // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
179
|
|
- // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
180
|
|
- // BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
181
|
|
- #define LCD_I2C_TYPE_MCP23017
|
182
|
|
- #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
183
|
|
- #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
|
184
|
|
- #define ULTIPANEL
|
185
|
|
- #define NEWPANEL
|
186
|
|
- #endif
|
187
|
|
-
|
188
|
|
- // Shift register panels
|
189
|
|
- // ---------------------
|
190
|
|
- // 2 wire Non-latching LCD SR from:
|
191
|
|
- // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
192
|
|
-
|
193
|
|
- #if ENABLED(SAV_3DLCD)
|
194
|
|
- #define SR_LCD_2W_NL // Non latching 2 wire shift register
|
195
|
|
- #define ULTIPANEL
|
196
|
|
- #define NEWPANEL
|
197
|
|
- #endif
|
198
|
|
-
|
199
|
|
- #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
|
200
|
|
- #ifndef LCD_WIDTH
|
201
|
|
- #define LCD_WIDTH 22
|
202
|
|
- #endif
|
203
|
|
- #ifndef LCD_HEIGHT
|
204
|
|
- #define LCD_HEIGHT 5
|
205
|
|
- #endif
|
206
|
|
- #endif
|
207
|
|
-
|
208
|
|
- #if ENABLED(ULTIPANEL)
|
209
|
|
- #define NEWPANEL //enable this if you have a click-encoder panel
|
210
|
|
- #define ULTRA_LCD
|
211
|
|
- #ifndef LCD_WIDTH
|
212
|
|
- #define LCD_WIDTH 20
|
213
|
|
- #endif
|
214
|
|
- #ifndef LCD_HEIGHT
|
215
|
|
- #define LCD_HEIGHT 4
|
216
|
|
- #endif
|
217
|
|
- #else //no panel but just LCD
|
218
|
|
- #if ENABLED(ULTRA_LCD)
|
219
|
|
- #ifndef LCD_WIDTH
|
220
|
|
- #define LCD_WIDTH 16
|
221
|
|
- #endif
|
222
|
|
- #ifndef LCD_HEIGHT
|
223
|
|
- #define LCD_HEIGHT 2
|
224
|
|
- #endif
|
225
|
|
- #endif
|
226
|
|
- #endif
|
227
|
|
-
|
228
|
|
- #if ENABLED(DOGLCD)
|
229
|
|
- /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
|
230
|
|
- // \x00 intentionally skipped to avoid problems in strings
|
231
|
|
- #define LCD_STR_REFRESH "\x01"
|
232
|
|
- #define LCD_STR_FOLDER "\x02"
|
233
|
|
- #define LCD_STR_ARROW_RIGHT "\x03"
|
234
|
|
- #define LCD_STR_UPLEVEL "\x04"
|
235
|
|
- #define LCD_STR_CLOCK "\x05"
|
236
|
|
- #define LCD_STR_FEEDRATE "\x06"
|
237
|
|
- #define LCD_STR_BEDTEMP "\x07"
|
238
|
|
- #define LCD_STR_THERMOMETER "\x08"
|
239
|
|
- #define LCD_STR_DEGREE "\x09"
|
240
|
|
-
|
241
|
|
- #define LCD_STR_SPECIAL_MAX '\x09'
|
242
|
|
- // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
|
243
|
|
- // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
|
244
|
|
- #else
|
245
|
|
- /* Custom characters defined in the first 8 characters of the LCD */
|
246
|
|
- #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
|
247
|
|
- #define LCD_STR_DEGREE "\x01"
|
248
|
|
- #define LCD_STR_THERMOMETER "\x02"
|
249
|
|
- #define LCD_STR_UPLEVEL "\x03"
|
250
|
|
- #define LCD_STR_REFRESH "\x04"
|
251
|
|
- #define LCD_STR_FOLDER "\x05"
|
252
|
|
- #define LCD_STR_FEEDRATE "\x06"
|
253
|
|
- #define LCD_STR_CLOCK "\x07"
|
254
|
|
- #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
|
255
|
|
- #endif
|
256
|
|
-
|
257
|
|
- /**
|
258
|
|
- * Default LCD contrast for dogm-like LCD displays
|
259
|
|
- */
|
260
|
|
- #if ENABLED(DOGLCD)
|
261
|
|
-
|
262
|
|
- #define HAS_LCD_CONTRAST ( \
|
263
|
|
- ENABLED(MAKRPANEL) \
|
264
|
|
- || ENABLED(CARTESIO_UI) \
|
265
|
|
- || ENABLED(VIKI2) \
|
266
|
|
- || ENABLED(miniVIKI) \
|
267
|
|
- || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
268
|
|
- )
|
269
|
|
-
|
270
|
|
- #if HAS_LCD_CONTRAST
|
271
|
|
- #ifndef LCD_CONTRAST_MIN
|
272
|
|
- #define LCD_CONTRAST_MIN 0
|
273
|
|
- #endif
|
274
|
|
- #ifndef LCD_CONTRAST_MAX
|
275
|
|
- #define LCD_CONTRAST_MAX 63
|
276
|
|
- #endif
|
277
|
|
- #ifndef DEFAULT_LCD_CONTRAST
|
278
|
|
- #define DEFAULT_LCD_CONTRAST 32
|
279
|
|
- #endif
|
280
|
|
- #endif
|
281
|
|
- #endif
|
282
|
|
-
|
283
|
|
- #ifndef BOOTSCREEN_TIMEOUT
|
284
|
|
- #define BOOTSCREEN_TIMEOUT 2500
|
285
|
|
- #endif
|
286
|
|
-
|
287
|
|
-#else // CONFIGURATION_LCD
|
288
|
|
-
|
289
|
|
- #define CONDITIONALS_H
|
|
29
|
+#define CONDITIONALS_H
|
290
|
30
|
|
291
|
31
|
#include "pins.h"
|
292
|
32
|
|
293
|
33
|
#ifndef USBCON
|
294
|
34
|
#define HardwareSerial_h // trick to disable the standard HWserial
|
295
|
35
|
#endif
|
|
36
|
+ #include "Arduino.h"
|
|
37
|
+
|
|
38
|
+ #include "macros.h"
|
296
|
39
|
|
297
|
40
|
#if ENABLED(EMERGENCY_PARSER)
|
298
|
41
|
#define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410"
|
|
@@ -300,8 +43,6 @@
|
300
|
43
|
#define EMERGENCY_PARSER_CAPABILITIES ""
|
301
|
44
|
#endif
|
302
|
45
|
|
303
|
|
- #include "Arduino.h"
|
304
|
|
-
|
305
|
46
|
/**
|
306
|
47
|
* Set ENDSTOPPULLUPS for unused endstop switches
|
307
|
48
|
*/
|
|
@@ -747,6 +488,7 @@
|
747
|
488
|
#define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
|
748
|
489
|
#define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
|
749
|
490
|
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
|
|
491
|
+ #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
|
750
|
492
|
|
751
|
493
|
#define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
|
752
|
494
|
|
|
@@ -755,6 +497,14 @@
|
755
|
497
|
#define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED))
|
756
|
498
|
|
757
|
499
|
/**
|
|
500
|
+ * This value is used by M109 when trying to calculate a ballpark safe margin
|
|
501
|
+ * to prevent wait-forever situation.
|
|
502
|
+ */
|
|
503
|
+ #ifndef EXTRUDE_MINTEMP
|
|
504
|
+ #define EXTRUDE_MINTEMP 170
|
|
505
|
+ #endif
|
|
506
|
+
|
|
507
|
+ /**
|
758
|
508
|
* Helper Macros for heaters and extruder fan
|
759
|
509
|
*/
|
760
|
510
|
#define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
|
|
@@ -801,7 +551,9 @@
|
801
|
551
|
#endif
|
802
|
552
|
#define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
|
803
|
553
|
|
804
|
|
- #define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
|
|
554
|
+ /**
|
|
555
|
+ * Servos and probes
|
|
556
|
+ */
|
805
|
557
|
|
806
|
558
|
#if HAS_SERVOS
|
807
|
559
|
#ifndef Z_ENDSTOP_SERVO_NR
|
|
@@ -923,5 +675,4 @@
|
923
|
675
|
#define Z_RAISE_BETWEEN_PROBING MIN_Z_HEIGHT_FOR_HOMING
|
924
|
676
|
#endif
|
925
|
677
|
|
926
|
|
-#endif //CONFIGURATION_LCD
|
927
|
678
|
#endif //CONDITIONALS_H
|