|
@@ -28,467 +28,467 @@
|
28
|
28
|
#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
|
29
|
29
|
#define CONDITIONALS_LCD_H
|
30
|
30
|
|
31
|
|
- #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
|
|
31
|
+#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
|
32
|
32
|
|
33
|
|
- #if ENABLED(CARTESIO_UI)
|
|
33
|
+#if ENABLED(CARTESIO_UI)
|
34
|
34
|
|
35
|
|
- #define DOGLCD
|
36
|
|
- #define ULTIPANEL
|
37
|
|
- #define DEFAULT_LCD_CONTRAST 90
|
38
|
|
- #define LCD_CONTRAST_MIN 60
|
39
|
|
- #define LCD_CONTRAST_MAX 140
|
|
35
|
+ #define DOGLCD
|
|
36
|
+ #define ULTIPANEL
|
|
37
|
+ #define DEFAULT_LCD_CONTRAST 90
|
|
38
|
+ #define LCD_CONTRAST_MIN 60
|
|
39
|
+ #define LCD_CONTRAST_MAX 140
|
40
|
40
|
|
41
|
|
- #elif ENABLED(MAKRPANEL)
|
|
41
|
+#elif ENABLED(MAKRPANEL)
|
42
|
42
|
|
43
|
|
- #define U8GLIB_ST7565_64128N
|
44
|
|
-
|
45
|
|
- #elif ENABLED(ANET_KEYPAD_LCD)
|
46
|
|
-
|
47
|
|
- #define REPRAPWORLD_KEYPAD
|
48
|
|
- #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
|
49
|
|
- #define ADC_KEYPAD
|
50
|
|
- #define ADC_KEY_NUM 8
|
51
|
|
- #define ULTIPANEL
|
52
|
|
-
|
53
|
|
- // this helps to implement ADC_KEYPAD menus
|
54
|
|
- #define ENCODER_PULSES_PER_STEP 1
|
55
|
|
- #define ENCODER_STEPS_PER_MENU_ITEM 1
|
56
|
|
- #define REVERSE_MENU_DIRECTION
|
|
43
|
+ #define U8GLIB_ST7565_64128N
|
57
|
44
|
|
58
|
|
- #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
|
|
45
|
+#elif ENABLED(ANET_KEYPAD_LCD)
|
59
|
46
|
|
60
|
|
- #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
|
47
|
+ #define REPRAPWORLD_KEYPAD
|
|
48
|
+ #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
|
|
49
|
+ #define ADC_KEYPAD
|
|
50
|
+ #define ADC_KEY_NUM 8
|
|
51
|
+ #define ULTIPANEL
|
61
|
52
|
|
62
|
|
- #elif ENABLED(BQ_LCD_SMART_CONTROLLER)
|
|
53
|
+ // this helps to implement ADC_KEYPAD menus
|
|
54
|
+ #define ENCODER_PULSES_PER_STEP 1
|
|
55
|
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
|
|
56
|
+ #define REVERSE_MENU_DIRECTION
|
63
|
57
|
|
64
|
|
- #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
|
58
|
+#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
|
65
|
59
|
|
66
|
|
- #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864)
|
|
60
|
+ #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
67
|
61
|
|
68
|
|
- #define ULTRA_LCD //general LCD support, also 16x2
|
69
|
|
- #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
70
|
|
- #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
71
|
|
-
|
72
|
|
- #if ENABLED(miniVIKI)
|
73
|
|
- #define LCD_CONTRAST_MIN 75
|
74
|
|
- #define LCD_CONTRAST_MAX 115
|
75
|
|
- #define DEFAULT_LCD_CONTRAST 95
|
76
|
|
- #define U8GLIB_ST7565_64128N
|
77
|
|
- #elif ENABLED(VIKI2)
|
78
|
|
- #define LCD_CONTRAST_MIN 0
|
79
|
|
- #define LCD_CONTRAST_MAX 255
|
80
|
|
- #define DEFAULT_LCD_CONTRAST 140
|
81
|
|
- #define U8GLIB_ST7565_64128N
|
82
|
|
- #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
83
|
|
- #define LCD_CONTRAST_MIN 90
|
84
|
|
- #define LCD_CONTRAST_MAX 130
|
85
|
|
- #define DEFAULT_LCD_CONTRAST 110
|
86
|
|
- #define U8GLIB_LM6059_AF
|
87
|
|
- #define SD_DETECT_INVERTED
|
88
|
|
- #elif ENABLED(AZSMZ_12864)
|
89
|
|
- #define LCD_CONTRAST_MIN 120
|
90
|
|
- #define LCD_CONTRAST_MAX 255
|
91
|
|
- #define DEFAULT_LCD_CONTRAST 190
|
92
|
|
- #define U8GLIB_ST7565_64128N
|
93
|
|
- #endif
|
|
62
|
+#elif ENABLED(BQ_LCD_SMART_CONTROLLER)
|
94
|
63
|
|
95
|
|
- #elif ENABLED(OLED_PANEL_TINYBOY2)
|
|
64
|
+ #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
96
|
65
|
|
97
|
|
- #define U8GLIB_SSD1306
|
98
|
|
- #define ULTIPANEL
|
99
|
|
- #define REVERSE_ENCODER_DIRECTION
|
100
|
|
- #define REVERSE_MENU_DIRECTION
|
|
66
|
+#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864)
|
101
|
67
|
|
102
|
|
- #elif ENABLED(RA_CONTROL_PANEL)
|
|
68
|
+ #define ULTRA_LCD //general LCD support, also 16x2
|
|
69
|
+ #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
|
70
|
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
103
|
71
|
|
104
|
|
- #define LCD_I2C_TYPE_PCA8574
|
105
|
|
- #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
106
|
|
- #define ULTIPANEL
|
|
72
|
+ #if ENABLED(miniVIKI)
|
|
73
|
+ #define LCD_CONTRAST_MIN 75
|
|
74
|
+ #define LCD_CONTRAST_MAX 115
|
|
75
|
+ #define DEFAULT_LCD_CONTRAST 95
|
|
76
|
+ #define U8GLIB_ST7565_64128N
|
|
77
|
+ #elif ENABLED(VIKI2)
|
|
78
|
+ #define LCD_CONTRAST_MIN 0
|
|
79
|
+ #define LCD_CONTRAST_MAX 255
|
|
80
|
+ #define DEFAULT_LCD_CONTRAST 140
|
|
81
|
+ #define U8GLIB_ST7565_64128N
|
|
82
|
+ #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
|
83
|
+ #define LCD_CONTRAST_MIN 90
|
|
84
|
+ #define LCD_CONTRAST_MAX 130
|
|
85
|
+ #define DEFAULT_LCD_CONTRAST 110
|
|
86
|
+ #define U8GLIB_LM6059_AF
|
|
87
|
+ #define SD_DETECT_INVERTED
|
|
88
|
+ #elif ENABLED(AZSMZ_12864)
|
|
89
|
+ #define LCD_CONTRAST_MIN 120
|
|
90
|
+ #define LCD_CONTRAST_MAX 255
|
|
91
|
+ #define DEFAULT_LCD_CONTRAST 190
|
|
92
|
+ #define U8GLIB_ST7565_64128N
|
|
93
|
+ #endif
|
107
|
94
|
|
108
|
|
- #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
|
95
|
+#elif ENABLED(OLED_PANEL_TINYBOY2)
|
109
|
96
|
|
110
|
|
- #define DOGLCD
|
111
|
|
- #define U8GLIB_ST7920
|
112
|
|
- #define ULTIPANEL
|
|
97
|
+ #define U8GLIB_SSD1306
|
|
98
|
+ #define ULTIPANEL
|
|
99
|
+ #define REVERSE_ENCODER_DIRECTION
|
|
100
|
+ #define REVERSE_MENU_DIRECTION
|
113
|
101
|
|
114
|
|
- #elif ENABLED(CR10_STOCKDISPLAY)
|
|
102
|
+#elif ENABLED(RA_CONTROL_PANEL)
|
115
|
103
|
|
116
|
|
- #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
117
|
|
- #ifndef ST7920_DELAY_1
|
118
|
|
- #define ST7920_DELAY_1 DELAY_2_NOP
|
119
|
|
- #endif
|
120
|
|
- #ifndef ST7920_DELAY_2
|
121
|
|
- #define ST7920_DELAY_2 DELAY_2_NOP
|
122
|
|
- #endif
|
123
|
|
- #ifndef ST7920_DELAY_3
|
124
|
|
- #define ST7920_DELAY_3 DELAY_2_NOP
|
125
|
|
- #endif
|
|
104
|
+ #define LCD_I2C_TYPE_PCA8574
|
|
105
|
+ #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
|
106
|
+ #define ULTIPANEL
|
126
|
107
|
|
127
|
|
- #elif ENABLED(MKS_12864OLED)
|
|
108
|
+#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
128
|
109
|
|
129
|
|
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
130
|
|
- #define U8GLIB_SH1106
|
|
110
|
+ #define DOGLCD
|
|
111
|
+ #define U8GLIB_ST7920
|
|
112
|
+ #define ULTIPANEL
|
131
|
113
|
|
132
|
|
- #elif ENABLED(MKS_MINI_12864)
|
133
|
|
-
|
134
|
|
- #define MINIPANEL
|
|
114
|
+#elif ENABLED(CR10_STOCKDISPLAY)
|
135
|
115
|
|
|
116
|
+ #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
|
117
|
+ #ifndef ST7920_DELAY_1
|
|
118
|
+ #define ST7920_DELAY_1 DELAY_2_NOP
|
136
|
119
|
#endif
|
137
|
|
-
|
138
|
|
- #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
|
139
|
|
- #define DOGLCD
|
140
|
|
- #define ULTIPANEL
|
141
|
|
- #define DEFAULT_LCD_CONTRAST 17
|
|
120
|
+ #ifndef ST7920_DELAY_2
|
|
121
|
+ #define ST7920_DELAY_2 DELAY_2_NOP
|
142
|
122
|
#endif
|
143
|
|
-
|
144
|
|
- // Generic support for SSD1306 / SH1106 OLED based LCDs.
|
145
|
|
- #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
|
146
|
|
- #define ULTRA_LCD //general LCD support, also 16x2
|
147
|
|
- #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
|
|
123
|
+ #ifndef ST7920_DELAY_3
|
|
124
|
+ #define ST7920_DELAY_3 DELAY_2_NOP
|
148
|
125
|
#endif
|
149
|
126
|
|
150
|
|
- #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
|
|
127
|
+#elif ENABLED(MKS_12864OLED)
|
151
|
128
|
|
152
|
|
- #define ULTIMAKERCONTROLLER
|
|
129
|
+ #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
|
130
|
+ #define U8GLIB_SH1106
|
153
|
131
|
|
154
|
|
- #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
|
|
132
|
+#elif ENABLED(MKS_MINI_12864)
|
155
|
133
|
|
156
|
|
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
157
|
|
- #define LCD_WIDTH 16
|
158
|
|
- #define LCD_HEIGHT 2
|
|
134
|
+ #define MINIPANEL
|
159
|
135
|
|
160
|
|
- #endif
|
|
136
|
+#endif
|
161
|
137
|
|
162
|
|
- #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI)
|
163
|
|
- #define DOGLCD
|
164
|
|
- #define U8GLIB_ST7920
|
165
|
|
- #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
166
|
|
- #endif
|
|
138
|
+#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
|
|
139
|
+ #define DOGLCD
|
|
140
|
+ #define ULTIPANEL
|
|
141
|
+ #define DEFAULT_LCD_CONTRAST 17
|
|
142
|
+#endif
|
167
|
143
|
|
168
|
|
- #if ENABLED(ULTIMAKERCONTROLLER) \
|
169
|
|
- || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
|
170
|
|
- || ENABLED(G3D_PANEL) \
|
171
|
|
- || ENABLED(RIGIDBOT_PANEL)
|
172
|
|
- #define ULTIPANEL
|
173
|
|
- #endif
|
|
144
|
+// Generic support for SSD1306 / SH1106 OLED based LCDs.
|
|
145
|
+#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
|
|
146
|
+ #define ULTRA_LCD //general LCD support, also 16x2
|
|
147
|
+ #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
|
|
148
|
+#endif
|
174
|
149
|
|
175
|
|
- #if ENABLED(REPRAPWORLD_KEYPAD)
|
176
|
|
- #define NEWPANEL
|
177
|
|
- #if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
|
178
|
|
- #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
|
179
|
|
- #endif
|
180
|
|
- #endif
|
|
150
|
+#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
|
181
|
151
|
|
182
|
|
- /**
|
183
|
|
- * I2C PANELS
|
184
|
|
- */
|
|
152
|
+ #define ULTIMAKERCONTROLLER
|
185
|
153
|
|
186
|
|
- #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
|
|
154
|
+#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
|
187
|
155
|
|
188
|
|
- // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
189
|
|
- // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
|
156
|
+ #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
|
157
|
+ #define LCD_WIDTH 16
|
|
158
|
+ #define LCD_HEIGHT 2
|
190
|
159
|
|
191
|
|
- #define LCD_I2C_TYPE_PCF8575
|
192
|
|
- #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
193
|
|
- #define ULTIPANEL
|
|
160
|
+#endif
|
194
|
161
|
|
195
|
|
- #elif ENABLED(LCD_I2C_PANELOLU2)
|
|
162
|
+#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI)
|
|
163
|
+ #define DOGLCD
|
|
164
|
+ #define U8GLIB_ST7920
|
|
165
|
+ #define REPRAP_DISCOUNT_SMART_CONTROLLER
|
|
166
|
+#endif
|
196
|
167
|
|
197
|
|
- // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
|
168
|
+#if ENABLED(ULTIMAKERCONTROLLER) \
|
|
169
|
+ || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
|
|
170
|
+ || ENABLED(G3D_PANEL) \
|
|
171
|
+ || ENABLED(RIGIDBOT_PANEL)
|
|
172
|
+ #define ULTIPANEL
|
|
173
|
+#endif
|
198
|
174
|
|
199
|
|
- #define LCD_I2C_TYPE_MCP23017
|
200
|
|
- #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
201
|
|
- #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
|
202
|
|
- #define ULTIPANEL
|
|
175
|
+#if ENABLED(REPRAPWORLD_KEYPAD)
|
|
176
|
+ #define NEWPANEL
|
|
177
|
+ #if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
|
|
178
|
+ #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
|
|
179
|
+ #endif
|
|
180
|
+#endif
|
203
|
181
|
|
204
|
|
- #elif ENABLED(LCD_I2C_VIKI)
|
|
182
|
+/**
|
|
183
|
+ * I2C PANELS
|
|
184
|
+ */
|
205
|
185
|
|
206
|
|
- /**
|
207
|
|
- * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
208
|
|
- *
|
209
|
|
- * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
210
|
|
- * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
211
|
|
- * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
212
|
|
- * BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
213
|
|
- */
|
214
|
|
- #define LCD_I2C_TYPE_MCP23017
|
215
|
|
- #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
216
|
|
- #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
|
217
|
|
- #define ULTIPANEL
|
|
186
|
+#if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
|
218
|
187
|
|
219
|
|
- #define ENCODER_FEEDRATE_DEADZONE 4
|
|
188
|
+ // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
|
189
|
+ // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
220
|
190
|
|
221
|
|
- #define STD_ENCODER_PULSES_PER_STEP 1
|
222
|
|
- #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
|
|
191
|
+ #define LCD_I2C_TYPE_PCF8575
|
|
192
|
+ #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
|
193
|
+ #define ULTIPANEL
|
223
|
194
|
|
224
|
|
- #elif ENABLED(G3D_PANEL)
|
|
195
|
+#elif ENABLED(LCD_I2C_PANELOLU2)
|
225
|
196
|
|
226
|
|
- #define STD_ENCODER_PULSES_PER_STEP 2
|
227
|
|
- #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
197
|
+ // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
228
|
198
|
|
229
|
|
- #elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|
230
|
|
- || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
231
|
|
- || ENABLED(AZSMZ_12864) \
|
232
|
|
- || ENABLED(OLED_PANEL_TINYBOY2) \
|
233
|
|
- || ENABLED(BQ_LCD_SMART_CONTROLLER) \
|
234
|
|
- || ENABLED(LCD_I2C_PANELOLU2) \
|
235
|
|
- || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
236
|
|
- #define STD_ENCODER_PULSES_PER_STEP 4
|
237
|
|
- #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
238
|
|
- #endif
|
|
199
|
+ #define LCD_I2C_TYPE_MCP23017
|
|
200
|
+ #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
|
201
|
+ #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
|
|
202
|
+ #define ULTIPANEL
|
239
|
203
|
|
240
|
|
- #ifndef STD_ENCODER_PULSES_PER_STEP
|
241
|
|
- #define STD_ENCODER_PULSES_PER_STEP 5
|
242
|
|
- #endif
|
243
|
|
- #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
|
244
|
|
- #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
204
|
+#elif ENABLED(LCD_I2C_VIKI)
|
|
205
|
+
|
|
206
|
+ /**
|
|
207
|
+ * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
|
208
|
+ *
|
|
209
|
+ * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
|
210
|
+ * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
|
211
|
+ * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
|
212
|
+ * BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
|
213
|
+ */
|
|
214
|
+ #define LCD_I2C_TYPE_MCP23017
|
|
215
|
+ #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
|
216
|
+ #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
|
|
217
|
+ #define ULTIPANEL
|
|
218
|
+
|
|
219
|
+ #define ENCODER_FEEDRATE_DEADZONE 4
|
|
220
|
+
|
|
221
|
+ #define STD_ENCODER_PULSES_PER_STEP 1
|
|
222
|
+ #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
|
|
223
|
+
|
|
224
|
+#elif ENABLED(G3D_PANEL)
|
|
225
|
+
|
|
226
|
+ #define STD_ENCODER_PULSES_PER_STEP 2
|
|
227
|
+ #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
228
|
+
|
|
229
|
+#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|
|
230
|
+ || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
|
231
|
+ || ENABLED(AZSMZ_12864) \
|
|
232
|
+ || ENABLED(OLED_PANEL_TINYBOY2) \
|
|
233
|
+ || ENABLED(BQ_LCD_SMART_CONTROLLER) \
|
|
234
|
+ || ENABLED(LCD_I2C_PANELOLU2) \
|
|
235
|
+ || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
|
236
|
+ #define STD_ENCODER_PULSES_PER_STEP 4
|
|
237
|
+ #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
238
|
+#endif
|
|
239
|
+
|
|
240
|
+#ifndef STD_ENCODER_PULSES_PER_STEP
|
|
241
|
+ #define STD_ENCODER_PULSES_PER_STEP 5
|
|
242
|
+#endif
|
|
243
|
+#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
|
|
244
|
+ #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
245
|
+#endif
|
|
246
|
+#ifndef ENCODER_PULSES_PER_STEP
|
|
247
|
+ #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
|
|
248
|
+#endif
|
|
249
|
+#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
|
250
|
+ #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
|
|
251
|
+#endif
|
|
252
|
+#ifndef ENCODER_FEEDRATE_DEADZONE
|
|
253
|
+ #define ENCODER_FEEDRATE_DEADZONE 6
|
|
254
|
+#endif
|
|
255
|
+
|
|
256
|
+// Shift register panels
|
|
257
|
+// ---------------------
|
|
258
|
+// 2 wire Non-latching LCD SR from:
|
|
259
|
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
|
260
|
+
|
|
261
|
+#if ENABLED(SAV_3DLCD)
|
|
262
|
+ #define SR_LCD_2W_NL // Non latching 2 wire shift register
|
|
263
|
+ #define ULTIPANEL
|
|
264
|
+#endif
|
|
265
|
+
|
|
266
|
+#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
|
|
267
|
+ #ifndef LCD_WIDTH
|
|
268
|
+ #define LCD_WIDTH 22
|
245
|
269
|
#endif
|
246
|
|
- #ifndef ENCODER_PULSES_PER_STEP
|
247
|
|
- #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
|
|
270
|
+ #ifndef LCD_HEIGHT
|
|
271
|
+ #define LCD_HEIGHT 5
|
248
|
272
|
#endif
|
249
|
|
- #ifndef ENCODER_STEPS_PER_MENU_ITEM
|
250
|
|
- #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
|
|
273
|
+#endif
|
|
274
|
+
|
|
275
|
+#if ENABLED(ULTIPANEL)
|
|
276
|
+ #define NEWPANEL // Disable this if you actually have no click-encoder panel
|
|
277
|
+ #define ULTRA_LCD
|
|
278
|
+ #ifndef LCD_WIDTH
|
|
279
|
+ #define LCD_WIDTH 20
|
251
|
280
|
#endif
|
252
|
|
- #ifndef ENCODER_FEEDRATE_DEADZONE
|
253
|
|
- #define ENCODER_FEEDRATE_DEADZONE 6
|
|
281
|
+ #ifndef LCD_HEIGHT
|
|
282
|
+ #define LCD_HEIGHT 4
|
254
|
283
|
#endif
|
255
|
|
-
|
256
|
|
- // Shift register panels
|
257
|
|
- // ---------------------
|
258
|
|
- // 2 wire Non-latching LCD SR from:
|
259
|
|
- // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
260
|
|
-
|
261
|
|
- #if ENABLED(SAV_3DLCD)
|
262
|
|
- #define SR_LCD_2W_NL // Non latching 2 wire shift register
|
263
|
|
- #define ULTIPANEL
|
|
284
|
+#elif ENABLED(ULTRA_LCD) // no panel but just LCD
|
|
285
|
+ #ifndef LCD_WIDTH
|
|
286
|
+ #define LCD_WIDTH 16
|
264
|
287
|
#endif
|
265
|
|
-
|
266
|
|
- #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
|
267
|
|
- #ifndef LCD_WIDTH
|
268
|
|
- #define LCD_WIDTH 22
|
269
|
|
- #endif
|
270
|
|
- #ifndef LCD_HEIGHT
|
271
|
|
- #define LCD_HEIGHT 5
|
272
|
|
- #endif
|
|
288
|
+ #ifndef LCD_HEIGHT
|
|
289
|
+ #define LCD_HEIGHT 2
|
273
|
290
|
#endif
|
|
291
|
+#endif
|
|
292
|
+
|
|
293
|
+#if ENABLED(DOGLCD)
|
|
294
|
+ /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
|
|
295
|
+ // \x00 intentionally skipped to avoid problems in strings
|
|
296
|
+ #define LCD_STR_REFRESH "\x01"
|
|
297
|
+ #define LCD_STR_FOLDER "\x02"
|
|
298
|
+ #define LCD_STR_ARROW_RIGHT "\x03"
|
|
299
|
+ #define LCD_STR_UPLEVEL "\x04"
|
|
300
|
+ #define LCD_STR_CLOCK "\x05"
|
|
301
|
+ #define LCD_STR_FEEDRATE "\x06"
|
|
302
|
+ #define LCD_STR_BEDTEMP "\x07"
|
|
303
|
+ #define LCD_STR_THERMOMETER "\x08"
|
|
304
|
+ #define LCD_STR_DEGREE "\x09"
|
|
305
|
+
|
|
306
|
+ #define LCD_STR_SPECIAL_MAX '\x09'
|
|
307
|
+ // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
|
|
308
|
+ // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
|
|
309
|
+
|
|
310
|
+ // Symbol characters
|
|
311
|
+ #define LCD_STR_FILAM_DIA "\xf8"
|
|
312
|
+ #define LCD_STR_FILAM_MUL "\xa4"
|
|
313
|
+#else
|
|
314
|
+ /* Custom characters defined in the first 8 characters of the LCD */
|
|
315
|
+ #define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string!
|
|
316
|
+ #define LCD_DEGREE_CHAR 0x01
|
|
317
|
+ #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
|
|
318
|
+ #define LCD_UPLEVEL_CHAR 0x03
|
|
319
|
+ #define LCD_STR_REFRESH "\x04"
|
|
320
|
+ #define LCD_STR_FOLDER "\x05"
|
|
321
|
+ #define LCD_FEEDRATE_CHAR 0x06
|
|
322
|
+ #define LCD_CLOCK_CHAR 0x07
|
|
323
|
+ #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
|
|
324
|
+#endif
|
274
|
325
|
|
275
|
|
- #if ENABLED(ULTIPANEL)
|
276
|
|
- #define NEWPANEL // Disable this if you actually have no click-encoder panel
|
277
|
|
- #define ULTRA_LCD
|
278
|
|
- #ifndef LCD_WIDTH
|
279
|
|
- #define LCD_WIDTH 20
|
280
|
|
- #endif
|
281
|
|
- #ifndef LCD_HEIGHT
|
282
|
|
- #define LCD_HEIGHT 4
|
|
326
|
+/**
|
|
327
|
+ * Default LCD contrast for dogm-like LCD displays
|
|
328
|
+ */
|
|
329
|
+#if ENABLED(DOGLCD)
|
|
330
|
+
|
|
331
|
+ #define HAS_LCD_CONTRAST ( \
|
|
332
|
+ ENABLED(MAKRPANEL) \
|
|
333
|
+ || ENABLED(CARTESIO_UI) \
|
|
334
|
+ || ENABLED(VIKI2) \
|
|
335
|
+ || ENABLED(AZSMZ_12864) \
|
|
336
|
+ || ENABLED(miniVIKI) \
|
|
337
|
+ || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
|
338
|
+ )
|
|
339
|
+
|
|
340
|
+ #if HAS_LCD_CONTRAST
|
|
341
|
+ #ifndef LCD_CONTRAST_MIN
|
|
342
|
+ #define LCD_CONTRAST_MIN 0
|
283
|
343
|
#endif
|
284
|
|
- #elif ENABLED(ULTRA_LCD) // no panel but just LCD
|
285
|
|
- #ifndef LCD_WIDTH
|
286
|
|
- #define LCD_WIDTH 16
|
|
344
|
+ #ifndef LCD_CONTRAST_MAX
|
|
345
|
+ #define LCD_CONTRAST_MAX 63
|
287
|
346
|
#endif
|
288
|
|
- #ifndef LCD_HEIGHT
|
289
|
|
- #define LCD_HEIGHT 2
|
|
347
|
+ #ifndef DEFAULT_LCD_CONTRAST
|
|
348
|
+ #define DEFAULT_LCD_CONTRAST 32
|
290
|
349
|
#endif
|
291
|
350
|
#endif
|
|
351
|
+#endif
|
292
|
352
|
|
293
|
|
- #if ENABLED(DOGLCD)
|
294
|
|
- /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
|
295
|
|
- // \x00 intentionally skipped to avoid problems in strings
|
296
|
|
- #define LCD_STR_REFRESH "\x01"
|
297
|
|
- #define LCD_STR_FOLDER "\x02"
|
298
|
|
- #define LCD_STR_ARROW_RIGHT "\x03"
|
299
|
|
- #define LCD_STR_UPLEVEL "\x04"
|
300
|
|
- #define LCD_STR_CLOCK "\x05"
|
301
|
|
- #define LCD_STR_FEEDRATE "\x06"
|
302
|
|
- #define LCD_STR_BEDTEMP "\x07"
|
303
|
|
- #define LCD_STR_THERMOMETER "\x08"
|
304
|
|
- #define LCD_STR_DEGREE "\x09"
|
305
|
|
-
|
306
|
|
- #define LCD_STR_SPECIAL_MAX '\x09'
|
307
|
|
- // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
|
308
|
|
- // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
|
309
|
|
-
|
310
|
|
- // Symbol characters
|
311
|
|
- #define LCD_STR_FILAM_DIA "\xf8"
|
312
|
|
- #define LCD_STR_FILAM_MUL "\xa4"
|
313
|
|
- #else
|
314
|
|
- /* Custom characters defined in the first 8 characters of the LCD */
|
315
|
|
- #define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string!
|
316
|
|
- #define LCD_DEGREE_CHAR 0x01
|
317
|
|
- #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
|
318
|
|
- #define LCD_UPLEVEL_CHAR 0x03
|
319
|
|
- #define LCD_STR_REFRESH "\x04"
|
320
|
|
- #define LCD_STR_FOLDER "\x05"
|
321
|
|
- #define LCD_FEEDRATE_CHAR 0x06
|
322
|
|
- #define LCD_CLOCK_CHAR 0x07
|
323
|
|
- #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
|
324
|
|
- #endif
|
325
|
|
-
|
326
|
|
- /**
|
327
|
|
- * Default LCD contrast for dogm-like LCD displays
|
328
|
|
- */
|
329
|
|
- #if ENABLED(DOGLCD)
|
330
|
|
-
|
331
|
|
- #define HAS_LCD_CONTRAST ( \
|
332
|
|
- ENABLED(MAKRPANEL) \
|
333
|
|
- || ENABLED(CARTESIO_UI) \
|
334
|
|
- || ENABLED(VIKI2) \
|
335
|
|
- || ENABLED(AZSMZ_12864) \
|
336
|
|
- || ENABLED(miniVIKI) \
|
337
|
|
- || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
338
|
|
- )
|
339
|
|
-
|
340
|
|
- #if HAS_LCD_CONTRAST
|
341
|
|
- #ifndef LCD_CONTRAST_MIN
|
342
|
|
- #define LCD_CONTRAST_MIN 0
|
343
|
|
- #endif
|
344
|
|
- #ifndef LCD_CONTRAST_MAX
|
345
|
|
- #define LCD_CONTRAST_MAX 63
|
346
|
|
- #endif
|
347
|
|
- #ifndef DEFAULT_LCD_CONTRAST
|
348
|
|
- #define DEFAULT_LCD_CONTRAST 32
|
349
|
|
- #endif
|
350
|
|
- #endif
|
351
|
|
- #endif
|
|
353
|
+// Boot screens
|
|
354
|
+#if DISABLED(ULTRA_LCD)
|
|
355
|
+ #undef SHOW_BOOTSCREEN
|
|
356
|
+#elif !defined(BOOTSCREEN_TIMEOUT)
|
|
357
|
+ #define BOOTSCREEN_TIMEOUT 2500
|
|
358
|
+#endif
|
352
|
359
|
|
353
|
|
- // Boot screens
|
354
|
|
- #if DISABLED(ULTRA_LCD)
|
355
|
|
- #undef SHOW_BOOTSCREEN
|
356
|
|
- #elif !defined(BOOTSCREEN_TIMEOUT)
|
357
|
|
- #define BOOTSCREEN_TIMEOUT 2500
|
358
|
|
- #endif
|
|
360
|
+#define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST)
|
359
|
361
|
|
360
|
|
- #define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST)
|
|
362
|
+// MK2 Multiplexer forces SINGLENOZZLE to be enabled
|
|
363
|
+#if ENABLED(MK2_MULTIPLEXER)
|
|
364
|
+ #define SINGLENOZZLE
|
|
365
|
+#endif
|
361
|
366
|
|
362
|
|
- // MK2 Multiplexer forces SINGLENOZZLE to be enabled
|
363
|
|
- #if ENABLED(MK2_MULTIPLEXER)
|
364
|
|
- #define SINGLENOZZLE
|
|
367
|
+/**
|
|
368
|
+ * Extruders have some combination of stepper motors and hotends
|
|
369
|
+ * so we separate these concepts into the defines:
|
|
370
|
+ *
|
|
371
|
+ * EXTRUDERS - Number of Selectable Tools
|
|
372
|
+ * HOTENDS - Number of hotends, whether connected or separate
|
|
373
|
+ * E_STEPPERS - Number of actual E stepper motors
|
|
374
|
+ * E_MANUAL - Number of E steppers for LCD move options
|
|
375
|
+ * TOOL_E_INDEX - Index to use when getting/setting the tool state
|
|
376
|
+ *
|
|
377
|
+ */
|
|
378
|
+#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
|
379
|
+ #define HOTENDS 1
|
|
380
|
+ #undef TEMP_SENSOR_1_AS_REDUNDANT
|
|
381
|
+ #undef HOTEND_OFFSET_X
|
|
382
|
+ #undef HOTEND_OFFSET_Y
|
|
383
|
+#else // Two hotends
|
|
384
|
+ #define HOTENDS EXTRUDERS
|
|
385
|
+ #if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z)
|
|
386
|
+ #define HOTEND_OFFSET_Z { 0 }
|
365
|
387
|
#endif
|
|
388
|
+#endif
|
366
|
389
|
|
367
|
|
- /**
|
368
|
|
- * Extruders have some combination of stepper motors and hotends
|
369
|
|
- * so we separate these concepts into the defines:
|
370
|
|
- *
|
371
|
|
- * EXTRUDERS - Number of Selectable Tools
|
372
|
|
- * HOTENDS - Number of hotends, whether connected or separate
|
373
|
|
- * E_STEPPERS - Number of actual E stepper motors
|
374
|
|
- * E_MANUAL - Number of E steppers for LCD move options
|
375
|
|
- * TOOL_E_INDEX - Index to use when getting/setting the tool state
|
376
|
|
- *
|
377
|
|
- */
|
378
|
|
- #if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
379
|
|
- #define HOTENDS 1
|
380
|
|
- #undef TEMP_SENSOR_1_AS_REDUNDANT
|
381
|
|
- #undef HOTEND_OFFSET_X
|
382
|
|
- #undef HOTEND_OFFSET_Y
|
383
|
|
- #else // Two hotends
|
384
|
|
- #define HOTENDS EXTRUDERS
|
385
|
|
- #if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z)
|
386
|
|
- #define HOTEND_OFFSET_Z { 0 }
|
387
|
|
- #endif
|
388
|
|
- #endif
|
|
390
|
+#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
|
389
|
391
|
|
390
|
|
- #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
|
|
392
|
+#if HOTENDS == 1
|
|
393
|
+ #define HOTEND_INDEX 0
|
|
394
|
+#else
|
|
395
|
+ #define HOTEND_INDEX e
|
|
396
|
+#endif
|
391
|
397
|
|
392
|
|
- #if HOTENDS == 1
|
393
|
|
- #define HOTEND_INDEX 0
|
|
398
|
+#if ENABLED(SWITCHING_EXTRUDER) || ENABLED(MIXING_EXTRUDER) // Unified E axis
|
|
399
|
+ #if ENABLED(MIXING_EXTRUDER)
|
|
400
|
+ #define E_STEPPERS MIXING_STEPPERS
|
394
|
401
|
#else
|
395
|
|
- #define HOTEND_INDEX e
|
|
402
|
+ #define E_STEPPERS 1 // One E stepper
|
396
|
403
|
#endif
|
|
404
|
+ #define E_MANUAL 1
|
|
405
|
+ #define TOOL_E_INDEX 0
|
|
406
|
+#else
|
|
407
|
+ #define E_STEPPERS EXTRUDERS
|
|
408
|
+ #define E_MANUAL EXTRUDERS
|
|
409
|
+ #define TOOL_E_INDEX current_block->active_extruder
|
|
410
|
+#endif
|
397
|
411
|
|
398
|
|
- #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(MIXING_EXTRUDER) // Unified E axis
|
399
|
|
- #if ENABLED(MIXING_EXTRUDER)
|
400
|
|
- #define E_STEPPERS MIXING_STEPPERS
|
401
|
|
- #else
|
402
|
|
- #define E_STEPPERS 1 // One E stepper
|
403
|
|
- #endif
|
404
|
|
- #define E_MANUAL 1
|
405
|
|
- #define TOOL_E_INDEX 0
|
406
|
|
- #else
|
407
|
|
- #define E_STEPPERS EXTRUDERS
|
408
|
|
- #define E_MANUAL EXTRUDERS
|
409
|
|
- #define TOOL_E_INDEX current_block->active_extruder
|
410
|
|
- #endif
|
|
412
|
+/**
|
|
413
|
+ * DISTINCT_E_FACTORS affects how some E factors are accessed
|
|
414
|
+ */
|
|
415
|
+#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
|
|
416
|
+ #define XYZE_N (XYZ + E_STEPPERS)
|
|
417
|
+ #define E_AXIS_N (E_AXIS + extruder)
|
|
418
|
+#else
|
|
419
|
+ #undef DISTINCT_E_FACTORS
|
|
420
|
+ #define XYZE_N XYZE
|
|
421
|
+ #define E_AXIS_N E_AXIS
|
|
422
|
+#endif
|
411
|
423
|
|
412
|
|
- /**
|
413
|
|
- * DISTINCT_E_FACTORS affects how some E factors are accessed
|
414
|
|
- */
|
415
|
|
- #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
|
416
|
|
- #define XYZE_N (XYZ + E_STEPPERS)
|
417
|
|
- #define E_AXIS_N (E_AXIS + extruder)
|
418
|
|
- #else
|
419
|
|
- #undef DISTINCT_E_FACTORS
|
420
|
|
- #define XYZE_N XYZE
|
421
|
|
- #define E_AXIS_N E_AXIS
|
|
424
|
+/**
|
|
425
|
+ * The BLTouch Probe emulates a servo probe
|
|
426
|
+ * and uses "special" angles for its state.
|
|
427
|
+ */
|
|
428
|
+#if ENABLED(BLTOUCH)
|
|
429
|
+ #ifndef Z_ENDSTOP_SERVO_NR
|
|
430
|
+ #define Z_ENDSTOP_SERVO_NR 0
|
422
|
431
|
#endif
|
423
|
|
-
|
424
|
|
- /**
|
425
|
|
- * The BLTouch Probe emulates a servo probe
|
426
|
|
- * and uses "special" angles for its state.
|
427
|
|
- */
|
428
|
|
- #if ENABLED(BLTOUCH)
|
429
|
|
- #ifndef Z_ENDSTOP_SERVO_NR
|
430
|
|
- #define Z_ENDSTOP_SERVO_NR 0
|
431
|
|
- #endif
|
432
|
|
- #ifndef NUM_SERVOS
|
433
|
|
- #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1)
|
434
|
|
- #endif
|
435
|
|
- #undef DEACTIVATE_SERVOS_AFTER_MOVE
|
436
|
|
- #if NUM_SERVOS == 1
|
437
|
|
- #undef SERVO_DELAY
|
438
|
|
- #define SERVO_DELAY { 50 }
|
439
|
|
- #endif
|
440
|
|
- #ifndef BLTOUCH_DELAY
|
441
|
|
- #define BLTOUCH_DELAY 375
|
442
|
|
- #endif
|
443
|
|
- #undef Z_SERVO_ANGLES
|
444
|
|
- #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
|
445
|
|
-
|
446
|
|
- #define BLTOUCH_DEPLOY 10
|
447
|
|
- #define BLTOUCH_STOW 90
|
448
|
|
- #define BLTOUCH_SELFTEST 120
|
449
|
|
- #define BLTOUCH_RESET 160
|
450
|
|
- #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
|
451
|
|
-
|
452
|
|
- // Always disable probe pin inverting for BLTouch
|
453
|
|
- #undef Z_MIN_PROBE_ENDSTOP_INVERTING
|
454
|
|
- #define Z_MIN_PROBE_ENDSTOP_INVERTING false
|
455
|
|
-
|
456
|
|
- #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
457
|
|
- #undef Z_MIN_ENDSTOP_INVERTING
|
458
|
|
- #define Z_MIN_ENDSTOP_INVERTING false
|
459
|
|
- #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN)
|
460
|
|
- #else
|
461
|
|
- #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE)
|
462
|
|
- #endif
|
|
432
|
+ #ifndef NUM_SERVOS
|
|
433
|
+ #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1)
|
463
|
434
|
#endif
|
464
|
|
-
|
465
|
|
- /**
|
466
|
|
- * Set a flag for a servo probe
|
467
|
|
- */
|
468
|
|
- #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
|
469
|
|
-
|
470
|
|
- /**
|
471
|
|
- * UBL has its own manual probing, so this just causes trouble.
|
472
|
|
- */
|
473
|
|
- #if ENABLED(AUTO_BED_LEVELING_UBL)
|
474
|
|
- #undef PROBE_MANUALLY
|
|
435
|
+ #undef DEACTIVATE_SERVOS_AFTER_MOVE
|
|
436
|
+ #if NUM_SERVOS == 1
|
|
437
|
+ #undef SERVO_DELAY
|
|
438
|
+ #define SERVO_DELAY { 50 }
|
|
439
|
+ #endif
|
|
440
|
+ #ifndef BLTOUCH_DELAY
|
|
441
|
+ #define BLTOUCH_DELAY 375
|
475
|
442
|
#endif
|
|
443
|
+ #undef Z_SERVO_ANGLES
|
|
444
|
+ #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
|
|
445
|
+
|
|
446
|
+ #define BLTOUCH_DEPLOY 10
|
|
447
|
+ #define BLTOUCH_STOW 90
|
|
448
|
+ #define BLTOUCH_SELFTEST 120
|
|
449
|
+ #define BLTOUCH_RESET 160
|
|
450
|
+ #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
|
|
451
|
+
|
|
452
|
+ // Always disable probe pin inverting for BLTouch
|
|
453
|
+ #undef Z_MIN_PROBE_ENDSTOP_INVERTING
|
|
454
|
+ #define Z_MIN_PROBE_ENDSTOP_INVERTING false
|
|
455
|
+
|
|
456
|
+ #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
|
457
|
+ #undef Z_MIN_ENDSTOP_INVERTING
|
|
458
|
+ #define Z_MIN_ENDSTOP_INVERTING false
|
|
459
|
+ #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN)
|
|
460
|
+ #else
|
|
461
|
+ #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE)
|
|
462
|
+ #endif
|
|
463
|
+#endif
|
476
|
464
|
|
477
|
|
- /**
|
478
|
|
- * Set a flag for any enabled probe
|
479
|
|
- */
|
480
|
|
- #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
|
|
465
|
+/**
|
|
466
|
+ * Set a flag for a servo probe
|
|
467
|
+ */
|
|
468
|
+#define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
|
481
|
469
|
|
482
|
|
- /**
|
483
|
|
- * Clear probe pin settings when no probe is selected
|
484
|
|
- */
|
485
|
|
- #if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY)
|
486
|
|
- #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
487
|
|
- #undef Z_MIN_PROBE_ENDSTOP
|
488
|
|
- #endif
|
|
470
|
+/**
|
|
471
|
+ * UBL has its own manual probing, so this just causes trouble.
|
|
472
|
+ */
|
|
473
|
+#if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
474
|
+ #undef PROBE_MANUALLY
|
|
475
|
+#endif
|
|
476
|
+
|
|
477
|
+/**
|
|
478
|
+ * Set a flag for any enabled probe
|
|
479
|
+ */
|
|
480
|
+#define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
|
489
|
481
|
|
490
|
|
- #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
491
|
|
- #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
|
492
|
|
- #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
|
|
482
|
+/**
|
|
483
|
+ * Clear probe pin settings when no probe is selected
|
|
484
|
+ */
|
|
485
|
+#if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY)
|
|
486
|
+ #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
|
487
|
+ #undef Z_MIN_PROBE_ENDSTOP
|
|
488
|
+#endif
|
|
489
|
+
|
|
490
|
+#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
|
491
|
+#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
|
|
492
|
+#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
|
493
|
493
|
|
494
|
494
|
#endif // CONDITIONALS_LCD_H
|