forked from RF1000community/Repetier-Firmware
/
Configuration.h
1112 lines (893 loc) · 58 KB
/
Configuration.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
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This file is part of the Repetier-Firmware for RF devices from Conrad Electronic SE.
Repetier-Firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Repetier-Firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Repetier-Firmware. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// ##########################################################################################
// ## IMPORTANT
// ##########################################################################################
/* Some words on units:
* Speed is in mm/s
* Acceleration in in mm/s^2
* Temperature is in degrees celsius
*
* For easy configuration, the default settings enable parameter storage in EEPROM.
* This means, after the first upload many variables can only be changed using the special
* M commands as described in the documentation. Changing these values in the configuration.h
* file has no effect. Parameters overriden by EEPROM settings are calibartion values, extruder
* values except thermistor tables and some other parameter likely to change during usage
* like advance steps or ops mode.
* To override EEPROM settings with config settings, set EEPROM_MODE 0
*/
// ##########################################################################################
// ## main hardware configuration
// ##########################################################################################
/** \brief Define the type of your device */
//#define MOTHERBOARD DEVICE_TYPE_RF1000
//#define MOTHERBOARD DEVICE_TYPE_RF2000
//#define MOTHERBOARD DEVICE_TYPE_RF2000v2
#ifndef MOTHERBOARD
#error Device type (RF1000 / RF2000 / RF2000v2) is not defined. Edit Configuration.h or pass the corresponding option to the compiler.
#endif
#if MOTHERBOARD == DEVICE_TYPE_RF2000v2
#error This Mod-Firmware has not been massively tested on a RF2000v2 yet. But the firmware has been created with care. Please remove this message if you acknowledged this.
#endif // MOTHERBOARD == DEVICE_TYPE_RF2000v2
/**
* \brief EEPROM storage mode
* Set the EEPROM_MODE to 0 if you always want to use the settings in this configuration file. If not,
* set it to a value not stored in the first EEPROM-byte used. If you later want to overwrite your current
* EEPROM settings with configuration defaults, just select an other value. On the first call to epr_init()
* it will detect a mismatch of the first byte and copy default values into EEPROM. If the first byte
* matches, the stored values are used to overwrite the settings.
*
* IMPORTANT: With mode <>0 some changes in Configuration.h are not set any more, as they are
* taken from the EEPROM.
*/
#define EEPROM_MODE 44
// ##########################################################################################
// ## supported features
// ##########################################################################################
/** \brief Enables/diables the emergency pause in case of too high pressure */
#define FEATURE_EMERGENCY_PAUSE 1 // 1 = on, 0 = off
/** \brief Specifies if you want to see the pressure digits within the repetier-server/repetier-host temperature message */
#define FEATURE_PRINT_PRESSURE 1 // 1 = on, 0 = off
/** \brief Specifies if you want to adjust your average pressure to zero digits after homing. This pushes the weight-scale to zero by adding the idle pressure as an offset. */
#define FEATURE_ZERO_DIGITS 1
/** \brief Auto-Retract within hardcoded scripts: Pause / Output_Object / ... Vom Hotend abhängig! V2: 10mm, E3D: 1-2mm (?) */
#define SCRIPT_RETRACT_MM 1 //[mm] Firmwares E-Retract */
/** \brief Enables automatic compensation in z direction for the operationg mode "print" */
#define FEATURE_HEAT_BED_Z_COMPENSATION 1 // 1 = on, 0 = off
/** \brief Enables the precise heat bed scan */
#if FEATURE_HEAT_BED_Z_COMPENSATION
#define FEATURE_DIGIT_Z_COMPENSATION 1 // 1 = on, 0 = off
#define FEATURE_DIGIT_FLOW_COMPENSATION 1 // 1 = on, 0 = off
#define FEATURE_SENSIBLE_PRESSURE 1 // 1 = on, 0 = off
#if FEATURE_SENSIBLE_PRESSURE
// mittels SENSIBLE_PRESSURE soll im grunde ausschließlich die wärmeausdehnung in einem perfekt kalibrierten system (HBS,mhier) kompensiert werden:
// Max lift in [um]; Standard: 180um=0,18mm, darf nie 0 sein!! größer 0.2 macht normalerweise keinen Sinn.
// Läuft dieser Wert ins Limit ist die Düse nicht in Ordnung, die Digit-Begrenzung zu niedrig oder das Z-Offset falsch justiert.
#define SENSIBLE_PRESSURE_MAX_OFFSET 180
#define SENSIBLE_PRESSURE_INTERVAL 50 //weniger macht keinen sinn. ob diese einschränkung sinn macht, aber sie bleibt vorerst mal da!
#endif // FEATURE_SENSIBLE_PRESSURE
/** \brief Enables debug outputs from the heat bed scan */
#define DEBUG_HEAT_BED_SCAN 0 // 0 = off, 1 = on, 2 = on with more debug outputs
#endif // FEATURE_HEAT_BED_Z_COMPENSATION
/**
* \brief The Firmwares disalowes movement before you at least: pressed a printers button, set a temperature, homed once
* If you did not do this, a previous watchdog reset is assumed and fail-drive against some border without homing is blocked thatway.
* This is a fix for repetier-server not knowing that the printer reset and still sending commands
*/
#define FEATURE_UNLOCK_MOVEMENT 1 // 1 = on, 0 = off
/**
* XYZ_POSITION_BUTTON_DIRECTION = -1 : This fits to you if you want more intuitivity when choosing the Up-Down-Buttons within "Menu:Position->X-/Y-/Z-Position".
* XYZ_POSITION_BUTTON_DIRECTION = 1 : This fits more if you want to stick to standard coordinates direction.
*/
#define XYZ_POSITION_BUTTON_DIRECTION 1 // 1 = on, 0 = off
/** \brief Enables/disables the emergency stop in case of too high pressure */
#define FEATURE_EMERGENCY_STOP_Z_AND_E 1 // 1 = on, 0 = off
/** \brief Enables/disables the set to x/y origin feature */
#define FEATURE_SET_TO_XY_ORIGIN 1 // 1 = on, 0 = off
/**
* \brief Ditto printing allows 2 extruders to do the same action. This effectively allows
* to print an object two times at the speed of one. Works only with dual extruder setup.
*/
#define FEATURE_DITTO_PRINTING 0 // 1 = on, 0 = off
/** \brief You can store the current position with M401 and go back to it with M402. This works only if feature is set to true. */
#define FEATURE_MEMORY_POSITION 0 // 1 = on, 0 = off
/** \brief If a checksum is sent, all future comamnds must also contain a checksum. Increases reliability especially for binary protocol. */
#define FEATURE_CHECKSUM_FORCED 0 // 1 = on, 0 = off
/** \brief Enables/disables the support for the fan control */
#define FEATURE_FAN_CONTROL 1 // 1 = on, 0 = off
/** \brief Enables/disables the support for G2/G3 arc commands
Arc gcodes can have valid and invalid parameters because of the arcs math and radius/start/endpoint constraints we set by gcode params.
a) Examples for valid arcs:
- Full circles seem to be always working and their behaviour seems to be good.
- If I stand at X=0 Y=0 the G3 X0 Y50 I0 J25 draws a half circle. Thats correct.
- If I stand at X=0 Y=0 the G3 X0 Y50 I10 J25 draws a circle which does not have its center not between start and end. Thats correct.
- From X0 Y0 the half circle G3 X0 Y50 R25 seems to work too.
- From X0 Y0 the half circle G3 X0 Y50 R35 flattens the curve because of the higher radius. Center is not inbetween start and end.
b) Examples for impossible arcs:
- From X0 Y0 the half circle G3 X0 Y50 R15 has an impossible too small radius and sets octoprint to disconnect because of the error message.
- Any circles center offset has to have the same radius from start to center and from center to endpoint. Otherwise we throw an error message.
*/
#define FEATURE_ARC_SUPPORT 1 // 1 = on, 0 = off
/** \brief Enables/disables the beeper */
#define FEATURE_BEEPER 1 // 1 = on, 0 = off
/** \brief Allows to use the service interval */
#define FEATURE_SERVICE_INTERVAL 0 // 1 = on, 0 = off
/** \brief Allows to use the case light @ X19 */
#define FEATURE_CASE_LIGHT 1 // 1 = on, 0 = off
/**
* \brief Allows to control up to 3 servos
* Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
* WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
*/
#define FEATURE_SERVO 1 // 1 = on, 0 = off
// ##########################################################################################
// ## Common extruder configuration
// ##########################################################################################
/** \brief for each extruder, fan will stay on until extruder temperature is below this value */
#define EXTRUDER_FAN_COOL_TEMP 50
/** \brief Maximal temperature which can be set for the extruder */
#define EXTRUDER_MAX_TEMP 275
// ##########################################################################################
// ## Hotend V1
// ##########################################################################################
/** \brief The maximum value, I-gain can contribute to the output. */
#define HT2_PID_INTEGRAL_DRIVE_MAX 130
/** \brief lower value for integral part. */
#define HT2_PID_INTEGRAL_DRIVE_MIN 30
/** \brief P-gain. */
#define HT2_PID_P 37.52
/** \brief I-gain. */
#define HT2_PID_I 10
/** \brief Dgain. */
#define HT2_PID_D 35.18
// ##########################################################################################
// ## Hotend V2
// ##########################################################################################
/** \brief The maximum value, I-gain can contribute to the output. */
#define HT3_PID_INTEGRAL_DRIVE_MAX 120
/** \brief lower value for integral part. */
#define HT3_PID_INTEGRAL_DRIVE_MIN 30
/** \brief P-gain. */
#define HT3_PID_P 12.5
/** \brief I-gain. */
#define HT3_PID_I 3.2
/** \brief Dgain. */
#define HT3_PID_D 18
// ##########################################################################################
// ## Hotend V3
// ##########################################################################################
/** \brief The maximum value, I-gain can contribute to the output. */
#define HT4_PID_INTEGRAL_DRIVE_MAX 120
/** \brief lower value for integral part. */
#define HT4_PID_INTEGRAL_DRIVE_MIN 30
/** \brief P-gain. */
#define HT4_PID_P 17.11
/** \brief I-gain. */
#define HT4_PID_I 2.05
/** \brief Dgain. */
#define HT4_PID_D 35.75
// ##########################################################################################
// ## common configuration
// ##########################################################################################
/**
* \brief Define the to-be-used micro steps.
* Note that high MICRO_STEPS limit your speed because of the limit in 8bit-CPU calculation power.
* See "configuration of the speed vs. cpu usage" within RF1000.h / RF2000.h
*
* Your way to high microsteps is dual-stepping, quadstepping, octostepping. On high speeds that packs steps together to save CPU. Read rf1000.de for the downside. Menu->Stepper->DblFQ: is the setting for the shifting speed.
* High microstepping make your speed low. Dont use 256, avoid 128.
* 256 Microsteps sound very bad and is slower 30mm/s in X and Y. Avoid it! 128 is not much better. 64 might be ok for XY.
* Better dont rise Z because it is already slow with 2560steps/mm @32 Microsteps.
* Change your EEPROMs Steps/mm accordingly if you change RF_MICRO_STEPS_ in this configuration. Steps/mm are autoadjusted if you use FEATURE_ADJUSTABLE_MICROSTEPSs Menu!
*/
#define RF_MICRO_STEPS_Z 16 // standard/best 32 or 16
#define RF_MICRO_STEPS_XY 32 // standard/best 32 or 64
#define RF_MICRO_STEPS_E 32 // standard/best 32 or 64 (or 128?? --> untested!)
/** \brief Enables/disables that you can switch the micro step setting within Menu->Configuration->Stepper and it is saved in hidden EEPROM */
#define FEATURE_ADJUSTABLE_MICROSTEPS 1
// ##########################################################################################
// ## Feedrate and Movement settings
// ##########################################################################################
/** \brief After x seconds of inactivity, the stepper motors are disabled.
Set to 0 to leave them enabled.
This helps cooling the Stepper motors between two print jobs.
Overridden if EEPROM activated. */
#define STEPPER_INACTIVE_TIME 600
/** \brief After x seconds of inactivity, the system will go down as far it can.
It will at least disable all stepper motors and heaters. If the board has
a power pin, it will be disabled, too.
Set value to 0 for disabled.
Overridden if EEPROM activated. */
#define MAX_INACTIVE_TIME 0L
/** \brief Maximum feedrate, the system allows. Higher feedrates are reduced to these values.
The axis order in all axis related arrays is X, Y, Z
Overridden if EEPROM activated. */
#define MAX_FEEDRATE_X 150
#define MAX_FEEDRATE_Y 150
#define MAX_FEEDRATE_Z 9
/** \brief Home position speed in mm/s. Overridden if EEPROM activated. These values can be overridden by EEPROM but are considered as maximum allowed values */
#define HOMING_FEEDRATE_X_PRINT 80
#define HOMING_FEEDRATE_Y_PRINT 80
#define HOMING_FEEDRATE_Z_PRINT 9
#define HOMING_FEEDRATE_X_MILL 70
#define HOMING_FEEDRATE_Y_MILL 70
#define HOMING_FEEDRATE_Z_MILL 7
/** \brief Speed for direct movements in mm/s. Overridden if EEPROM activated. */
#define STANDARD_POSITION_FEEDRATE_XY 100
#define STANDARD_POSITION_FEEDRATE_Z 9
#define STANDARD_POSITION_FEEDRATE_E 25
// ##########################################################################################
// ## Acceleration settings
// ##########################################################################################
// RF2000: Tests haben gezeigt, dass x-y-acceleration unter 2000 oder unter 1500 das Teil ziemlich gut aussieht.
/** \brief X, Y, Z max acceleration in mm/s^2 for printing moves or retracts. Make sure your printer can go that high!
Overridden if EEPROM activated. */
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1500
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1500
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
/** \brief X, Y, Z max acceleration in mm/s^2 for travel moves. Overridden if EEPROM activated. */
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1500
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1500
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
/** \brief X, Y, Z acceleration limits */
#define ACCELERATION_MAX_XY 6000
#define ACCELERATION_MIN_XY 100
#define ACCELERATION_MAX_Z 100
#define ACCELERATION_MIN_Z 5
/** \brief X, Y, Z acceleration menu change step size */
#define ACCELERATION_MENU_CHANGE_XY 100
#define ACCELERATION_MENU_CHANGE_Z 5
#if ACCELERATION_MAX_XY < MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X || MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X < ACCELERATION_MIN_XY
#error Please respect the given acceleration limits or change them according your needs within Configuration.h
#endif // NUM_EXTRUDER > 2 || NUM_EXTRUDER < 0
#if ACCELERATION_MAX_XY < MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y || MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y < ACCELERATION_MIN_XY
#error Please respect the given acceleration limits or change them according your needs within Configuration.h
#endif // NUM_EXTRUDER > 2 || NUM_EXTRUDER < 0
#if ACCELERATION_MAX_Z < MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z || MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z < ACCELERATION_MAX_Z
#error Please respect the given acceleration limits or change them according your needs within Configuration.h
#endif // NUM_EXTRUDER > 2 || NUM_EXTRUDER < 0
#if ACCELERATION_MAX_XY < MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X || MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X < ACCELERATION_MIN_XY
#error Please respect the given x travel acceleration limits or change them according your needs within Configuration.h
#endif // NUM_EXTRUDER > 2 || NUM_EXTRUDER < 0
#if ACCELERATION_MAX_XY < MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y || MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y < ACCELERATION_MIN_XY
#error Please respect the given y travel acceleration limits or change them according your needs within Configuration.h
#endif // NUM_EXTRUDER > 2 || NUM_EXTRUDER < 0
#if ACCELERATION_MAX_Z < MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z || MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z < ACCELERATION_MAX_Z
#error Please respect the given z travel acceleration limits or change them according your needs within Configuration.h
#endif // NUM_EXTRUDER > 2 || NUM_EXTRUDER < 0
// E-ACCELERATION is extruder configuration and has no strict limits rightnow.
// ##########################################################################################
// ## Jerk settings
// ##########################################################################################
/** \brief Maximum allowable jerk.
Caution: This is no real jerk in a physical meaning.
The jerk determines your start speed and the maximum speed at the join of two segments.
Its unit is mm/s. If the printer is standing still, the start speed is jerk/2. At the
join of two segments, the speed difference is limited to the jerk value.
Examples:
For all examples jerk is assumed as 40.
Segment 1: vx = 50, vy = 0
Segment 2: vx = 0, vy = 50
v_diff = sqrt((50-0)^2+(0-50)^2) = 70.71
v_diff > jerk => vx_1 = vy_2 = jerk/v_diff*vx_1 = 40/70.71*50 = 28.3 mm/s at the join
Segment 1: vx = 50, vy = 0
Segment 2: vx = 35.36, vy = 35.36
v_diff = sqrt((50-35.36)^2+(0-35.36)^2) = 38.27 < jerk
Corner can be printed with full speed of 50 mm/s
Overridden if EEPROM activated. */
#define MAX_JERK 13.0 //std: 20, aber RFx000 sieht zwischen ca. 7 und 18 am besten aus: Renkforce sagt 10
#define MAX_ZJERK 0.3 //std: 0.3
//that will slowdown if you have sever direction changes in a short distance which is nearly the same as adding several jerks in a short sequence.
#define REDUCE_ON_SMALL_SEGMENTS 1
#define MAX_JERK_DISTANCE 0.6
//for a more logical jerk computation.
#define ALTERNATIVE_JERK 1
// ##########################################################################################
// ## debugging
// ##########################################################################################
/**
* \brief Writes the free RAM to output, if it is less then at the last test. Should always return
* values >500 for safety, since it doesn't catch every function call. Nice to tweak cache
* usage or for seraching for memory induced errors. Switch it off for production, it costs execution time.
*/
#define DEBUG_FREE_MEMORY 0 // 1 = on, 0 = off
#if DEBUG_FREE_MEMORY
#define DEBUG_MEMORY Commands::checkFreeMemory();
#else
#define DEBUG_MEMORY
#endif // DEBUG_FREE_MEMORY
// ##########################################################################################
// ## configuration of the extended buttons
// ##########################################################################################
#define EXTENDED_BUTTONS_COUNTER_NORMAL 4 // 39 ~ run 100 times per second, 4 ~ run 1000 times per second
#define EXTENDED_BUTTONS_COUNTER_FAST 4 // 39 ~ run 100 times per second, 4 ~ run 1000 times per second
#define EXTENDED_BUTTONS_STEPPER_DELAY 1 // [us]
// ##########################################################################################
// ## configuration of the output object functionality
// ##########################################################################################
/** \brief The following script allows to configure the exact behavior of the automatic object output */
#define OUTPUT_OBJECT_SCRIPT_PRINT "G21\nG92 E0\nG1 E-" xstr(SCRIPT_RETRACT_MM) "\nG4 P100\nG92 E0\nG90\nG1 Z200 F540\nG1 Y245 F4800"
#define OUTPUT_OBJECT_SCRIPT_MILL "G28 Z0\nG21\nG91\nG1 Y245 F4800"
// ##########################################################################################
// ## configuration of the pause functionality
// ##########################################################################################
#if !FEATURE_HEAT_BED_Z_COMPENSATION && !FEATURE_WORK_PART_Z_COMPENSATION
#error FEATURE_PAUSE_PRINTING can not be used without FEATURE_HEAT_BED_Z_COMPENSATION or FEATURE_WORK_PART_Z_COMPENSATION
#endif // !FEATURE_HEAT_BED_Z_COMPENSATION && !FEATURE_WORK_PART_Z_COMPENSATION
/** \brief Specifies the time interval after the pausing of the print at which the extruder current is reduced */
#define EXTRUDER_CURRENT_PAUSE_DELAY 60000 // [ms] Minimum 30000 -> 30s.
/** \brief Specifies the extruder current which shall be use after pausing of the print and before continuing of the print */
#define EXTRUDER_CURRENT_PAUSED 32 // ~0.5A
// ##########################################################################################
// ## configuration of the park functionality
// ##########################################################################################
/** \brief Enables/disables the park feature */
#define FEATURE_PARK 0 // 1 = on, 0 = off
/** \brief Specifies the park position, in [mm] */
#define PARK_POSITION_X 0 // [mm]
#define PARK_POSITION_Y 120 // [mm]
#define PARK_POSITION_Z 175 // [mm]
// ##########################################################################################
// ## configuration of the emergency pause functionality
// ##########################################################################################
#if FEATURE_EMERGENCY_PAUSE
/**
* \brief Specifies the pressure at which the emergency pause shall be performed, in [digits]
* @ ca. +- 15000 the sensors tend to start bending
* With RF1.37r2.Mod the Emergency-Pause-Features limits can be changed in EEPROM and Printers Menu. Here are the absolute maximum limits:
*/
#define EMERGENCY_PAUSE_DIGITS_MIN -11000 // [digits]
#define EMERGENCY_PAUSE_DIGITS_MAX 11000 // [digits]
/** \brief Specifies the interval at which the pressure check shall be performed, in [ms] */
#define EMERGENCY_PAUSE_INTERVAL 100
/** \brief Specifies the number of pressure values which shall be averaged. The emergency pause can be detected each EMERGENCY_PAUSE_INTERVAL * EMERGENCY_PAUSE_CHECKS [ms] */
#define EMERGENCY_PAUSE_CHECKS 10
#endif // FEATURE_EMERGENCY_PAUSE
// ##########################################################################################
// ## configuration of the emergency stop functionality
// ##########################################################################################
#if FEATURE_EMERGENCY_STOP_Z_AND_E
/**
* \brief
* Specifies the pressure at which
* - the z emergency stop shall be performed
* - extrusion is forbidden
*
* Do not set them to Zero.
*/
#define EMERGENCY_STOP_DIGITS_MIN -12500 // [digits]
#define EMERGENCY_STOP_DIGITS_MAX 12500 // [digits]
/** \brief Specifies the interval at which the pressure check shall be performed, in [ms] */
#define EMERGENCY_STOP_INTERVAL 10
/** \brief Specifies the number of pressure values which shall be averaged. The emergency stop can be detected each EMERGENCY_STOP_INTERVAL * EMERGENCY_STOP_CHECKS [ms] */
#define EMERGENCY_STOP_CHECKS 3
#endif // FEATURE_EMERGENCY_STOP_Z_AND_E
// ##########################################################################################
// ## configuration of the service intervall
// ##########################################################################################
#if FEATURE_SERVICE_INTERVAL
/**
* \brief Wie setze ich den Interval wieder zurück, ohne die Firmware neu aufzuspielen?
* Um diese Meldung zurück zu setzen muss man den RFx000 ausschalten, die Knöpfe "links", "rauf" und "runter" drücken (und alle drei gedrückt halten), den RFx000 einschalten und die Knöpfe ca. 5-10 Sekunden danach loslassen.
* Damit werden die Service-Zähler wieder auf 0 zurück gestellt.
*/
/** \brief Specifies the max printed hours [h] */
#define HOURS_PRINTED_UNTIL_SERVICE 100
/** \brief Specifies the max milling hours [h] */
#define HOURS_MILLED_UNTIL_SERVICE 100
/** \brief Specifies the max printed filament [m] */
#define FILAMENT_PRINTED_UNTIL_SERVICE 50000
#endif // FEATURE_SERVICE_INTERVAL
// ##########################################################################################
// ## configuration of user-defined thermistor tables
// ##########################################################################################
/**
* There are many different thermistors, which can be combined with different resistors. This result
* in unpredictable number of tables. As a resolution, the user can define one table here, that can
* be used as type 5 for thermister type in extruder/heated bed definition. Make sure, the number of entries
* matches the value in NUM_TEMPS_USERTHERMISTOR0. If you span definition over multiple lines, make sure to end
* each line, except the last, with a backslash. The table format is {{adc1,temp1},{adc2,temp2}...} with
* increasing adc values. For more informations, read
* http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html
*
* If you have a sprinter temperature table, you have to multiply the first value with 4 and the second with 8.
* This firmware works with increased precision, so the value reads go from 0 to 4095 and the temperature is
* temperature*8.
*
* If you have a PTC thermistor instead of a NTC thermistor, keep the adc values increasing and use themistor types 50-52 instead of 5-7!
*/
/** \brief Number of entries in the user thermistor table 0. Set to 0 to disable it. */
#define NUM_TEMPS_USERTHERMISTOR0 28
#define USER_THERMISTORTABLE0 {\
{1*4,864*8},{21*4,280*8},{25*4,270*8},{29*4,260*8},{33*4,250*8},{39*4,240*8},{46*4,230*8},{54*4,220*8},{64*4,210*8},{75*4,200*8},\
{90*4,190*8},{107*4,180*8},{128*4,170*8},{154*4,160*8},{184*4,150*8},{221*4,140*8},{265*4,130*8},{316*4,120*8},{375*4,110*8},\
{441*4,105*8},{513*4,100*8},{588*4,100*8},{734*4,80*8},{856*4,60*8},{938*4,40*8},{986*4,20*8},{1008*4,0*8},{1018*4,-20*8} }
/** \brief Number of entries in the user thermistor table 1. Set to 0 to disable it. */
#define NUM_TEMPS_USERTHERMISTOR1 0
#define USER_THERMISTORTABLE1 {}
/** \brief Number of entries in the user thermistor table 2. Set to 0 to disable it. */
#define NUM_TEMPS_USERTHERMISTOR2 0
#define USER_THERMISTORTABLE2 {}
/**
* \brief If defined, creates a thermistor table at startup.
*
* If you don't feel like computing the table on your own, you can use this generic method. It is
* a simple approximation which may be not as accurate as a good table computed from the reference
* values in the datasheet. You can increase precision if you use a temperature/resistance for
* R0/T0, which is near your operating temperature. This will reduce precision for lower temperatures,
* which are not realy important. The resistors must fit the following schematic:
* @code
* VREF ---- R2 ---+--- Termistor ---+-- GND
* | |
* +------ R1 -------+
* | |
* +---- Capacitor --+
* |
* V measured
* @endcode
*
* If you don't have R1, set it to 0.
* The capacitor is for reducing noise from long thermistor cable. If you don't have one, it's OK.
*
* If you need the generic table, uncomment the following define.
*/
//#define USE_GENERIC_THERMISTORTABLE_1
/* Some examples for different thermistors:
EPCOS B57560G104+ : R0 = 100000 T0 = 25 Beta = 4036
EPCOS 100K Thermistor (B57560G1104F) : R0 = 100000 T0 = 25 Beta = 4092
ATC Semitec 104GT-2 : R0 = 100000 T0 = 25 Beta = 4267
Honeywell 100K Thermistor (135-104LAG-J01) : R0 = 100000 T0 = 25 Beta = 3974
*/
/** \brief Reference Temperature */
#define GENERIC_THERM1_T0 25
/** \brief Resistance at reference temperature */
#define GENERIC_THERM1_R0 200000
/**
* \brief Beta value of thermistor
* You can use the beta from the datasheet or compute it yourself.
* See http://reprap.org/wiki/MeasuringThermistorBeta for more details.
*/
#define GENERIC_THERM1_BETA 8304
/** \brief Start temperature for generated thermistor table */
#define GENERIC_THERM1_MIN_TEMP -20
/** \brief End Temperature for generated thermistor table */
#define GENERIC_THERM1_MAX_TEMP 300
#define GENERIC_THERM1_R1 0
#define GENERIC_THERM1_R2 4700
// The same for table 2 and 3 if needed
/** \brief USE_GENERIC_THERMISTORTABLE_2 */
#define GENERIC_THERM2_T0 170
#define GENERIC_THERM2_R0 1042.7f
#define GENERIC_THERM2_BETA 4036
#define GENERIC_THERM2_MIN_TEMP -20
#define GENERIC_THERM2_MAX_TEMP 300
#define GENERIC_THERM2_R1 0
#define GENERIC_THERM2_R2 4700
/** \brief USE_GENERIC_THERMISTORTABLE_3 */
#define GENERIC_THERM3_T0 170
#define GENERIC_THERM3_R0 1042.7f
#define GENERIC_THERM3_BETA 4036
#define GENERIC_THERM3_MIN_TEMP -20
#define GENERIC_THERM3_MAX_TEMP 300
#define GENERIC_THERM3_R1 0
#define GENERIC_THERM3_R2 4700
/** \brief Supply voltage to ADC, can be changed by setting ANALOG_REF below to different value. */
#define GENERIC_THERM_VREF 5
/**
* \brief Number of entries in generated table. One entry takes 4 bytes. Higher number of entries increase computation time too.
* Value is used for all generic tables created.
*/
#define GENERIC_THERM_NUM_ENTRIES 33
/** \brief If enabled, writes the created generic table to serial port at startup. */
//#define PRINT_GENERIC_TEMP_TABLE
// ##########################################################################################
// ## sensor heater decoupling
// ##########################################################################################
/**
* \brief The firmware checks if the heater and sensor got decoupled, which is dangerous. Since it will never reach target
* temperature, the heater will stay on for every which can burn your printer or house.
* As an additional barrier to your smoke detectors (I hope you have one above your printer) we now
* do some more checks to detect if something got wrong.
*/
// If the temp. is on hold target, it may not sway more then this degrees celsius, or we mark sensor as defect.
#define DECOUPLING_TEST_MAX_HOLD_VARIANCE 20 //°K (+-)
// Minimum temp. rise we expect after the set duration of full heating is over.
// Always keep a good safety margin to get no false positives. If your period is e.g. 10 seconds
// because at startup you already need 7 seconds until heater starts to rise temp. for sensor
// then you have 3 seconds of increased heating to reach 1°C.
#define DECOUPLING_TEST_MIN_TEMP_RISE 1 //°C
// Time in ms between a heater action and test of success. Must be more then time between turning heater on and first temp. rise!
// 0 will disable decoupling test
#define EXT0_DECOUPLE_TEST_PERIOD 12000
#define EXT1_DECOUPLE_TEST_PERIOD 12000
#define BED_DECOUPLE_TEST_PERIOD 12000
// ##########################################################################################
// ## duplicate motor drivers
// ##########################################################################################
/**
* \brief If you have an unused extruder stepper free, you could use it to drive the second z motor
* instead of driving both with a single stepper. The same works for the other axis if needed.
*/
#define FEATURE_TWO_XSTEPPER false
#define X2_STEP_PIN E1_STEP_PIN
#define X2_DIR_PIN E1_DIR_PIN
#define X2_ENABLE_PIN E1_ENABLE_PIN
#define FEATURE_TWO_YSTEPPER false
#define Y2_STEP_PIN E1_STEP_PIN
#define Y2_DIR_PIN E1_DIR_PIN
#define Y2_ENABLE_PIN E1_ENABLE_PIN
#define FEATURE_TWO_ZSTEPPER false
#define Z2_STEP_PIN E1_STEP_PIN
#define Z2_DIR_PIN E1_DIR_PIN
#define Z2_ENABLE_PIN E1_ENABLE_PIN
// ##########################################################################################
// ## configure the SD Card
// ##########################################################################################
/** \brief Select whether the SD card is supported. */
#define SDSUPPORT 1 // 1 = supported, 0 = not supported
/** \brief Change to true if you get a inserted message on removal. */
#define SDCARDDETECTINVERTED false
/** \brief Show extended directory including file length. Don't use this with Pronterface! */
#define SD_EXTENDED_DIR true
/** \brief Total size of the buffer used to store the long filenames */
// If you need more maximum file name length than 26 chars
// - For SD-Printing using a Gcode / using Octoprints sd file listing
// - Or for seeing the full filenames within the SD-Card file menu
// then increase MAX_VFAT_ENTRIES to 3. But that has to be payed with ~65bytes of Ram.
// (Printing a file using the SD card menu will start the print using the file number, so you dont need to see the full file length.)
#define MAX_VFAT_ENTRIES (2)
#define LONG_FILENAME_LENGTH (13*MAX_VFAT_ENTRIES+1)
#define SD_MAX_FOLDER_DEPTH 2
// ##########################################################################################
// ## configuration of the manual steps
// ##########################################################################################
/** \brief Configuration of the manual steps */
// (Jeder dieser Werte*steps/mm der Achse muss in unsigned short passen)
#define DEFAULT_MANUAL_MM_X 0.1f // [mm]
#define DEFAULT_MANUAL_MM_Y 0.1f // [mm]
#define DEFAULT_MANUAL_MM_Z 0.01f // [mm] -> Wert im Menü->Position->Z-Steps: xxx um!
#define DEFAULT_MANUAL_MM_E 0.25f // [mm]
//Das hier drunter sind einigermaßen sinnvolle Stepsizes, wenn man Microsteps = 32 eingestellt hat, bei 16 verdoppeln sich die Zahlenwerte in mm.
//Siehe: https://github.com/RF1000community/Repetier-Firmware/issues/4
//Dieser statische Ansatz wird evtl. mal umgebaut. Man könnte auch eine Funktion schreiben, die sinnvolle Einstellwerte automatisch anhand Microsteps und Mikrometertabelle sucht.
#define NUM_ACCEPTABLE_STEP_SIZE_TABLE 7
// (Jeder dieser Werte muss in unsigned short passen)
#define ACCEPTABLE_STEP_SIZE_TABLE { 5,13,26,51,64,128,256 }
// ###############################################################################
// ## Values for menu settings
// ###############################################################################
/**
* \brief Select the language to use.
* 0 = English
* 1 = German
*/
#define UI_LANGUAGE 0
/** \brief How many ms should a single page be shown, until it is switched to the next one.*/
#define UI_PAGES_DURATION 4000
/**
* \brief Uncomment if you don't want automatic page switching. You can still switch the
* info pages with next/previous button/click-encoder
*/
#define UI_DISABLE_AUTO_PAGESWITCH true
/** \brief Time to return to info menu if x millisconds no key was pressed. Set to 0 to disable it. */
#define UI_PRINT_AUTORETURN_TO_MENU_AFTER 120000
#define UI_MILL_AUTORETURN_TO_MENU_AFTER 0
/**
* \brief Normally cou want a next/previous actions with every click of your encoder.
* Unfotunately, the encoder have a different count of phase changes between clicks.
* Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
*/
#define UI_ENCODER_SPEED 1
/** \brief bounce time of keys in milliseconds */
#define UI_KEY_BOUNCETIME 10
/** \brief First time in ms until repeat of action. */
#define UI_KEY_FIRST_REPEAT 500
/** \brief Reduction of repeat time until next execution. */
#define UI_KEY_REDUCE_REPEAT 50
/** \brief Lowest repeat time. */
#define UI_KEY_MIN_REPEAT 50
/** \brief Default beeper mode. */
#define BEEPER_MODE 1 // 1 = on, 0 = off
/**
* \brief Beeper sound definitions for short beeps during key actions
* and longer beeps for important actions.
* Parameter is delay in microseconds and the second is the number of repetitions.
* Values must be in range 1..255
*/
#define BEEPER_SHORT_SEQUENCE 2,2
#define BEEPER_LONG_SEQUENCE 8,8
#define BEEPER_START_PRINTING_SEQUENCE 100,2
#define BEEPER_STOP_PRINTING_SEQUENCE 100,3
#define BEEPER_PAUSE_SEQUENCE 50,3
#define BEEPER_CONTINUE_SEQUENCE 50,2
#define BEEPER_START_HEAT_BED_SCAN_SEQUENCE 100,2
#define BEEPER_ABORT_HEAT_BED_SCAN_SEQUENCE 250,5
#define BEEPER_STOP_HEAT_BED_SCAN_SEQUENCE 100,3
#define BEEPER_START_WORK_PART_SCAN_SEQUENCE 100,2
#define BEEPER_ABORT_WORK_PART_SCAN_SEQUENCE 250,5
#define BEEPER_STOP_WORK_PART_SCAN_SEQUENCE 100,3
//FEATURE_ALIGN_EXTRUDERS
#define BEEPER_START_ALIGN_EXTRUDERS_SEQUENCE 100,2
#define BEEPER_ABORT_ALIGN_EXTRUDERS_SEQUENCE 250,5
#define BEEPER_STOP_ALIGN_EXTRUDERS_SEQUENCE 100,3
#define BEEPER_ABORT_SET_POSITION_SEQUENCE 250,5
#define BEEPER_ACCEPT_SET_POSITION_SEQUENCE 100,2
#define BEEPER_SERVICE_INTERVALL_SEQUNCE 100,3
#define BEEPER_ALIGN_EXTRUDERS_SEQUNCE 50,5
#define BEEPER_WRONG_FIRMWARE_SEQUNCE 255,16
/** \brief Values used for preheat */
#define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
#define UI_SET_PRESET_EXTRUDER_TEMP_PLA 180
#define UI_SET_PRESET_HEATED_BED_TEMP_ABS 100
#define UI_SET_PRESET_EXTRUDER_TEMP_ABS 210
/** \brief Values used for unload(unmount)/load(mount) filament */
#define UI_SET_EXTRUDER_MIN_TEMP_UNMOUNT 90 //hat anfangs hohe toleranz.
#define UI_SET_EXTRUDER_MAX_TEMP_UNMOUNT 240
#define UI_SET_EXTRUDER_TEMP_MOUNT 210
/** \brief Extreme values */
#define UI_SET_MIN_HEATED_BED_TEMP 50
#define UI_SET_MAX_HEATED_BED_TEMP 160
#define UI_SET_MIN_EXTRUDER_TEMP 70
#define UI_SET_MAX_EXTRUDER_TEMP 270
#define UI_SET_EXTRUDER_FEEDRATE 1.5f // [mm/sec]
#define UI_SET_EXTRUDER_RETRACT_DISTANCE 3 // [mm]
#define COOLDOWN_THRESHOLD 40 // [°C]
#define SPEED_MIN_MILLIS 300
#define SPEED_MAX_MILLIS 50
#define SPEED_MAGNIFICATION 100.0f
/**
* \brief Specifies if you want to see the TipDown Support within Z-Configuration Menu.
* This is only usefull if you have a dual hotend with possible servo or spring z-offset-shift.
*/
#define UI_SHOW_TIPDOWN_IN_ZCONFIGURATION 0 // 1 = show, 0 = hide
// ##########################################################################################
// ## general external EEPROM configuration
// ##########################################################################################
#define EEPROM_DELAY 10 // [ms]
// ##########################################################################################
// ## external EEPROM which is used for the z-compensation (32.768 bytes)
// ##########################################################################################
/*
we use blocks of 2 kByte size for the structure of our EEPROM
00000 ... 01535 bytes [EEPROM_SECTOR_SIZE Bytes] = general information
00000 [2 bytes] EEPROM format
00002 [2 bytes] active work part z-compensation matrix (1 ... EEPROM_MAX_WORK_PART_SECTORS)
00004 [2 bytes] active heat bed z-compensation matrix (1 ... EEPROM_MAX_HEAT_BED_SECTORS)
01536 ... 03071 bytes [EEPROM_SECTOR_SIZE Bytes] = heat bed z-compensation matrix 1
01536 [2 bytes] x-dimension of the heat bed z-compensation matrix 1
01538 [2 bytes] y-dimension of the heat bed z-compensation matrix 1
01540 [2 bytes] used micro steps
01542 [12 bytes] reserved
01554 [x bytes] heat bed z-compensation matrix 1
03072 ... 04597 bytes [EEPROM_SECTOR_SIZE Bytes] = heat bed z-compensation matrix 2
...
15360 ... 16895 bytes [EEPROM_SECTOR_SIZE Bytes] = work part compensation matrix 1
15360 [2 bytes] x-dimension of the work part compensation matrix 1
15362 [2 bytes] y-dimension of the work part compensation matrix 1
15364 [2 bytes] used micro steps
15366 [2 bytes] x start position of the work part scan [mm]
15368 [2 bytes] y start position of the work part scan [mm]
15370 [2 bytes] x step size of the work part scan [mm]
15372 [2 bytes] y step size of the work part scan [mm]
15374 [2 bytes] x end position of the work part scan [mm]
15376 [2 bytes] y end position of the work part scan [mm]
15378 [x bytes] work part z-compensation matrix 1
16895 ... 18430 bytes [2 kBytes] = work part compensation matrix 2
...
*/
#define EEPROM_OFFSET_SECTOR_FORMAT 0
#define EEPROM_OFFSET_DIMENSION_X 2
#define EEPROM_OFFSET_DIMENSION_Y 4
#define EEPROM_OFFSET_MICRO_STEPS 6
#define EEPROM_OFFSET_X_START_MM 16
#define EEPROM_OFFSET_Y_START_MM 18
#define EEPROM_OFFSET_X_STEP_MM 20
#define EEPROM_OFFSET_Y_STEP_MM 22
#define EEPROM_OFFSET_X_END_MM 24
#define EEPROM_OFFSET_Y_END_MM 26
#define EEPROM_OFFSET_MATRIX_START 28
#define EEPROM_SECTOR_SIZE 1536 // [bytes]
#define EEPROM_MAX_WORK_PART_SECTORS 9
#define EEPROM_MAX_HEAT_BED_SECTORS 9
#define EEPROM_OFFSET_HEADER_FORMAT 0 // [bytes]
#define EEPROM_OFFSET_ACTIVE_WORK_PART_Z_MATRIX 2 // [bytes]
#define EEPROM_OFFSET_ACTIVE_HEAT_BED_Z_MATRIX 4 // [bytes]
#define EEPROM_FORMAT 7
// ##########################################################################################
// ## external EEPROM which is used for the type information (32.768 bytes)
// ##########################################################################################
/*
we use blocks of 2 kByte size for the structure of our EEPROM
00000 ... 02047 bytes [2 kBytes] = general information
00000 [2 bytes] EEPROM format
00002 [2 bytes] board type
*/
#define TYPE_EEPROM_OFFSET_HEADER_FORMAT 0 // [bytes]
#define TYPE_EEPROM_OFFSET_BOARD_TYPE 2 // [bytes]
#define TYPE_EEPROM_FORMAT 1
// ##########################################################################################
// ## miscellaneous configurations
// ##########################################################################################
/** \brief Defines the Z-Offset stepsize interval for the Menu-Action in [um] */
#define Z_OFFSET_MENU_STEPS 25
/** \brief Allows to change the amount of Z-Offset which is changed by a push of the Z-Up or Z-Down button ONLY within the Mod Menu Page 2 */
#define Z_OFFSET_BUTTON_STEPS 5
/** \brief Defines the default z scale */
#define DEFAULT_Z_SCALE_MODE Z_VALUE_MODE_LAYER
/** \brief Minimal temperature which can be reached by cooling */
#define MAX_ROOM_TEMPERATURE 40 // [°C]
/** \brief Defines the I2C address for the strain gauge */
#define I2C_ADDRESS_STRAIN_GAUGE 0x49
/** \brief Defines which strain gauge is used for the heat bed scan */
#define ACTIVE_STRAIN_GAUGE 0x49
/** \brief Defines the I2C address for the external EEPROM which stores the z-compensation matrix */
#define I2C_ADDRESS_EXTERNAL_EEPROM 0x50
/** \brief Defines the I2C address for the external EEPROM which stores type information */
#define I2C_ADDRESS_TYPE_EEPROM 0x51
/**
* \brief Allows to use this firmware together with the non-Repetier PC applications
* Without this special handling, the firmware may complain about checksum errors from non-Repetier PC applications (e.g. Cura, ...) and
* non-Repetier PC applications may fall over the debug outputs of the firmware.
*/
#define ALLOW_EXTENDED_COMMUNICATION 2 // 0 = do not allow, 1 = allow "Wait", 2 = allow "Wait" and debug outputs
/**
* \brief Configuration of the external watchdog
* The TPS3820 of the RF1000/RF2000 resets about 112/200/310 (min/typical/max) ms after the last time when it was triggered
* http://pdf1.alldatasheet.com/datasheet-pdf/view/29215/TI/TPS3820-50DBVT.html
* t_d in datasheet is delay time: how long reset is triggered after timeout: 15...25...37ms for TPS3820.
*/
#define WATCHDOG_MAIN_LOOP_TIMEOUT 20000UL // [ms] -> uhrzeit intern scheint nicht immer zu stimmen!
/** \brief Longer-lasting operations shall call our periodical actions at least each defined time interval */
#define PERIODICAL_ACTIONS_CALL_INTERVAL 10 // [ms]
/** \brief The display shows that the device is idle after no new commands were processed for longer than the minimal idle time */
#define MINIMAL_IDLE_TIME 500 // [ms]
/** \brief If enabled you can select the distance your filament gets retracted during a M140 command, after a given temperature is reached. */
#define RETRACT_DURING_HEATUP true
/**
* \brief PID control only works target temperature +/- PID_CONTROL_RANGE.
* If you get much overshoot at the first temperature set, because the heater is going full power too long, you
* need to increase this value. For one 6.8 Ohm heater 10 is ok. With two 6.8 Ohm heater use 15.
*/
#define PID_CONTROL_RANGE 30
/** \brief If you change those you might have to do fresh autotunePIDs on your heaters. */
#define PID_CONTROL_DRIVE_MAX_LIMIT_FACTOR 10.0f //this was 10
#define PID_CONTROL_DRIVE_MIN_LIMIT_FACTOR -1.0f //this was 10 but -1.0 works well with drive max 100 and drive min 5. If this number is negative you get a real PID control, no PD+posI-control anymore.
/**
* \brief Prevent extrusions longer then x mm for one command. This is especially important if you abort a print. Then the
* extrusion position might be at any value like 23344. If you then have an G1 E-2 it will roll back 23 meter!
*/
#define EXTRUDE_MAXLENGTH 100.0f
/**
* \brief Set PID scaling
* PID values assume a usable range from 0-255. This can be further limited to EXT0_PID_MAX by two methods.
* Set the value to 0: Normal computation, just clip output to EXT0_PID_MAX if computed value is too high.
* Set value to 1: Scale PID by EXT0_PID_MAX/256 and then clip to EXT0_PID_MAX.
* If your EXT0_PID_MAX is low, you should prefer the second method.
*/
#define SCALE_PID_TO_MAX 0
/**
* \brief Temperature range for target temperature to hold in M109 command. 5 means +/-5 degC
* Uncomment define to force the temperature into the range for given watchperiod.
*/
#define TEMP_TOLERANCE 2.0f // [°C]
/**
* \brief Additional special temperature tolerance range when unpausing print.
* Faster start is better here, because reaching pause position might take a while - for a bit less oozing
*/
#define ADD_CONTINUE_AFTER_PAUSE_TEMP_TOLERANCE 2 // [°C]
/** \brief Bits of the ADC converter */
#define ANALOG_INPUT_BITS 10
/** \brief Build median from 2^ANALOG_INPUT_SAMPLE samples */
#define ANALOG_INPUT_SAMPLE 5
#define ANALOG_REF_AREF 0
#define ANALOG_REF_AVCC _BV(REFS0)
#define ANALOG_REF_INT_1_1 _BV(REFS1)
#define ANALOG_REF_INT_2_56 _BV(REFS0) | _BV(REFS1)
#define ANALOG_REF ANALOG_REF_AVCC
/** \brief Step to split a circle in small Lines */
#define MM_PER_ARC_SEGMENT 1
#define MM_PER_ARC_SEGMENT_BIG 3