-
Notifications
You must be signed in to change notification settings - Fork 88
/
config.h
2225 lines (1985 loc) · 83.9 KB
/
config.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
/*
config.h - compile time configuration and default setting values
Part of grblHAL
Copyright (c) 2020-2024 Terje Io
grblHAL 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.
grblHAL 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 grblHAL. If not, see <http://www.gnu.org/licenses/>.
*/
/*! \file
\brief This file contains compile-time and run-time configurations for grblHAL's internal system.
For the most part, users will not need to directly modify these, but they are here for
specific needs, i.e. performance tuning or adjusting to non-typical machines.
<br>__IMPORTANT:__ Symbol/macro names starting with `DEFAULT_` contains default values for run-time
configurable settings that can be changed with `$=<setting id>` commands.
Any changes to these requires a full re-compiling of the source code to propagate them.
A reset of non-volatile storage with `$RST=*` after reflashing is also required.
*/
#ifndef _GRBL_CONFIG_H_
#define _GRBL_CONFIG_H_
// Compile time only default configuration
/*! \def N_AXIS
\brief Defines number of axes supported - minimum 3, maximum 8.
If more than 3 axes are configured a compliant driver and board map file is needed.
*/
#ifndef N_AXIS
#define N_AXIS 3 // Number of axes
#endif
/*! \def AXIS_REMAP_ABC2UVW
\brief Remap `ABC` axis letters to `UVW`
<br>__NOTE:__ Experimental, if more than 3 and less than 7 axes are configured the `ABC`
axis letters can be remapped to `UWV`.
*/
#if (!defined AXIS_REMAP_ABC2UVW && (N_AXIS > 3 && N_AXIS < 7)) || defined __DOXYGEN__
#define AXIS_REMAP_ABC2UVW Off
#endif
/*! \def N_SPINDLE
\brief Defines number of spindles supported - minimum 1, maximum 32.
*/
#if !defined N_SPINDLE || defined __DOXYGEN__
#define N_SPINDLE 1
#endif
/*! \def N_SYS_SPINDLE
\brief Defines number of simultaneously active spindles supported - minimum 1 (none), maximum 8.
*/
#if !defined N_SYS_SPINDLE || defined __DOXYGEN__
#define N_SYS_SPINDLE 1
#endif
/*! \def BUILD_INFO
\brief Defines string to be output as part of the `$I` or `$I+` command response.
*/
#if !defined BUILD_INFO || defined __DOXYGEN__
#define BUILD_INFO ""
#endif
/*! \def COMPATIBILITY_LEVEL
\brief Define compatibility level with the legacy Grbl 1.1 protocol.
Additional G- and M-codes are not disabled except when level is set to >= 10.
This does not apply to G- and M-codes dependent on driver and/or configuration
settings disabled by setting level > 1.
<br>Set to `0` for reporting itself as "GrblHAL" with protocol extensions enabled.
<br>Set to `1` to disable some extensions, and for reporting itself as "Grbl".
<br>Set to `2` to disable new settings as well, use \#define symbols/macros for setting default values.
<br>These can be found in in this file and in defaults.h.
<br>Set to `10` to also disable new coordinate system offsets (G59.1 - G59.3) and some `$#` report extensions.
__NOTE:__ if switching to a level > 1 please reset non-volatile storage with `$RST=*` after reflashing!
*/
#if !defined COMPATIBILITY_LEVEL || defined __DOXYGEN__
#define COMPATIBILITY_LEVEL 0
#endif
/*! \def ENABLE_SPINDLE_LINEARIZATION
\brief This feature alters the spindle PWM/speed to a nonlinear output with a simple piecewise linear curve.
Useful for spindles that don't produce the right RPM from Grbl's standard spindle PWM
linear model. Requires a solution by the 'fit_nonlinear_spindle.py' script in the /doc/script
folder of the repo. See file comments on how to gather spindle data and run the script to
generate a solution.
*/
#if !defined ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
#define ENABLE_SPINDLE_LINEARIZATION 0 // Set to 1 to enable spindle RPM linearization. Requires compatible driver if enabled.
#endif
/*! \def SPINDLE_NPWM_PIECES
\brief Number of pieces used for spindle RPM linearization, enabled by setting \ref ENABLE_SPINDLE_LINEARIZATION to 1.
*/
#if !defined SPINDLE_NPWM_PIECES || defined __DOXYGEN__
#define SPINDLE_NPWM_PIECES 4 // Number of pieces for spindle RPM linearization, max 4.
#endif
#include "nuts_bolts.h"
//#define KINEMATICS_API // Uncomment to add HAL entry points for custom kinematics
/*! \def MASLOW_ROUTER
\brief Enable Maslow router kinematics.
Experimental - testing required and homing needs to be worked out.
*/
#if !defined MASLOW_ROUTER || defined __DOXYGEN__
// Enable Maslow router kinematics.
// Experimental - testing required and homing needs to be worked out.
#define MASLOW_ROUTER Off
#endif
/*! \def WALL_PLOTTER
\brief Enable wall plotter kinematics.
Experimental - testing required and homing needs to be worked out.
*/
#if !defined WALL_PLOTTER || defined __DOXYGEN__
#define WALL_PLOTTER Off
#endif
/*! \def DELTA_ROBOT
\brief Enable delta kinematics.
Experimental - testing required and homing needs to be worked out.
*/
#if !defined DELTA_ROBOT || defined __DOXYGEN__
#define DELTA_ROBOT Off
#endif
// Reduce minimum feedrate for delta robots
#if DELTA_ROBOT && !defined MINIMUM_FEED_RATE
#define MINIMUM_FEED_RATE 0.1f // (radians/min)
#endif
/*! \def POLAR_ROBOT
\brief Enable polar kinematics.
Experimental - testing required and homing needs to be worked out.
*/
#if !defined POLAR_ROBOT || defined __DOXYGEN__
#define POLAR_ROBOT Off
#endif
/*! \def COREXY
\brief Enable CoreXY kinematics. Use ONLY with CoreXY machines.
<br>__IMPORTANT:__ If homing is enabled, you must reconfigure the homing cycle \#defines above to
\#define \ref DEFAULT_HOMING_CYCLE_1 `X_AXIS_BIT` and \#define \ref DEFAULT_HOMING_CYCLE_2 `Y_AXIS_BIT`
<br>__NOTE:__ This configuration option alters the motion of the X and Y axes to principle of operation
defined at [corexy.com](http://corexy.com/theory.html). Motors are assumed to positioned and wired exactly as
described, if not, motions may move in strange directions. grblHAL requires the CoreXY A and B motors
have the same steps per mm internally.
*/
#if !defined COREXY || defined __DOXYGEN__
#define COREXY Off
#endif
/*! \def CHECK_MODE_DELAY
\brief
Add a short delay for each block processed in Check Mode to
avoid overwhelming the sender with fast reply messages.
This is likely to happen when streaming is done via a protocol where
the speed is not limited to 115200 baud. An example is native USB streaming.
*/
#if !defined CHECK_MODE_DELAY || defined __DOXYGEN__
#define CHECK_MODE_DELAY 0 // ms
#endif
/*! \def DEBOUNCE_DELAY
\brief
When > 0 adds a short delay when an input changes state to avoid switch bounce
or EMI triggering the related interrupt falsely or too many times.
*/
#if !defined DEBOUNCE_DELAY || defined __DOXYGEN__
#define DEBOUNCE_DELAY 40 // ms
#endif
// ---------------------------------------------------------------------------------------
// ADVANCED CONFIGURATION OPTIONS:
#define ENABLE_PATH_BLENDING Off // Do NOT enable unless working on adding this feature!
// Enables code for debugging purposes. Not for general use and always in constant flux.
//#define DEBUG // Uncomment to enable. Default disabled.
//#define DEBUGOUT 0 // Uncomment to claim serial port with given instance number and add HAL entry point for debug output.
/*! @name Status report frequency
Some status report data isn't necessary for realtime, only intermittently, because the values don't
change often. The following macros configures how many times a status report needs to be called before
the associated data is refreshed and included in the status report. However, if one of these value
changes, grblHAL will automatically include this data in the next status report, regardless of what the
count is at the time. This helps reduce the communication overhead involved with high frequency reporting
and aggressive streaming. There is also a busy and an idle refresh count, which sets up grblHAL to send
refreshes more often when its not doing anything important. With a good GUI, this data doesn't need
to be refreshed very often, on the order of a several seconds.
<br>__NOTE:__ `WCO` refresh must be 2 or greater. `OVERRIDE` refresh must be 1 or greater.
*/
///@{
#if !defined REPORT_OVERRIDE_REFRESH_BUSY_COUNT || defined __DOXYGEN__
#define REPORT_OVERRIDE_REFRESH_BUSY_COUNT 20 // (1-255)
#endif
#if !defined REPORT_OVERRIDE_REFRESH_IDLE_COUNT || defined __DOXYGEN__
#define REPORT_OVERRIDE_REFRESH_IDLE_COUNT 10 // (1-255) Must be less than or equal to the busy count
#endif
#if !defined REPORT_WCO_REFRESH_BUSY_COUNT || defined __DOXYGEN__
#define REPORT_WCO_REFRESH_BUSY_COUNT 30 // (2-255)
#endif
#if !defined REPORT_WCO_REFRESH_IDLE_COUNT || defined __DOXYGEN__
#define REPORT_WCO_REFRESH_IDLE_COUNT 10 // (2-255) Must be less than or equal to the busy count
#endif
///@}
/*! \def ACCELERATION_TICKS_PER_SECOND
\brief The temporal resolution of the acceleration management subsystem.
A higher number gives smoother
acceleration, particularly noticeable on machines that run at very high feedrates, but may negatively
impact performance. The correct value for this parameter is machine dependent, so it's advised to
set this only as high as needed. Approximate successful values can widely range from 50 to 200 or more.
<br>__NOTE:__ Changing this value also changes the execution time of a segment in the step segment buffer.
When increasing this value, this stores less overall time in the segment buffer and vice versa. Make
certain the step segment buffer is increased/decreased to account for these changes.
*/
#if !defined ACCELERATION_TICKS_PER_SECOND || defined __DOXYGEN__
#define ACCELERATION_TICKS_PER_SECOND 100
#endif
// Sets the maximum step rate allowed to be written as a grblHAL setting. This option enables an error
// check in the settings module to prevent settings values that will exceed this limitation. The maximum
// step rate is strictly limited by the CPU speed and will change if something other than an AVR running
// at 16MHz is used.
// NOTE: For now disabled, will enable if flash space permits.
//#define MAX_STEP_RATE_HZ 30000 // Hz
/*! \def REPORT_ECHO_LINE_RECEIVED
\brief
With this enabled, grblHAL sends back an echo of the line it has received, which has been pre-parsed (spaces
removed, capitalized letters, no comments) and is to be immediately executed by grblHAL. Echoes will not be
sent upon a line buffer overflow, but should for all normal lines sent to grblHAL. For example, if a user
sends the line 'g1 x1.032 y2.45 (test comment)', grblHAL will echo back in the form '[echo: G1X1.032Y2.45]'.
NOTE: Only use this for debugging purposes!! When echoing, this takes up valuable resources and can effect
performance. If absolutely needed for normal operation, the serial write buffer should be greatly increased
to help minimize transmission waiting within the serial write protocol.
*/
#if !defined REPORT_ECHO_LINE_RECEIVED || defined __DOXYGEN__
#define REPORT_ECHO_LINE_RECEIVED Off // Default disabled. Set to \ref On or 1 to enable.
#endif
/*! \def TOOL_LENGTH_OFFSET_AXIS
\brief Sets which \ref axis the tool length offset is applied.
Assumes the spindle is always parallel with the selected axis with the tool oriented toward
the negative direction. In other words, a positive tool length offset value is subtracted
from the current location.
*/
#if !defined TOOL_LENGTH_OFFSET_AXIS || defined __DOXYGEN__
#define TOOL_LENGTH_OFFSET_AXIS -1 // Default is all axes.
#endif
/*! \def MINIMUM_JUNCTION_SPEED
\brief Minimum planner junction speed.
Sets the default minimum junction speed the planner plans to at every buffer block junction,
except for starting from rest and end of the buffer, which are always zero. This value controls
how fast the machine moves through junctions with no regard for acceleration limits or angle
between neighboring block line move directions. This is useful for machines that can't
tolerate the tool dwelling for a split second, i.e. 3d printers or laser cutters. If used, this value
should not be much greater than zero or to the minimum value necessary for the machine to work.
*/
#if !defined MINIMUM_JUNCTION_SPEED || defined __DOXYGEN__
#define MINIMUM_JUNCTION_SPEED 0.0f // (mm/min)
#endif
/*! \def MINIMUM_FEED_RATE
\brief
Sets the minimum feed rate the planner will allow. Any value below it will be set to this minimum
value. This also ensures that a planned motion always completes and accounts for any floating-point
round-off errors. Although not recommended, a lower value than 1.0 mm/min will likely work in smaller
machines, perhaps to 0.1mm/min, but your success may vary based on multiple factors.
*/
#if !defined MINIMUM_FEED_RATE || defined __DOXYGEN__
#define MINIMUM_FEED_RATE 1.0f // (mm/min)
#endif
/*! \def N_ARC_CORRECTION
\brief
Number of arc generation iterations by small angle approximation before exact arc trajectory
correction with expensive sin() and cos() calculations. This parameter maybe decreased if there
are issues with the accuracy of the arc generations, or increased if arc execution is getting
bogged down by too many trig calculations.
*/
#if !defined N_ARC_CORRECTION || defined __DOXYGEN__
#define N_ARC_CORRECTION 12 // Integer (1-255)
#endif
/*! \def ARC_ANGULAR_TRAVEL_EPSILON
\brief
The arc G2/3 g-code standard is problematic by definition. Radius-based arcs have horrible numerical
errors when arc at semi-circles(pi) or full-circles(2*pi). Offset-based arcs are much more accurate
but still have a problem when arcs are full-circles (2*pi). This define accounts for the floating
point issues when offset-based arcs are commanded as full circles, but get interpreted as extremely
small arcs with around machine epsilon (1.2e-7rad) due to numerical round-off and precision issues.
This define value sets the machine epsilon cutoff to determine if the arc is a full-circle or not.
<br>__NOTE:__ Be very careful when adjusting this value. It should always be greater than 1.2e-7 but not too
much greater than this. The default setting should capture most, if not all, full arc error situations.
*/
#if !defined ARC_ANGULAR_TRAVEL_EPSILON || defined __DOXYGEN__
#define ARC_ANGULAR_TRAVEL_EPSILON 5E-7f // Float (radians)
#endif
/*! @name Default constants for G5 Cubic splines
//
*/
///@{
#if !defined BEZIER_MIN_STEP || defined __DOXYGEN__
#define BEZIER_MIN_STEP 0.002f
#endif
#if !defined BEZIER_MAX_STEP || defined __DOXYGEN__
#define BEZIER_MAX_STEP 0.1f
#endif
#if !defined BEZIER_SIGMA || defined __DOXYGEN__
#define BEZIER_SIGMA 0.1f
#endif
///@}
/*! \def DWELL_TIME_STEP
\brief Time delay increments performed during a dwell.
The default value is set at 50ms, which provides a maximum time delay of roughly 55 minutes,
more than enough for most any application. Increasing this delay will increase the maximum
dwell time linearly, but also reduces the responsiveness of run-time command executions,
like status reports, since these are performed between each dwell time step.
*/
#if !defined DWELL_TIME_STEP || defined __DOXYGEN__
#define DWELL_TIME_STEP 50 // Integer (1-255) (milliseconds)
#endif
/*! \def SEGMENT_BUFFER_SIZE
\brief
Governs the size of the intermediary step segment buffer between the step execution algorithm
and the planner blocks. Each segment is set of steps executed at a constant velocity over a
fixed time defined by \ref ACCELERATION_TICKS_PER_SECOND. They are computed such that the planner
block velocity profile is traced exactly. The size of this buffer governs how much step
execution lead time there is for other grblHAL processes have to compute and do their thing
before having to come back and refill this buffer, currently at ~50msec of step moves.
*/
#if !defined SEGMENT_BUFFER_SIZE || defined __DOXYGEN__
#define SEGMENT_BUFFER_SIZE 10 // Uncomment to override default in stepper.h.
#endif
/*! \def SET_CHECK_MODE_PROBE_TO_START
\brief
Configures the position after a probing cycle during grblHAL's check mode. Disabled sets
the position to the probe target, when enabled sets the position to the start position.
*/
#if !defined SET_CHECK_MODE_PROBE_TO_START || defined __DOXYGEN__
#define SET_CHECK_MODE_PROBE_TO_START Off // Default disabled. Set to \ref On or 1 to enable.
#endif
/*! \def HARD_LIMIT_FORCE_STATE_CHECK
\brief
Force grblHAL to check the state of the hard limit switches when the processor detects a pin
change inside the hard limit ISR routine. By default, grblHAL will trigger the hard limits
alarm upon any pin change, since bouncing switches can cause a state check like this to
misread the pin. When hard limits are triggered, they should be 100% reliable, which is the
reason that this option is disabled by default. Only if your system/electronics can guarantee
that the switches don't bounce, we recommend enabling this option. This will help prevent
triggering a hard limit when the machine disengages from the switch.
<br>__NOTE:__ This option has no effect if SOFTWARE_DEBOUNCE is enabled.
*/
#if !defined HARD_LIMIT_FORCE_STATE_CHECK || defined __DOXYGEN__
#define HARD_LIMIT_FORCE_STATE_CHECK Off // Default disabled. Set to \ref On or 1 to enable.
#endif
/*! @name Homing cycle search and locate scalars
\brief
Adjusts homing cycle search and locate scalars. These are the multipliers used by grblHAL's
homing cycle to ensure the limit switches are engaged and cleared through each phase of
the cycle. The search phase uses the axes max-travel setting times the
`HOMING_AXIS_SEARCH_SCALAR` to determine distance to look for the limit switch. Once found,
the locate phase begins and uses the homing pull-off distance setting times the
`HOMING_AXIS_LOCATE_SCALAR` to pull-off and re-engage the limit switch.
<br>__NOTE:__ Both of these values must be greater than 1.0 to ensure proper function.
*/
///@{
#if !defined HOMING_AXIS_SEARCH_SCALAR || defined __DOXYGEN__
#define HOMING_AXIS_SEARCH_SCALAR 1.5f // Must be > 1 to ensure limit switch will be engaged.
#endif
#if !defined HOMING_AXIS_LOCATE_SCALAR || defined __DOXYGEN__
#define HOMING_AXIS_LOCATE_SCALAR 10.0f// Must be > 1 to ensure limit switch is cleared.
#endif
///@}
/*! @name Non-volatile storage restore commands
\brief
Enable the `$RST=*`, `$RST=$`, `$RST=#` and `$RST=&` non-volatile storage restore commands. There are
cases where these commands may be undesirable. Simply change desired macro to \ref Off or 0 to disable it.
<br>__NOTE:__ See _Non-volatile storage restore options_ below for customizing the `$RST=*` command.
*/
///@{
#if !defined ENABLE_RESTORE_NVS_WIPE_ALL || defined __DOXYGEN__
#define ENABLE_RESTORE_NVS_WIPE_ALL On //!< `$RST=*` Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined ENABLE_RESTORE_NVS_DEFAULT_SETTINGS || defined __DOXYGEN__
#define ENABLE_RESTORE_NVS_DEFAULT_SETTINGS On //!< `$RST=$` Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined ENABLE_RESTORE_NVS_CLEAR_PARAMETERS || defined __DOXYGEN__
#define ENABLE_RESTORE_NVS_CLEAR_PARAMETERS On //!< `$RST=#` Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined ENABLE_RESTORE_NVS_DRIVER_PARAMETERS || defined __DOXYGEN__
#define ENABLE_RESTORE_NVS_DRIVER_PARAMETERS On //!< `$RST=&` Default enabled. Set to \ref Off or 0 to disable. For drivers that implements non-generic settings.
#endif
///@}
/*! @name Non-volatile storage restore options
\brief
// Defines the non-volatile data restored upon a settings version change and `$RST=*` command. Whenever the
// the settings or other non-volatile data structure changes between grblHAL versions, grblHAL will automatically
// wipe and restore the non-volatile data. These macros controls what data is wiped and restored. This is useful
// particularly for OEMs that need to retain certain data. For example, the \ref BUILD_INFO string can be
// written into non-volatile storage via a separate program to contain product data. Altering these
// macros to not restore the build info non-volatile storage will ensure this data is retained after firmware upgrades.
*/
///@{
#if !defined SETTINGS_RESTORE_DEFAULTS || defined __DOXYGEN__
#define SETTINGS_RESTORE_DEFAULTS On //!< Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined SETTINGS_RESTORE_PARAMETERS || defined __DOXYGEN__
#define SETTINGS_RESTORE_PARAMETERS On //!< Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined SETTINGS_RESTORE_STARTUP_LINES || defined __DOXYGEN__
#define SETTINGS_RESTORE_STARTUP_LINES On //!< Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined SETTINGS_RESTORE_BUILD_INFO || defined __DOXYGEN__
#define SETTINGS_RESTORE_BUILD_INFO On //!< Default enabled. Set to \ref Off or 0 to disable.
#endif
#if !defined SETTINGS_RESTORE_DRIVER_PARAMETERS || defined __DOXYGEN__
#define SETTINGS_RESTORE_DRIVER_PARAMETERS On //!< Default enabled. Set to \ref Off or 0 to disable.
#endif
/*! \def DISABLE_BUILD_INFO_WRITE_COMMAND
\brief Disable the `$I=(string)` build info write command.
If disabled, any existing build info data must be placed into non-volatile storage via external
means with a valid checksum value. This macro option is useful to prevent this data from being
over-written by a user, when used to store OEM product data.
<br>__NOTE:__ If disabled and to ensure grblHAL can never alter the build info line, you'll also need
to set the \ref SETTINGS_RESTORE_BUILD_INFO symbol to \ref Off or 0.
*/
#if !defined DISABLE_BUILD_INFO_WRITE_COMMAND || defined __DOXYGEN__
#define DISABLE_BUILD_INFO_WRITE_COMMAND Off //!< `$I=` Default enabled. Uncomment to disable.
#endif
///@}
/*! \def SLEEP_DURATION
\brief Configures grblHAL's sleep mode feature.
If the spindle or coolant are powered and grblHAL is not actively moving or receiving any
commands, a sleep timer will start. If any data or commands are received, the sleep timer
will reset and restart until the above condition are not satisfied. If the sleep timer elaspes,
grblHAL will immediately execute the sleep mode by shutting down the spindle and coolant and
entering a safe sleep state. If parking is enabled, grblHAL will park the machine as well.
While in sleep mode, only a hard/soft reset will exit it and the job will be unrecoverable.
Sleep mode is enabled by setting \ref DEFAULT_SLEEP_ENABLE to \ref On or 1, overridable by the
`$62` setting.
<br>__NOTE:__ Sleep mode is a safety feature, primarily to address communication disconnect problems. To
keep grblHAL from sleeping, employ a stream of '?' status report commands as a connection "heartbeat".
*/
#if !defined SLEEP_DURATION || defined __DOXYGEN__
#define SLEEP_DURATION 5.0f // Number of minutes before sleep mode is entered.
#endif
/*! \def NVSDATA_BUFFER_ENABLE
\brief Disable non-volatile storage (NVS) emulation/buffering in RAM (allocated from heap memory).
The NVS buffer can be used for MCUs with no non-volatile storage or for delaying writing to
non-volatile storage until the controller is in IDLE state.
*/
#if !defined NVSDATA_BUFFER_ENABLE || defined __DOXYGEN__
#define NVSDATA_BUFFER_ENABLE On // Default on, set to \ref off or 0 to disable.
#endif
/*! \def TOOLSETTER_RADIUS
\brief
The grbl.on_probe_toolsetter event handler is called by the default tool change algorithm when probing at G59.3.
In addition it will be called on a "normal" probe sequence if the XY position is
within the radius of the G59.3 position defined below.
Change if the default value of 5mm is not suitable or set it to 0.0f to disable.
<br>__NOTE:__ A grbl.on_probe_toolsetter event handler is not installed by the core, it has to be provided
by a driver or a plugin.
*/
#if !defined TOOLSETTER_RADIUS || defined __DOXYGEN__
#define TOOLSETTER_RADIUS 5.0f
#endif
#if !defined ENABLE_BACKLASH_COMPENSATION || defined __DOXYGEN__
#define ENABLE_BACKLASH_COMPENSATION Off
#endif
#if COMPATIBILITY_LEVEL == 0 || defined __DOXYGEN__
/*! \def N_TOOLS
\brief
Number of tools in tool table, edit to enable (max. 32 allowed)
*/
#if !defined N_TOOLS || defined __DOXYGEN__
#define N_TOOLS 0
#endif
#endif
/*! \def NGC_EXPRESSIONS_ENABLE
\brief
Set to \ref On or 1 to enable experimental support for expressions.
Some LinuxCNC extensions are supported, conditionals and subroutines are not.
*/
#if !defined NGC_EXPRESSIONS_ENABLE || defined __DOXYGEN__
#define NGC_EXPRESSIONS_ENABLE Off
#endif
/*! \def NGC_PARAMETERS_ENABLE
\brief
Set to \ref On or 1 to enable experimental support for parameters.
*/
#if !defined NGC_PARAMETERS_ENABLE || defined __DOXYGEN__
#define NGC_PARAMETERS_ENABLE On
#endif
/*! \def NGC_N_ASSIGN_PARAMETERS_PER_BLOCK
\brief
Maximum number of parameters allowed in a block.
*/
#if (NGC_EXPRESSIONS_ENABLE && !defined NGC_N_ASSIGN_PARAMETERS_PER_BLOCK) || defined __DOXYGEN__
#define NGC_N_ASSIGN_PARAMETERS_PER_BLOCK 10
#endif
/*! \def LATHE_UVW_OPTION
\brief
Allow use of UVW axis words for non-modal relative lathe motion.
*/
#if !defined LATHE_UVW_OPTION || defined __DOXYGEN__
#define LATHE_UVW_OPTION Off
#endif
// Max number of entries in log for PID data reporting, to be used for tuning
//#define PID_LOG 1000 // Default disabled. Uncomment to enable.
// End compile time only default configuration
// ---------------------------------------------------------------------------------------
// SETTINGS DEFAULT VALUE OVERRIDES:
// General settings (Group_General)
/*! @name $10 - Setting_StatusReportMask
The status report change for grblHAL v1.1 and after also removed the ability to disable/enable most data
fields from the report. This caused issues for GUI developers, who've had to manage several scenarios
and configurations. The increased efficiency of the new reporting style allows for all data fields to
be sent without potential performance issues.
<br>__NOTE:__ The options below are here only provide a way to disable certain data fields if a unique
situation demands it, but be aware GUIs may depend on this data. If disabled, it may not be compatible.
*/
///@{
/*! \def DEFAULT_REPORT_MACHINE_POSITION
\brief
If set to \ref Off or 0 position is reported with all offsets added.
\internal Bit 0 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_MACHINE_POSITION || defined __DOXYGEN__
#define DEFAULT_REPORT_MACHINE_POSITION On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_BUFFER_STATE
\brief
If set to \ref Off or 0 the `|Bf:` buffer state element is not included in the real time report.
\internal Bit 1 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_BUFFER_STATE || defined __DOXYGEN__
#define DEFAULT_REPORT_BUFFER_STATE On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_LINE_NUMBERS
\brief
If set to \ref Off or 0 the `|Ln:` line number element is not included
in the real time report.
<br>__NOTE:__ Line numbers are only reported if present in the gcode.
\internal Bit 2 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_LINE_NUMBERS || defined __DOXYGEN__
#define DEFAULT_REPORT_LINE_NUMBERS On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_CURRENT_FEED_SPEED
\brief
If set to \ref Off or 0 the `|FS:` current feed & speed element is not included
in the real time report.
\internal Bit 3 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_CURRENT_FEED_SPEED || defined __DOXYGEN__
#define DEFAULT_REPORT_CURRENT_FEED_SPEED On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_PIN_STATE
\brief
If set to \ref Off or 0 the `|Pn:` input pins state element is not included
in the real time report.
\internal Bit 4 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_PIN_STATE || defined __DOXYGEN__
#define DEFAULT_REPORT_PIN_STATE On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_WORK_COORD_OFFSET
\brief
If set to \ref Off or 0 the `|WCO:` work coordinate offset element is not included
in the real time report.
\internal Bit 5 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_WORK_COORD_OFFSET || defined __DOXYGEN__
#define DEFAULT_REPORT_WORK_COORD_OFFSET On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_OVERRIDES
\brief
If set to \ref Off or 0 the `|Pn:` input pins state element is not included
in the real time report.
\internal Bit 6 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_OVERRIDES || defined __DOXYGEN__
#define DEFAULT_REPORT_OVERRIDES On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_PROBE_COORDINATES
\brief
Upon a successful probe cycle, this option provides immediately feedback of the probe coordinates
through an automatically generated message. If disabled, users can still access the last probe
coordinates through grblHAL `$#` print parameters command.
\internal Bit 7 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_PROBE_COORDINATES || defined __DOXYGEN__
#define DEFAULT_REPORT_PROBE_COORDINATES On // Default on. Set to \ref Off or 0 to disable.
#endif
/*! \def DEFAULT_REPORT_SYNC_ON_WCO_CHANGE
\brief
In Grbl v0.9 and prior, there is an old outstanding bug where the `WPos:` work position reported
may not correlate to what is executing, because `WPos:` is based on the g-code parser state, which
can be several motions behind. This option forces the planner buffer to empty, sync, and stop
motion whenever there is a command that alters the work coordinate offsets `G10,G43.1,G92,G54-59.3`.
This is the simplest way to ensure `WPos:` is always correct. Fortunately, it's exceedingly rare
that any of these commands are used need continuous motions through them.
\internal Bit 8 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_SYNC_ON_WCO_CHANGE || defined __DOXYGEN__
#define DEFAULT_REPORT_SYNC_ON_WCO_CHANGE On //!< ok
#endif
/*! \def DEFAULT_REPORT_PARSER_STATE
\brief
When enabled adds automatic report of the parser state following a status report request
if the state was changed since the last report. The output is the same as provided by
the `$G` command.
\internal Bit 9 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_PARSER_STATE || defined __DOXYGEN__
#define DEFAULT_REPORT_PARSER_STATE Off // Default off. Set to \ref On or 1 to enable.
#endif
/*! \def DEFAULT_REPORT_ALARM_SUBSTATE
\brief
Many controllers cannot be hard reset on startup due to using native USB or network
protocols for communication. If the grblHAL for some reason is in `ALARM` state there is
normally no way to determine the cause of the alarm. Enabling this setting adds the alarm
code (see \ref alarm_code_t) as a substate, separated by a colon, to the _Alarm_ state in
the real time report.
<br>__NOTE:__ Enabling this option may break senders.
\internal Bit 10 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_ALARM_SUBSTATE || defined __DOXYGEN__
#define DEFAULT_REPORT_ALARM_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
#endif
/*! \def DEFAULT_REPORT_RUN_SUBSTATE
\brief
Enabling this setting may add a code, separated by a colon, to the _Run_ state in the real time report.
The following codes are defined:
+ `1` - a feed hold is pending, waiting for spindle synchronized motion to complete.
+ `2` - the motion is a probe.
<br>__NOTE:__ Enabling this option may break senders.
\internal Bit 11 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_RUN_SUBSTATE || defined __DOXYGEN__
#define DEFAULT_REPORT_RUN_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
#endif
/*! \def DEFAULT_REPORT_WHEN_HOMING
\brief
Enabling this setting enables status reporting while homing.
<br>__NOTE:__ Enabling this option may break senders.
\internal Bit 12 in settings.status_report.
*/
#if !defined DEFAULT_REPORT_WHEN_HOMING || defined __DOXYGEN__
#define DEFAULT_REPORT_WHEN_HOMING Off // Default off. Set to \ref On or 1 to enable.
#endif
///@}
/*! @name $11 - Setting_JunctionDeviation
*
*/
///@{
#if !defined DEFAULT_JUNCTION_DEVIATION || defined __DOXYGEN__
#define DEFAULT_JUNCTION_DEVIATION 0.01f // mm
#endif
///@}
/*! @name $12 - Setting_ArcTolerance
*
*/
///@{
#if !defined DEFAULT_ARC_TOLERANCE || defined __DOXYGEN__
#define DEFAULT_ARC_TOLERANCE 0.002f // mm
#endif
///@}
/*! @name $13 - Setting_ReportInches
If set to \ref On or 1 reported positions, offsets etc will be converted to inches
with 4 digits of precision.
*/
///@{
#if !defined DEFAULT_REPORT_INCHES || defined __DOXYGEN__
#define DEFAULT_REPORT_INCHES Off
#endif
///@}
/*! @name $28 - Setting_G73Retract
The retract motion distance used for chip breaking by the `G73` canned cycle, executed
after each delta increment specified by the `Q` word.
*/
///@{
#if !defined DEFAULT_G73_RETRACT || defined __DOXYGEN__
#define DEFAULT_G73_RETRACT 0.1f // mm
#endif
///@}
/*! @name $32 - Setting_Mode
__NOTE:__ only one mode can be enabled.
*/
///@{
#if !defined DEFAULT_LASER_MODE || defined __DOXYGEN__
#define DEFAULT_LASER_MODE Off
#endif
#if !defined DEFAULT_LATHE_MODE || defined __DOXYGEN__
#define DEFAULT_LATHE_MODE Off
#endif
///@}
/*! @name $39 - Setting_EnableLegacyRTCommands
Using printable ASCII characters for realtime commands can cause issues with files
containing such characters in comments or settings. If the GCode sender support the
use of the top-bit set alternatives for these then they may be disabled.
<br>__NOTE:__ support for the top-bit set alternatives is always enabled.
<br>__NOTE:__ when disabled they are still active outside of comments and $ settings
allowing their use from manual input, eg. from a terminal or MDI.
*/
///@{
#if !defined DEFAULT_LEGACY_RTCOMMANDS || defined __DOXYGEN__
#define DEFAULT_LEGACY_RTCOMMANDS On
#endif
///@}
/*! @name $60 - Setting_RestoreOverrides
*/
///@{
#if !defined DEFAULT_RESET_OVERRIDES || defined __DOXYGEN__
#define DEFAULT_RESET_OVERRIDES Off
#endif
///@}
/*! @name $62 - Setting_SleepEnable
*/
///@{
#if !defined DEFAULT_SLEEP_ENABLE || defined __DOXYGEN__
#define DEFAULT_SLEEP_ENABLE Off
#endif
///@}
/*! @name $63 - Setting_HoldActions
This option will automatically disable the laser during a feed hold by invoking a spindle stop
override immediately after coming to a stop. However, this also means that the laser still may
be re-enabled by disabling the spindle stop override, if needed. This is purely a safety feature
to ensure the laser doesn't inadvertently remain powered while at a stop and cause a fire.
*/
///@{
#if !defined DEFAULT_DISABLE_LASER_DURING_HOLD || defined __DOXYGEN__
#define DEFAULT_DISABLE_LASER_DURING_HOLD On
#endif
///@}
/*! @name This option is for what should happen on resume from feed hold.
Default action is to restore spindle and coolant status (if overridden), this contradicts the
behaviour of industrial controllers but is in line with earlier versions of Grbl.
*/
///@{
#if !defined DEFAULT_RESTORE_AFTER_FEED_HOLD || defined __DOXYGEN__
#define DEFAULT_RESTORE_AFTER_FEED_HOLD On
#endif
///@}
/*! @name $64 - Setting_ForceInitAlarm
When grblHAL powers-cycles or is hard reset with the MCU reset button, grblHAL boots up with no ALARM
by default. This is to make it as simple as possible for new users to start using grblHAL. When homing
is enabled and a user has installed limit switches, grblHAL will boot up in an ALARM state to indicate
grblHAL doesn't know its position and to force the user to home before proceeding. This option forces
grblHAL to always initialize into an ALARM state regardless of homing or not. This option is more for
OEMs and LinuxCNC users that would like this power-cycle behavior.
*/
///@{
#if !defined DEFAULT_FORCE_INITIALIZATION_ALARM || defined __DOXYGEN__
#define DEFAULT_FORCE_INITIALIZATION_ALARM Off
#endif
///@}
/*! @name $384 - Setting_DisableG92Persistence
G92 offsets is by default stored to non-volatile storage (NVS) on changes and restored on startup
if \ref COMPATIBILITY_LEVEL is <= 1. If \ref COMPATIBILITY_LEVEL is <= 1 then setting $384 can be used to change this at run-time.
To allow store/restore of the G92 offset when \ref COMPATIBILITY_LEVEL > 1 uncomment the line below and reset settings with $RST=*.
*/
///@{
#if !defined DEFAULT_DISABLE_G92_PERSISTENCE || defined __DOXYGEN__
#if COMPATIBILITY_LEVEL <= 1
#define DEFAULT_DISABLE_G92_PERSISTENCE Off
#else
#define DEFAULT_DISABLE_G92_PERSISTENCE On
#endif
#endif
///@}
/*! @name $398 - Setting_PlannerBlocks
\brief The number of linear motions in the planner buffer to be planned at any give time.
The vast majority of RAM that grblHAL uses is based on this buffer size. Only increase if
there is extra available RAM, like when compiling for MCU with ample amounts of RAM.
Or decrease if the MCU begins to crash due to the lack of available RAM or if the CPU is
having trouble keeping up with planning new incoming motions as they are executed.
*/
///@{
#if !defined DEFAULT_PLANNER_BUFFER_BLOCKS || defined __DOXYGEN__
#define DEFAULT_PLANNER_BUFFER_BLOCKS 100
#endif
///@}
// Control signals settings (Group_ControlSignals)
#ifndef __DOXYGEN__ // For now do not include in documentation
/*! @name Control signals bit definitions and mask.
__NOTE:__ these definitions are only referenced in this file. Do __NOT__ change!
*/
///@{
#define SIGNALS_RESET_BIT (1<<0)
#define SIGNALS_FEEDHOLD_BIT (1<<1)
#define SIGNALS_CYCLESTART_BIT (1<<2)
#define SIGNALS_SAFETYDOOR_BIT (1<<3)
#define SIGNALS_BLOCKDELETE_BIT (1<<4)
#define SIGNALS_STOPDISABLE_BIT (1<<5)
#define SIGNALS_ESTOP_BIT (1<<6)
#define SIGNALS_PROBE_CONNECTED_BIT (1<<7)
#define SIGNALS_MOTOR_FAULT_BIT (1<<8)
#define SIGNALS_BITMASK (SIGNALS_RESET_BIT|SIGNALS_FEEDHOLD_BIT|SIGNALS_CYCLESTART_BIT|SIGNALS_SAFETYDOOR_BIT|SIGNALS_BLOCKDELETE_BIT|SIGNALS_STOPDISABLE_BIT|SIGNALS_ESTOP_BIT|SIGNALS_PROBE_CONNECTED_BIT|SIGNALS_MOTOR_FAULT_BIT)
///@}
#endif
/*! @name $14 - Setting_ControlInvertMask
Inverts logic of the control input signals based on a \ref signalmask. This essentially means you are using
normally-open (NO) switches on the specified pins, rather than the default normally-closed (NC) switches.
<br>__NOTE:__ See above for other signal definitions.
*/
///@{
#if !defined DEFAULT_CONTROL_SIGNALS_INVERT_MASK || defined __DOXYGEN__
#define DEFAULT_CONTROL_SIGNALS_INVERT_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
#endif
///@}
/*! @name $17 - Setting_ControlPullUpDisableMask
By default, grblHAL sets all input pins to normal-low operation with their internal pull-up resistors
enabled. This simplifies the wiring for users by requiring only a normally closed (NC) switch connected
to ground. It is not recommended to use normally-open (NO) switches as this increases the risk
of electrical noise spuriously triggering the inputs. If normally-open (NO) switches are used the
logic of the input signals should be be inverted with the invert settings below.
The following options disable the internal pull-up resistors, and switches must be now connect to Vcc
instead of ground.
<br>__WARNING:__ When the pull-ups are disabled, this might require additional wiring with pull-down resistors!
Please check driver code and/or documentation.
<br>__NOTE:__ The first example will disable pull-up for all control pins. The second is an example of
disabling pull-up for only a few pins. See above for other signal definitions.
*/
///@{
#if !defined DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK || defined __DOXYGEN__
#define DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
#endif
///@}
// Limits settings (Group_Limits)
/*! @name $5 - Setting_LimitPinsInvertMask
By default, grblHAL sets all input pins to normal-low operation with their internal pull-up resistors
enabled. This simplifies the wiring for users by requiring only a normally closed (NC) switch connected
to ground. It is _not_ recommended to use normally-open (NO) switches as this increases the risk
of electrical noise or cable breaks spuriously triggering the inputs. If normally-open (NO) switches
are used the logic of the input signals should be be inverted with the \ref axismask below.
*/
///@{
#if !defined DEFAULT_LIMIT_SIGNALS_INVERT_MASK || defined __DOXYGEN__
#define DEFAULT_LIMIT_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
#endif
///@}
/*! @name $18 - Setting_LimitPullUpDisableMask
The following options disable the internal pull-up resistors by \ref axismask, and switches must
be now connect to Vcc instead of ground.
<br>__WARNING:__ When the pull-ups are disabled, this might require additional wiring with
pull-down resistors! Please check driver code and/or documentation.
*/
///@{
#if !defined DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK || defined __DOXYGEN__
#define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK 0 // Set to -1 or AXES_BITMASK to disable pullup for all axes
#endif
///@}
/*! @name $20 - Setting_SoftLimitsEnable
*/
///@{
#if !defined DEFAULT_SOFT_LIMIT_ENABLE || defined __DOXYGEN__
#define DEFAULT_SOFT_LIMIT_ENABLE Off
#endif
///@}
/*! @name $21 - Setting_HardLimitsEnable
*/
///@{
/*! \def DEFAULT_HARD_LIMIT_ENABLE
\brief
At power-up or a reset, grblHAL will check the limit switch states to ensure they are not active
before initialization. If it detects a problem and the hard limits setting is enabled, grblHAL will
simply message the user to check the limits and enter an alarm state, rather than idle. grblHAL will
not throw an alarm message.
*/
#if !defined DEFAULT_HARD_LIMIT_ENABLE || defined __DOXYGEN__
#define DEFAULT_HARD_LIMIT_ENABLE Off
#endif
#if !defined DEFAULT_CHECK_LIMITS_AT_INIT || defined __DOXYGEN__
#define DEFAULT_CHECK_LIMITS_AT_INIT Off
#endif
#if !defined DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY || defined __DOXYGEN__
#define DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY Off
#endif
/*! @name Group_Limits_DualAxis
\brief Dual axis limits settings (Group_Limits_DualAxis)
To prevent the homing cycle from racking the dual axis, when one limit triggers before the
other due to switch failure or noise, the homing cycle will automatically abort if the second
motor's limit switch does not trigger within the three distance parameters defined below.
Axis length percent will automatically compute a fail distance as a percentage of the max
travel of the other non-dual axis, i.e. if dual axis select is X_AXIS at 5.0%, then the fail
distance will be computed as 5.0% of y-axis max travel. Fail distance max and min are the
limits of how far or little a valid fail distance is.
*/
///@{
/*! @name $347 - Setting_DualAxisLengthFailPercent
*/
///@{
#if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT || defined __DOXYGEN__
#define DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT 5.0f // Float (percent)
#endif
///@}
/*! @name $348 - Setting_DualAxisLengthFailMin
*/
///@{
#if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN || defined __DOXYGEN__
#define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN 2.5f // Float (mm)
#endif
///@}
/*! @name $348 - Setting_DualAxisLengthFailMin
*/
///@{
#if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX || defined __DOXYGEN__
#define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX 25.0f // Float (mm)
#endif
///@}
// Coolant settings (Group_Coolant)