forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Prusa_SKR_Conditionals.h
710 lines (619 loc) · 27.5 KB
/
Prusa_SKR_Conditionals.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
#pragma once
//===========================================================================
//========================== DO NOT EDIT THIS FILE ==========================
//===========================================================================
#define CONFIGURATION_H_VERSION 02000902
#define PRUSA_SKR_CONFIGURATION_VERSION 20211003
#define SOURCE_CODE_URL "git.io/J8KKm"
#define WEBSITE_URL SOURCE_CODE_URL
//===========================================================================
//================================== Moved ==================================
//===========================================================================
#error "You're using old firmware! I've moved the project back to https://github.com/thisiskeithb/Marlin/tree/prusa-aio/bugfix-2.0.x . Comment out this line to continue."
//===========================================================================
//=========================== Predefined Configs ============================
//===========================================================================
// Coming soon
/**
* Chris' Bear/Caribou Configs
*
* Options: 1: Bearmera 5: Grey Bear
* 2: Beetlejuice 6: Purple Bear
* 3: Caribou 320 7: Slimer
* 4: Elvira
*/
//#define PRUSA_SKR_CONF_CHRIS 1
/**
* Keith's Bear Configs
*
* Options: 1: Ailuros
* 2: TBD
*/
//#define PRUSA_SKR_CONF_KEITH 1
//===========================================================================
//============================== Printer Name ===============================
//===========================================================================
// "Turbo" moniker is not added because it exceeds the status area's 20 chararcter
// limit due to "Printer Name" + " Ready."
#ifdef PRUSA_SKR_CUSTOM_NAME
#define CUSTOM_MACHINE_NAME PRUSA_SKR_CUSTOM_NAME
#elif PRUSA_SKR_FRAME == 1 || PRUSA_SKR_FRAME == 2
#define CUSTOM_MACHINE_NAME "SKR Bear"
#elif PRUSA_SKR_FRAME == 3 || PRUSA_SKR_FRAME == 4 || PRUSA_SKR_FRAME == 5
#define CUSTOM_MACHINE_NAME "SKR Caribou"
#endif
//===========================================================================
//=========================== Printer/Frame Type ============================
//===========================================================================
// Prusa Bear frame (210mm Z) is enabled by default.
/**
* Options: Bear Frames Caribou Frames
* 1: Bear (210mm Z) 3: Caribou 220 (220mm Z)
* 2: Tall Bear (320mm Z) 4: Caribou 320 (320mm Z)
* 5: Caribou 420 (420mm Z)
*/
#if !defined(PRUSA_SKR_FRAME) || (PRUSA_SKR_FRAME < 1 || PRUSA_SKR_FRAME > 5)
#error "PRUSA_SKR_FRAME is invalid or not defined."
#elif PRUSA_SKR_FRAME == 1 // Bear
#define Z_MAX_POS 210
#elif PRUSA_SKR_FRAME == 3 // Caribou 220
#define Z_MAX_POS 220
#elif PRUSA_SKR_FRAME == 4 || PRUSA_SKR_FRAME == 2 // Tall Bear or Caribou 320
#define Z_MAX_POS 320
#elif PRUSA_SKR_FRAME == 5 // Caribou 420
#define Z_MAX_POS 420
#endif
//===========================================================================
//=============================== Motherboard ===============================
//===========================================================================
// SKR 1.4 is enabled by default.
/**
* Options: 1: BigTreeTech SKR 1.4 (LPC1768)
* 2: BigTreeTech SKR 1.4 Turbo (LPC1769)
* 3: BigTreeTech BTT002 1.0 (STM32F407VGT6)
* 4: BigTreeTech SKR 2.0 Rev. B (STM32F407VGT6)
*/
#if !defined(PRUSA_SKR_MOTHERBOARD) || (PRUSA_SKR_MOTHERBOARD < 1 || PRUSA_SKR_MOTHERBOARD > 4)
#error "PRUSA_SKR_MOTHERBOARD is invalid or not defined."
#elif PRUSA_SKR_MOTHERBOARD == 1 || PRUSA_SKR_MOTHERBOARD == 2 || PRUSA_SKR_MOTHERBOARD == 4 // Independent Dual Z
#define NUM_Z_STEPPER_DRIVERS 2
#define Z2_DRIVER_TYPE TMC2209
#define Z_STEPPER_AUTO_ALIGN
#if (PRUSA_SKR_MOTHERBOARD == 1 || PRUSA_SKR_MOTHERBOARD == 2)
#define SERIAL_PORT 0
#define PRINTCOUNTER
#endif
#if PRUSA_SKR_MOTHERBOARD == 1
#define MOTHERBOARD BOARD_BTT_SKR_V1_4
#elif PRUSA_SKR_MOTHERBOARD == 2
#define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
#elif PRUSA_SKR_MOTHERBOARD == 4
#define MOTHERBOARD BOARD_BTT_SKR_V2_0_REV_B
#define SERIAL_PORT 1
#if ENABLED(PRUSA_SKR_FLASH_DRIVE)
#define USB_FLASH_DRIVE_SUPPORT
#define USE_OTG_USB_HOST
#endif
// Multi-Volume Support
// TODO: Waiting for LCD-based media sharing
//#define MULTI_VOLUME
#if ENABLED(MULTI_VOLUME)
#define VOLUME_SD_ONBOARD
#define VOLUME_USB_FLASH_DRIVE
#define DEFAULT_VOLUME SV_SD_ONBOARD
#define DEFAULT_SHARED_VOLUME SV_USB_FLASH_DRIVE
#endif
#endif
#elif PRUSA_SKR_MOTHERBOARD == 3 // Parallel Dual Z
#if PRUSA_SKR_EXTRUDER == 2 || PRUSA_SKR_EXTRUDER == 4 // No Servo Pins on BTT002
#error "BLTouch on BTT002 is not supported."
#endif
#define MOTHERBOARD BOARD_BTT_BTT002_V1_0
// Invert all directions by default
#define PRUSA_SKR_INVERT_E_DIR_DEFAULT
#define PRUSA_SKR_INVERT_X_DIR_DEFAULT
#define PRUSA_SKR_INVERT_Y_DIR_DEFAULT
#define PRUSA_SKR_INVERT_Z_DIR_DEFAULT
#define SERIAL_PORT 3
// Dual-Z, single driver
#define NUM_Z_STEPPER_DRIVERS 1
#define MECHANICAL_GANTRY_CALIBRATION
#endif
//===========================================================================
//============================= Stepper Motors ==============================
//===========================================================================
/**
* Extruder Stepper Motor
*
* Stock 1.8° extruder stepper is enabled by default.
*
* Options: 1: Stock 1.8°
* 2: Bondtech/Motech 1.8° pancake
* 3: LDO 0.9° pancake
* 4: LDO planetary
*/
#if !defined(PRUSA_SKR_E_STEPPER) || (PRUSA_SKR_E_STEPPER < 1 || PRUSA_SKR_E_STEPPER > 4)
#error "PRUSA_SKR_E_STEPPER is invalid or not defined."
#elif (PRUSA_SKR_E_STEPPER == 1) && (PRUSA_SKR_EXTRUDER == 3 || PRUSA_SKR_EXTRUDER == 4)
#error "Stock 1.8° stepper on a BMG extruder is not supported."
#elif (PRUSA_SKR_E_STEPPER == 2 || PRUSA_SKR_E_STEPPER == 3) && (PRUSA_SKR_EXTRUDER == 1 || PRUSA_SKR_EXTRUDER == 2)
#error "Pancake stepper on a Bear extruder is not supported."
#elif (PRUSA_SKR_E_STEPPER == 4) && (PRUSA_SKR_EXTRUDER == 3 || PRUSA_SKR_EXTRUDER == 4)
#error "Planetary stepper on a BMG extruder is not supported."
#elif PRUSA_SKR_E_STEPPER == 1 // Stock 1.8°
#define INVERT_E0_DIR false
#define PRUSA_SKR_EXTRUDER_STEPS_PER_UNIT 280
#define E0_CURRENT 550
#define E0_MICROSTEPS 32
#elif PRUSA_SKR_E_STEPPER == 2 // Bondtech/Motech 1.8° pancake
#define INVERT_E0_DIR true
#define PRUSA_SKR_EXTRUDER_STEPS_PER_UNIT 830
#define E0_CURRENT 550
#define E0_MICROSTEPS 32
#elif PRUSA_SKR_E_STEPPER == 3 // LDO 0.9° pancake
#define INVERT_E0_DIR true
#define PRUSA_SKR_EXTRUDER_STEPS_PER_UNIT 830
#define E0_CURRENT 550
#define E0_MICROSTEPS 16
#elif PRUSA_SKR_E_STEPPER == 4 // LDO planetary
#define INVERT_E0_DIR true
#define PRUSA_SKR_EXTRUDER_STEPS_PER_UNIT 980
#define E0_CURRENT 650
#define E0_MICROSTEPS 32
#endif
/**
* Extruder Inverting
*/
#if EITHER(PRUSA_SKR_INVERT_E_DIR,PRUSA_SKR_INVERT_E_DIR_DEFAULT) && (INVERT_E0_DIR == true)
#undef INVERT_E0_DIR // Prevent redefined warnings
#define INVERT_E0_DIR false
#elif EITHER(PRUSA_SKR_INVERT_E_DIR,PRUSA_SKR_INVERT_E_DIR_DEFAULT) && (INVERT_E0_DIR == false)
#undef INVERT_E0_DIR // Prevent redefined warnings
#define INVERT_E0_DIR true
#endif
/**
* X/Y Stepper Motors
*
* Stock 1.8° X/Y steppers are enabled by default.
*
* Options: 1: Stock 1.8° X/Y
* 2: LDO 0.9° X/Y
* 3: Moons 0.9° X/Y
*/
#if !defined(PRUSA_SKR_XY_STEPPERS) || (PRUSA_SKR_XY_STEPPERS < 1 || PRUSA_SKR_XY_STEPPERS > 3)
#error "PRUSA_SKR_XY_STEPPERS is invalid or not defined."
#elif PRUSA_SKR_XY_STEPPERS == 1 // Stock 1.8° X/Y
#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 400, (PRUSA_SKR_EXTRUDER_STEPS_PER_UNIT) }
#define X_CURRENT 500
#define X_CURRENT_HOME 200
#define Y_CURRENT 600
#define Y_CURRENT_HOME 250
// StallGuard settings
#ifdef PRUSA_SKR_X_STALL_SENSITIVITY
#define X_STALL_SENSITIVITY PRUSA_SKR_X_STALL_SENSITIVITY
#else
#define X_STALL_SENSITIVITY 90
#endif
#ifdef PRUSA_SKR_Y_STALL_SENSITIVITY
#define Y_STALL_SENSITIVITY PRUSA_SKR_Y_STALL_SENSITIVITY
#else
#define Y_STALL_SENSITIVITY 100
#endif
#elif PRUSA_SKR_XY_STEPPERS == 2 || PRUSA_SKR_XY_STEPPERS == 3 // LDO or Moons 0.9° X/Y
#define DEFAULT_AXIS_STEPS_PER_UNIT { 200, 200, 400, (PRUSA_SKR_EXTRUDER_STEPS_PER_UNIT) }
#if PRUSA_SKR_XY_STEPPERS == 2 // LDO 0.9° X/Y
#define X_CURRENT 900
#define X_CURRENT_HOME 300
#define Y_CURRENT 1000
#define Y_CURRENT_HOME 400
// StallGuard settings
#ifdef PRUSA_SKR_X_STALL_SENSITIVITY
#define X_STALL_SENSITIVITY PRUSA_SKR_X_STALL_SENSITIVITY
#else
#define X_STALL_SENSITIVITY 81
#endif
#ifdef PRUSA_SKR_Y_STALL_SENSITIVITY
#define Y_STALL_SENSITIVITY PRUSA_SKR_Y_STALL_SENSITIVITY
#else
#define Y_STALL_SENSITIVITY 85
#endif
#elif PRUSA_SKR_XY_STEPPERS == 3 // Moons 0.9° X/Y
#define X_CURRENT 650
#define X_CURRENT_HOME 225
#define Y_CURRENT 750
#define Y_CURRENT_HOME 200
// StallGuard settings
#ifdef PRUSA_SKR_X_STALL_SENSITIVITY
#define X_STALL_SENSITIVITY PRUSA_SKR_X_STALL_SENSITIVITY
#else
#define X_STALL_SENSITIVITY 140
#endif
#ifdef PRUSA_SKR_Y_STALL_SENSITIVITY
#define Y_STALL_SENSITIVITY PRUSA_SKR_Y_STALL_SENSITIVITY
#else
#define Y_STALL_SENSITIVITY 132
#endif
#endif
#endif
// Homing speeds (mm/min)
#ifndef PRUSA_SKR_HOMING_FEEDRATE_MM_M
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
#else
#define HOMING_FEEDRATE_MM_M PRUSA_SKR_HOMING_FEEDRATE_MM_M
#endif
/**
* X/Y/Z Inverting
*/
// Default X/Y/Z inverting options
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
#if EITHER(PRUSA_SKR_INVERT_X_DIR, PRUSA_SKR_INVERT_X_DIR_DEFAULT) && (INVERT_X_DIR == true)
#undef INVERT_X_DIR // Prevent redefined warnings
#define INVERT_X_DIR false
#elif EITHER(PRUSA_SKR_INVERT_X_DIR, PRUSA_SKR_INVERT_X_DIR_DEFAULT) && (INVERT_X_DIR == false)
#undef INVERT_X_DIR // Prevent redefined warnings
#define INVERT_X_DIR true
#endif
#if EITHER(PRUSA_SKR_INVERT_Y_DIR, PRUSA_SKR_INVERT_Y_DIR_DEFAULT) && (INVERT_Y_DIR == true)
#undef INVERT_Y_DIR // Prevent redefined warnings
#define INVERT_Y_DIR false
#elif EITHER(PRUSA_SKR_INVERT_Y_DIR, PRUSA_SKR_INVERT_Y_DIR_DEFAULT) && (INVERT_Y_DIR == false)
#undef INVERT_Y_DIR // Prevent redefined warnings
#define INVERT_Y_DIR true
#endif
#if EITHER(PRUSA_SKR_INVERT_Z_DIR, PRUSA_SKR_INVERT_Z_DIR_DEFAULT) && (INVERT_Z_DIR == true)
#undef INVERT_Z_DIR // Prevent redefined warnings
#define INVERT_Z_DIR false
#elif EITHER(PRUSA_SKR_INVERT_Z_DIR, PRUSA_SKR_INVERT_Z_DIR_DEFAULT) && (INVERT_Z_DIR == false)
#undef INVERT_Z_DIR // Prevent redefined warnings
#define INVERT_Z_DIR true
#endif
// Caribou Motor Options...?
//===========================================================================
//================================= Hotend ==================================
//===========================================================================
/**
* Extruder
*
* Bear Extruder is enabled by default.
*
* Options: 1: Bear extruder w/ PINDA V2 or SuperPINDA
* 2: Bear extruder w/ integrated BLTouch mount by Vertigo 235 https://www.prusaprinters.org/prints/6606
* 3: Bondtech BMG extruder w/ PINDA V2 or SuperPINDA https://www.bondtech.se/en/product/prusa-i3-mk3s-extruder-upgrade/
* 4: Bondtech BMG extruder w/ BLTouch mount by Vertigo 235 https://www.prusaprinters.org/prints/6623
* 5: E3D Hemera Note: Shift bed to the left 11mm // X_MIN_POS -11 Y_MIN_POS -2
*/
#if !defined(PRUSA_SKR_EXTRUDER) || (PRUSA_SKR_EXTRUDER < 1 || PRUSA_SKR_EXTRUDER > 4)
#error "PRUSA_SKR_EXTRUDER is invalid or not defined."
#elif PRUSA_SKR_EXTRUDER == 2 || PRUSA_SKR_EXTRUDER == 4 // Bear or Bondtech BMG extruder with BLTouch
#define BLTOUCH
#define TEMP_SENSOR_PROBE 0
#define PROBING_MARGIN 5
#define Z_CLEARANCE_DEPLOY_PROBE 5
#define Z_CLEARANCE_BETWEEN_PROBES 3
#define Z_CLEARANCE_MULTI_PROBE 3
//#define Z_STEPPER_ALIGN_XY { { 10, 105 }, { 220, 105 } } // Use default locations?
#ifdef PRUSA_SKR_NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET PRUSA_SKR_NOZZLE_TO_PROBE_OFFSET
#elif PRUSA_SKR_EXTRUDER == 2 // Bear Extruder w/ integrated BLTouch mount
#define NOZZLE_TO_PROBE_OFFSET { 26.71, 2.298, 0 } // Pulled from https://www.thingiverse.com/thing:3251530/comments#comment-2915938
#elif PRUSA_SKR_EXTRUDER == 4 // Bondtech BMG Extruder w/ BLTouch mount
#define NOZZLE_TO_PROBE_OFFSET { -24.3, -34.1, 0 } // Pulled from https://www.thingiverse.com/thing:3864666/comments#comment-2882122
#endif
#elif PRUSA_SKR_EXTRUDER == 1 || PRUSA_SKR_EXTRUDER == 3 // Bear or Bondtech BMG extruder with PINDA V2/SuperPINDA
#if !defined(PRUSA_SKR_PINDA_PROBE) || (PRUSA_SKR_PINDA_PROBE < 1 || PRUSA_SKR_PINDA_PROBE > 2 )
#error "PRUSA_SKR_PINDA_PROBE is invalid or not defined."
#elif PRUSA_SKR_PINDA_PROBE == 1 // PINDA V2
#define TEMP_SENSOR_PROBE 1
#elif PRUSA_SKR_PINDA_PROBE == 2 // SuperPINDA
#define TEMP_SENSOR_PROBE 0
#endif
#define FIX_MOUNTED_PROBE
#ifdef PRUSA_SKR_NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET PRUSA_SKR_NOZZLE_TO_PROBE_OFFSET
#else
#define NOZZLE_TO_PROBE_OFFSET { 23, 5, 0 }
#endif
#define PROBING_MARGIN 10
#define Z_CLEARANCE_DEPLOY_PROBE 0
#define Z_CLEARANCE_BETWEEN_PROBES 2
#define Z_CLEARANCE_MULTI_PROBE 2
#define PROBING_HEATERS_OFF
#define Z_STEPPER_ALIGN_XY { { 40, 90 }, { 230, 90 } }
#endif
//===========================================================================
//========================= Thermal & PID Settings ==========================
//===========================================================================
/**
* Thermistor
*
* Stock E3D Semitec 104NT-4-R025H42G/104GT-2 thermistor is enabled by default.
*
* Options: 1: E3D Semitec 104NT-4-R025H42G/104GT-2
* 2: Slice Engineering's 450°C High Temperature thermistor
* !WARNING! If you plan to print above 295°C, you will need to upgrade from the stock V6 aluminum block or it will soften and/or melt!
*/
#if !defined(PRUSA_SKR_THERMISTOR) || (PRUSA_SKR_THERMISTOR < 1 || PRUSA_SKR_THERMISTOR > 2)
#error "PRUSA_SKR_THERMISTOR is invalid or not defined."
#elif PRUSA_SKR_THERMISTOR == 1
#define TEMP_SENSOR_0 5
#define HEATER_0_MAXTEMP 310 // 295 + 15
#elif PRUSA_SKR_THERMISTOR == 2
#define TEMP_SENSOR_0 67
#define HEATER_0_MAXTEMP 455 // 450 + 15
#endif
/**
* PID Settings
*
* Stock E3D V6 hotend and Prusa MK52 bed PID settings are enabled by default.
*/
#if ENABLED(PRUSA_SKR_CUSTOM_HOTEND_PID) && (!defined(PRUSA_SKR_DEFAULT_Kp) || !defined(PRUSA_SKR_DEFAULT_Ki) || !defined(PRUSA_SKR_DEFAULT_Kd))
#error "PRUSA_SKR_DEFAULT_Kp, PRUSA_SKR_DEFAULT_Ki, or PRUSA_SKR_DEFAULT_Kd are invalid or not defined."
#elif ENABLED(PRUSA_SKR_CUSTOM_HOTEND_PID) && (defined(PRUSA_SKR_DEFAULT_Kp) && defined(PRUSA_SKR_DEFAULT_Ki) && defined(PRUSA_SKR_DEFAULT_Kd))
#define DEFAULT_Kp PRUSA_SKR_DEFAULT_Kp
#define DEFAULT_Ki PRUSA_SKR_DEFAULT_Ki
#define DEFAULT_Kd PRUSA_SKR_DEFAULT_Kd
#else
#define DEFAULT_Kp 16.50
#define DEFAULT_Ki 1.16
#define DEFAULT_Kd 58.80
#endif
#if ENABLED(PRUSA_SKR_CUSTOM_BED_PID) && (!defined(PRUSA_SKR_DEFAULT_bedKp) || !defined(PRUSA_SKR_DEFAULT_bedKi) || !defined(PRUSA_SKR_DEFAULT_bedKd))
#error "PRUSA_SKR_DEFAULT_bedKp, PRUSA_SKR_DEFAULT_bedKi, or PRUSA_SKR_DEFAULT_bedKd are invalid or not defined."
#elif ENABLED(PRUSA_SKR_CUSTOM_BED_PID) && (defined(PRUSA_SKR_DEFAULT_bedKp) && defined(PRUSA_SKR_DEFAULT_bedKi) && defined(PRUSA_SKR_DEFAULT_bedKd))
#define DEFAULT_bedKp PRUSA_SKR_DEFAULT_bedKp
#define DEFAULT_bedKi PRUSA_SKR_DEFAULT_bedKi
#define DEFAULT_bedKd PRUSA_SKR_DEFAULT_bedKd
#else
#define DEFAULT_bedKp 28.13
#define DEFAULT_bedKi 2.09
#define DEFAULT_bedKd 483.07
#endif
//===========================================================================
//============================ Part Cooling Fan =============================
//===========================================================================
/**
* Part Cooling Fan
*
* Mechatronics 24V B5015E24B-BSR 5015 fan is enabled by default.
*
* 5V options are for BigTreeTech BTT002 1.0 only.
*
* Options: 1: 24v Mechatronics B5015E24B-BSR // https://www.digikey.com/en/products/detail/mechatronics-fan-group/B5015E24B-BSR/5209731
* 2: 24V Delta BFB0524HH // https://www.digikey.com/en/products/detail/delta-electronics/BFB0524HH/1014447
* 3: 5V LDO DF5015H05S // https://www.printedsolid.com/products/ldo-5015-5v-blower-fan-df5015h05s
* 4: 5V Prusa 5015 // https://shop.prusa3d.com/en/spare-parts/1020-print-fan-mk3s-mini.html
*/
#if !defined(PRUSA_SKR_PART_COOLING_FAN) || (PRUSA_SKR_PART_COOLING_FAN < 1 || PRUSA_SKR_PART_COOLING_FAN > 4)
#error "PRUSA_SKR_PART_COOLING_FAN is invalid or not defined."
#elif PRUSA_SKR_MOTHERBOARD == 3 && PRUSA_SKR_PART_COOLING_FAN < 3 // BTT002 needs 5V fans
#error "PRUSA_SKR_PART_COOLING_FAN must be set to 3 or 4."
#elif PRUSA_SKR_PART_COOLING_FAN == 1
#define FAN_MIN_PWM 80
#elif PRUSA_SKR_PART_COOLING_FAN == 2
#define FAN_MIN_PWM 20
#elif PRUSA_SKR_PART_COOLING_FAN == 3
#define FAN_MIN_PWM 51
#elif PRUSA_SKR_PART_COOLING_FAN == 4
#define FAN_MIN_PWM 0 // TODO: Find correct value
#endif
//===========================================================================
//============================= Filament Runout =============================
//===========================================================================
// If filament runout is throwing false alarms, uncomment & increase this value.
// This is NOT the same as FILAMENT_RUNOUT_DISTANCE_MM. See FILAMENT_RUNOUT_DISTANCE_MM in Configuration.h for more info.
//#define FILAMENT_RUNOUT_THRESHOLD 5
// Should this setting be exposed to users?
//===========================================================================
//============================== Bed Leveling ===============================
//===========================================================================
// Bilinear is enabled by default.
/**
* Options: 1: Bilinear
* 2: Unified Bed Leveling
*/
#if !defined(PRUSA_SKR_BED_LEVELING) || (PRUSA_SKR_BED_LEVELING < 1 || PRUSA_SKR_BED_LEVELING > 2)
#error "PRUSA_SKR_BED_LEVELING is invalid or not defined."
#elif PRUSA_SKR_BED_LEVELING == 1
#define AUTO_BED_LEVELING_BILINEAR
#elif PRUSA_SKR_BED_LEVELING == 2
#define AUTO_BED_LEVELING_UBL
#endif
//===========================================================================
//============================= Sheet Profiles ==============================
//===========================================================================
// Automatically adjust Z Probe Offset with M851 based on selected Sheet Profile.
// Up to 10 are supported without changes.
#if ENABLED(PRUSA_SKR_SHEET_PROFILES_MENU)
#define CUSTOM_MENU_CONFIG
#if defined(PRUSA_SKR_SHEET_1_DESC) && defined(PRUSA_SKR_SHEET_1_OFFSET)
#define CONFIG_MENU_ITEM_1_DESC PRUSA_SKR_SHEET_1_DESC
#define CONFIG_MENU_ITEM_1_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_1_OFFSET)
#define CONFIG_MENU_ITEM_1_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_2_DESC) && defined(PRUSA_SKR_SHEET_2_OFFSET)
#define CONFIG_MENU_ITEM_2_DESC PRUSA_SKR_SHEET_2_DESC
#define CONFIG_MENU_ITEM_2_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_2_OFFSET)
#define CONFIG_MENU_ITEM_2_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_3_DESC) && defined(PRUSA_SKR_SHEET_3_OFFSET)
#define CONFIG_MENU_ITEM_3_DESC PRUSA_SKR_SHEET_3_DESC
#define CONFIG_MENU_ITEM_3_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_3_OFFSET)
#define CONFIG_MENU_ITEM_3_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_4_DESC) && defined(PRUSA_SKR_SHEET_4_OFFSET)
#define CONFIG_MENU_ITEM_4_DESC PRUSA_SKR_SHEET_4_DESC
#define CONFIG_MENU_ITEM_4_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_4_OFFSET)
#define CONFIG_MENU_ITEM_4_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_5_DESC) && defined(PRUSA_SKR_SHEET_5_OFFSET)
#define CONFIG_MENU_ITEM_5_DESC PRUSA_SKR_SHEET_5_DESC
#define CONFIG_MENU_ITEM_5_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_5_OFFSET)
#define CONFIG_MENU_ITEM_5_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_6_DESC) && defined(PRUSA_SKR_SHEET_6_OFFSET)
#define CONFIG_MENU_ITEM_6_DESC PRUSA_SKR_SHEET_6_DESC
#define CONFIG_MENU_ITEM_6_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_6_OFFSET)
#define CONFIG_MENU_ITEM_6_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_7_DESC) && defined(PRUSA_SKR_SHEET_7_OFFSET)
#define CONFIG_MENU_ITEM_7_DESC PRUSA_SKR_SHEET_7_DESC
#define CONFIG_MENU_ITEM_7_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_7_OFFSET)
#define CONFIG_MENU_ITEM_7_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_8_DESC) && defined(PRUSA_SKR_SHEET_8_OFFSET)
#define CONFIG_MENU_ITEM_8_DESC PRUSA_SKR_SHEET_8_DESC
#define CONFIG_MENU_ITEM_8_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_8_OFFSET)
#define CONFIG_MENU_ITEM_8_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_9_DESC) && defined(PRUSA_SKR_SHEET_9_OFFSET)
#define CONFIG_MENU_ITEM_9_DESC PRUSA_SKR_SHEET_9_DESC
#define CONFIG_MENU_ITEM_9_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_9_OFFSET)
#define CONFIG_MENU_ITEM_9_CONFIRM
#endif
#if defined(PRUSA_SKR_SHEET_10_DESC) && defined(PRUSA_SKR_SHEET_10_OFFSET)
#define CONFIG_MENU_ITEM_10_DESC PRUSA_SKR_SHEET_10_DESC
#define CONFIG_MENU_ITEM_10_GCODE "M851 Z" STRINGIFY(PRUSA_SKR_SHEET_10_OFFSET)
#define CONFIG_MENU_ITEM_10_CONFIRM
#endif
#endif
//===========================================================================
//================================= Display =================================
//===========================================================================
// Stock / OLED RepRapDiscount smart controller is enabled by default.
/**
* Options: 1: Stock / OLED RepRapDiscount smart controller
* 2: BigTreeTech Dual Mode TFT (TFT35/TFT50/TFT70,etc.)
*/
#if !defined(PRUSA_SKR_DISPLAY) || (PRUSA_SKR_DISPLAY < 1 || PRUSA_SKR_DISPLAY > 2)
#error "PRUSA_SKR_DISPLAY is invalid or not defined."
#elif PRUSA_SKR_DISPLAY == 1
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define LCD_INFO_SCREEN_STYLE 1
#elif PRUSA_SKR_DISPLAY == 2
#if PRUSA_SKR_BED_LEVELING == 2 // Requires UBL
#define MESH_EDIT_GFX_OVERLAY
#endif
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#define BOOT_MARLIN_LOGO_ANIMATED
#define BABYSTEP_ZPROBE_GFX_OVERLAY
#endif
/**
* LCD Language
*
* English is enabled by default:
*
* Options: 1: English 12: Finnish 23: Portuguese
* 2: Aragonese 13: French 24: Portuguese (Brazilian)
* 3: Basque-Euskera 14: Galician 25: Romanian
* 4: Bulgarian 15: German 26: Russian
* 5: Catalan 16: Greek 27: Slovak
* 6: Chinese (Simplified) 17: Greek (Greece) 28: Spanish
* 7: Chinese (Traditional) 18: Hungarian 29: Swedish
* 8: Croatian 19: Italian 30: Turkish
* 9: Czech 20: Japanese 31: Ukrainian
* 10: Danish 21: Korean (South Korea) 32: Vietnamese
* 11: Dutch 22: Polish
*/
#if !defined(PRUSA_SKR_LCD_LANGUAGE) || (PRUSA_SKR_LCD_LANGUAGE < 1 || PRUSA_SKR_LCD_LANGUAGE > 32)
#error "PRUSA_SKR_LCD_LANGUAGE is invalid or not defined."
#elif PRUSA_SKR_LCD_LANGUAGE == 1 // English
#define LCD_LANGUAGE en
#elif PRUSA_SKR_LCD_LANGUAGE == 2 // Aragonese
#define LCD_LANGUAGE an
#elif PRUSA_SKR_LCD_LANGUAGE == 3 // Basque-Euskera
#define LCD_LANGUAGE eu
#elif PRUSA_SKR_LCD_LANGUAGE == 4 // Bulgarian
#define LCD_LANGUAGE bg
#elif PRUSA_SKR_LCD_LANGUAGE == 5 // Catalan
#define LCD_LANGUAGE ca
#elif PRUSA_SKR_LCD_LANGUAGE == 6 // Chinese (Simplified)
#define LCD_LANGUAGE zh_CN
#elif PRUSA_SKR_LCD_LANGUAGE == 7 // Chinese (Traditional)
#define LCD_LANGUAGE zh_TW
#elif PRUSA_SKR_LCD_LANGUAGE == 8 // Croatian
#define LCD_LANGUAGE hr
#elif PRUSA_SKR_LCD_LANGUAGE == 9 // Czech
#define LCD_LANGUAGE cz
#elif PRUSA_SKR_LCD_LANGUAGE == 10 // Danish
#define LCD_LANGUAGE da
#elif PRUSA_SKR_LCD_LANGUAGE == 11 // Dutch
#define LCD_LANGUAGE nl
#elif PRUSA_SKR_LCD_LANGUAGE == 12 // Finnish
#define LCD_LANGUAGE fi
#elif PRUSA_SKR_LCD_LANGUAGE == 13 // French
#define LCD_LANGUAGE fr
#elif PRUSA_SKR_LCD_LANGUAGE == 14 // Galician
#define LCD_LANGUAGE gl
#elif PRUSA_SKR_LCD_LANGUAGE == 15 // German
#define LCD_LANGUAGE de
#elif PRUSA_SKR_LCD_LANGUAGE == 16 // Greek
#define LCD_LANGUAGE el
#elif PRUSA_SKR_LCD_LANGUAGE == 17 // Greek (Greece)
#define LCD_LANGUAGE el_gr
#elif PRUSA_SKR_LCD_LANGUAGE == 18 // Hungarian
#define LCD_LANGUAGE hu
#elif PRUSA_SKR_LCD_LANGUAGE == 19 // Italian
#define LCD_LANGUAGE it
#elif PRUSA_SKR_LCD_LANGUAGE == 20 // Japanese
#define LCD_LANGUAGE jp_kana
#elif PRUSA_SKR_LCD_LANGUAGE == 21 // Korean (South Korea)
#define LCD_LANGUAGE ko_KR
#elif PRUSA_SKR_LCD_LANGUAGE == 22 // Polish
#define LCD_LANGUAGE pl
#elif PRUSA_SKR_LCD_LANGUAGE == 23 // Portuguese
#define LCD_LANGUAGE pt
#elif PRUSA_SKR_LCD_LANGUAGE == 24 // Portuguese (Brazilian)
#define LCD_LANGUAGE pt_br
#elif PRUSA_SKR_LCD_LANGUAGE == 25 // Romanian
#define LCD_LANGUAGE ro
#elif PRUSA_SKR_LCD_LANGUAGE == 26 // Russian
#define LCD_LANGUAGE ru
#elif PRUSA_SKR_LCD_LANGUAGE == 27 // Slovak
#define LCD_LANGUAGE sk
#elif PRUSA_SKR_LCD_LANGUAGE == 28 // Spanish
#define LCD_LANGUAGE es
#elif PRUSA_SKR_LCD_LANGUAGE == 29 // Swedish
#define LCD_LANGUAGE sv
#elif PRUSA_SKR_LCD_LANGUAGE == 30 // Turkish
#define LCD_LANGUAGE tr
#elif PRUSA_SKR_LCD_LANGUAGE == 31 // Ukrainian
#define LCD_LANGUAGE uk
#elif PRUSA_SKR_LCD_LANGUAGE == 32 // Vietnamese
#define LCD_LANGUAGE vi
#endif
//===========================================================================
//================================ NeoPixels ================================
//===========================================================================
// NeoPixels are disabled by default.
#if ENABLED(PRUSA_SKR_NEOPIXELS)
#if PRUSA_SKR_MOTHERBOARD == 3 // BTT002
#error "NeoPixels are not supported on BigTreeTech BTT002 1.0"
#endif
#define NEOPIXEL_LED
#define LED_CONTROL_MENU
/**
* NeoPixel Type
*
* Options: 1: Red, Green, Blue (NEO_GRB)
* 2: Red, Green, Blue, White (NEO_GRBW)
*/
#if defined(PRUSA_SKR_NEOPIXEL_TYPE) && (PRUSA_SKR_NEOPIXEL_TYPE < 1 || PRUSA_SKR_NEOPIXEL_TYPE > 2)
#error "PRUSA_SKR_NEOPIXEL_TYPE is invalid or not defined."
#elif PRUSA_SKR_NEOPIXEL_TYPE == 1
#define NEOPIXEL_TYPE NEO_GRB
#elif PRUSA_SKR_NEOPIXEL_TYPE == 2
#define NEOPIXEL_TYPE NEO_GRBW
#endif
#ifdef PRUSA_SKR_NEOPIXEL_PIXELS
#define NEOPIXEL_PIXELS PRUSA_SKR_NEOPIXEL_PIXELS
#else
#define NEOPIXEL_PIXELS 17
#endif
#ifdef PRUSA_SKR_NEOPIXEL_BRIGHTNESS
#define NEOPIXEL_BRIGHTNESS PRUSA_SKR_NEOPIXEL_BRIGHTNESS
#else
#define NEOPIXEL_BRIGHTNESS 255
#endif
#endif