grblHAL core  20250320
config.h
Go to the documentation of this file.
1 /*
2  config.h - compile time configuration and default setting values
3 
4  Part of grblHAL
5 
6  Copyright (c) 2020-2025 Terje Io
7 
8  grblHAL is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  grblHAL is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
32 #ifndef _GRBL_CONFIG_H_
33 #define _GRBL_CONFIG_H_
34 
35 // Compile time only default configuration
36 
41 #ifndef N_AXIS
42 #define N_AXIS 3 // Number of axes
43 #endif
44 
50 #if (!defined AXIS_REMAP_ABC2UVW && (N_AXIS > 3 && N_AXIS < 7)) || defined __DOXYGEN__
51 #define AXIS_REMAP_ABC2UVW Off
52 #endif
53 
57 #if !defined N_SPINDLE || defined __DOXYGEN__
58 #define N_SPINDLE 1
59 #endif
60 
64 #if !defined N_SYS_SPINDLE || defined __DOXYGEN__
65 #define N_SYS_SPINDLE 1
66 #endif
67 
71 #if !defined BUILD_INFO || defined __DOXYGEN__
72 #define BUILD_INFO ""
73 #endif
74 
89 #if !defined COMPATIBILITY_LEVEL || defined __DOXYGEN__
90 #define COMPATIBILITY_LEVEL 0
91 #endif
92 
101 #if !defined ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
102 #define ENABLE_SPINDLE_LINEARIZATION 0 // Set to 1 to enable spindle RPM linearization. Requires compatible driver if enabled.
103 #endif
104 
108 #if !defined SPINDLE_NPWM_PIECES || defined __DOXYGEN__
109 #define SPINDLE_NPWM_PIECES 4 // Number of pieces for spindle RPM linearization, max 4.
110 #endif
111 
112 #include "nuts_bolts.h"
113 
114 //#define KINEMATICS_API // Uncomment to add HAL entry points for custom kinematics
115 
120 #if !defined MASLOW_ROUTER || defined __DOXYGEN__
121 // Enable Maslow router kinematics.
122 // Experimental - testing required and homing needs to be worked out.
123 #define MASLOW_ROUTER Off
124 #endif
125 
130 #if !defined WALL_PLOTTER || defined __DOXYGEN__
131 #define WALL_PLOTTER Off
132 #endif
133 
138 #if !defined DELTA_ROBOT || defined __DOXYGEN__
139 #define DELTA_ROBOT Off
140 #endif
141 
142 // Reduce minimum feedrate for delta robots
143 #if DELTA_ROBOT && !defined MINIMUM_FEED_RATE
144 #define MINIMUM_FEED_RATE 0.1f // (radians/min)
145 #endif
146 
151 #if !defined POLAR_ROBOT || defined __DOXYGEN__
152 #define POLAR_ROBOT Off
153 #endif
154 
155 
165 #if !defined COREXY || defined __DOXYGEN__
166 #define COREXY Off
167 #endif
168 
176 #if !defined CHECK_MODE_DELAY || defined __DOXYGEN__
177 #define CHECK_MODE_DELAY 0 // ms
178 #endif
179 
185 #if !defined DEBOUNCE_DELAY || defined __DOXYGEN__
186 #define DEBOUNCE_DELAY 40 // ms
187 #endif
188 
189 // ---------------------------------------------------------------------------------------
190 // ADVANCED CONFIGURATION OPTIONS:
191 
192 // EXPERIMENTAL OPTIONS
193 
194 #define ENABLE_PATH_BLENDING Off // Do NOT enable unless working on adding this feature!
195 
196 #if !defined ENABLE_ACCELERATION_PROFILES || defined __DOXYGEN__
197 #define ENABLE_ACCELERATION_PROFILES Off // Enable to allow G-Code changeable acceleration profiles.
198 #endif
199 
200 #if !defined ENABLE_JERK_ACCELERATION || defined __DOXYGEN__
201 #define ENABLE_JERK_ACCELERATION Off // Enable to use 3rd order acceleration calculations. May need more processing power, a FPU will help.
202 #endif
203 
204 // -
205 
206 // Enables code for debugging purposes. Not for general use and always in constant flux.
207 //#define DEBUG // Uncomment to enable. Default disabled.
208 //#define DEBUGOUT 0 // Uncomment to claim serial port with given instance number and add HAL entry point for debug output.
209 
222 #if !defined REPORT_OVERRIDE_REFRESH_BUSY_COUNT || defined __DOXYGEN__
223 #define REPORT_OVERRIDE_REFRESH_BUSY_COUNT 20 // (1-255)
224 #endif
225 #if !defined REPORT_OVERRIDE_REFRESH_IDLE_COUNT || defined __DOXYGEN__
226 #define REPORT_OVERRIDE_REFRESH_IDLE_COUNT 10 // (1-255) Must be less than or equal to the busy count
227 #endif
228 #if !defined REPORT_WCO_REFRESH_BUSY_COUNT || defined __DOXYGEN__
229 #define REPORT_WCO_REFRESH_BUSY_COUNT 30 // (2-255)
230 #endif
231 #if !defined REPORT_WCO_REFRESH_IDLE_COUNT || defined __DOXYGEN__
232 #define REPORT_WCO_REFRESH_IDLE_COUNT 10 // (2-255) Must be less than or equal to the busy count
233 #endif
235 
246 #if !defined ACCELERATION_TICKS_PER_SECOND || defined __DOXYGEN__
247 #define ACCELERATION_TICKS_PER_SECOND 100
248 #endif
249 
250 // Sets the maximum step rate allowed to be written as a grblHAL setting. This option enables an error
251 // check in the settings module to prevent settings values that will exceed this limitation. The maximum
252 // step rate is strictly limited by the CPU speed and will change if something other than an AVR running
253 // at 16MHz is used.
254 // NOTE: For now disabled, will enable if flash space permits.
255 //#define MAX_STEP_RATE_HZ 30000 // Hz
256 
267 #if !defined REPORT_ECHO_LINE_RECEIVED || defined __DOXYGEN__
268 #define REPORT_ECHO_LINE_RECEIVED Off // Default disabled. Set to \ref On or 1 to enable.
269 #endif
270 
277 #if !defined TOOL_LENGTH_OFFSET_AXIS || defined __DOXYGEN__
278 #define TOOL_LENGTH_OFFSET_AXIS -1 // Default is all axes.
279 #endif
280 
290 #if !defined MINIMUM_JUNCTION_SPEED || defined __DOXYGEN__
291 #define MINIMUM_JUNCTION_SPEED 0.0f // (mm/min)
292 #endif
293 
301 #if !defined MINIMUM_FEED_RATE || defined __DOXYGEN__
302 #define MINIMUM_FEED_RATE 1.0f // (mm/min)
303 #endif
304 
312 #if !defined N_ARC_CORRECTION || defined __DOXYGEN__
313 #define N_ARC_CORRECTION 12 // Integer (1-255)
314 #endif
315 
327 #if !defined ARC_ANGULAR_TRAVEL_EPSILON || defined __DOXYGEN__
328 #define ARC_ANGULAR_TRAVEL_EPSILON 5E-7f // Float (radians)
329 #endif
330 
335 #if !defined BEZIER_MIN_STEP || defined __DOXYGEN__
336 #define BEZIER_MIN_STEP 0.002f
337 #endif
338 #if !defined BEZIER_MAX_STEP || defined __DOXYGEN__
339 #define BEZIER_MAX_STEP 0.1f
340 #endif
341 #if !defined BEZIER_SIGMA || defined __DOXYGEN__
342 #define BEZIER_SIGMA 0.1f
343 #endif
345 
346 
354 #if !defined DWELL_TIME_STEP || defined __DOXYGEN__
355 #define DWELL_TIME_STEP 50 // Integer (1-255) (milliseconds)
356 #endif
357 
367 #if !defined SEGMENT_BUFFER_SIZE || defined __DOXYGEN__
368 #define SEGMENT_BUFFER_SIZE 10 // Uncomment to override default in stepper.h.
369 #endif
370 
376 #if !defined SET_CHECK_MODE_PROBE_TO_START || defined __DOXYGEN__
377 #define SET_CHECK_MODE_PROBE_TO_START Off // Default disabled. Set to \ref On or 1 to enable.
378 #endif
379 
391 #if !defined HARD_LIMIT_FORCE_STATE_CHECK || defined __DOXYGEN__
392 #define HARD_LIMIT_FORCE_STATE_CHECK Off // Default disabled. Set to \ref On or 1 to enable.
393 #endif
394 
406 #if !defined HOMING_AXIS_SEARCH_SCALAR || defined __DOXYGEN__
407 #define HOMING_AXIS_SEARCH_SCALAR 1.5f // Must be > 1 to ensure limit switch will be engaged.
408 #endif
409 #if !defined HOMING_AXIS_LOCATE_SCALAR || defined __DOXYGEN__
410 #define HOMING_AXIS_LOCATE_SCALAR 10.0f// Must be > 1 to ensure limit switch is cleared.
411 #endif
413 
421 #if !defined ENABLE_RESTORE_NVS_WIPE_ALL || defined __DOXYGEN__
422 #define ENABLE_RESTORE_NVS_WIPE_ALL On
423 #endif
424 #if !defined ENABLE_RESTORE_NVS_DEFAULT_SETTINGS || defined __DOXYGEN__
425 #define ENABLE_RESTORE_NVS_DEFAULT_SETTINGS On
426 #endif
427 #if !defined ENABLE_RESTORE_NVS_CLEAR_PARAMETERS || defined __DOXYGEN__
428 #define ENABLE_RESTORE_NVS_CLEAR_PARAMETERS On
429 #endif
430 #if !defined ENABLE_RESTORE_NVS_DRIVER_PARAMETERS || defined __DOXYGEN__
431 #define ENABLE_RESTORE_NVS_DRIVER_PARAMETERS On
432 #endif
434 
445 #if !defined SETTINGS_RESTORE_DEFAULTS || defined __DOXYGEN__
446 #define SETTINGS_RESTORE_DEFAULTS On
447 #endif
448 #if !defined SETTINGS_RESTORE_PARAMETERS || defined __DOXYGEN__
449 #define SETTINGS_RESTORE_PARAMETERS On
450 #endif
451 #if !defined SETTINGS_RESTORE_STARTUP_LINES || defined __DOXYGEN__
452 #define SETTINGS_RESTORE_STARTUP_LINES On
453 #endif
454 #if !defined SETTINGS_RESTORE_BUILD_INFO || defined __DOXYGEN__
455 #define SETTINGS_RESTORE_BUILD_INFO On
456 #endif
457 #if !defined SETTINGS_RESTORE_DRIVER_PARAMETERS || defined __DOXYGEN__
458 #define SETTINGS_RESTORE_DRIVER_PARAMETERS On
459 #endif
468 #if !defined DISABLE_BUILD_INFO_WRITE_COMMAND || defined __DOXYGEN__
469 #define DISABLE_BUILD_INFO_WRITE_COMMAND Off
470 #endif
472 
486 #if !defined SLEEP_DURATION || defined __DOXYGEN__
487 #define SLEEP_DURATION 5.0f // Number of minutes before sleep mode is entered.
488 #endif
489 
495 #if !defined NVSDATA_BUFFER_ENABLE || defined __DOXYGEN__
496 #define NVSDATA_BUFFER_ENABLE On // Default on, set to \ref off or 0 to disable.
497 #endif
498 
508 #if !defined TOOLSETTER_RADIUS || defined __DOXYGEN__
509 #define TOOLSETTER_RADIUS 5.0f
510 #endif
511 
512 #if !defined ENABLE_BACKLASH_COMPENSATION || defined __DOXYGEN__
513 #define ENABLE_BACKLASH_COMPENSATION Off
514 #endif
515 
516 #if COMPATIBILITY_LEVEL == 0 || defined __DOXYGEN__
521 #if !defined N_TOOLS || defined __DOXYGEN__
522 #define N_TOOLS 0
523 #endif
524 #endif
525 
532 #if !defined NGC_EXPRESSIONS_ENABLE || defined __DOXYGEN__
533 #define NGC_EXPRESSIONS_ENABLE On
534 #endif
535 
540 #if !defined NGC_PARAMETERS_ENABLE || defined __DOXYGEN__
541 #define NGC_PARAMETERS_ENABLE On
542 #endif
543 
548 #if (NGC_EXPRESSIONS_ENABLE && !defined NGC_N_ASSIGN_PARAMETERS_PER_BLOCK) || defined __DOXYGEN__
549 #define NGC_N_ASSIGN_PARAMETERS_PER_BLOCK 10
550 #endif
551 
556 #if !defined LATHE_UVW_OPTION || defined __DOXYGEN__
557 #define LATHE_UVW_OPTION Off
558 #endif
559 
560 // Max number of entries in log for PID data reporting, to be used for tuning
561 //#define PID_LOG 1000 // Default disabled. Uncomment to enable.
562 
563 // End compile time only default configuration
564 
565 // ---------------------------------------------------------------------------------------
566 // SETTINGS DEFAULT VALUE OVERRIDES:
567 
568 // General settings (Group_General)
569 
579 
584 #if !defined DEFAULT_REPORT_MACHINE_POSITION || defined __DOXYGEN__
585 #define DEFAULT_REPORT_MACHINE_POSITION On // Default on. Set to \ref Off or 0 to disable.
586 #endif
587 
593 #if !defined DEFAULT_REPORT_BUFFER_STATE || defined __DOXYGEN__
594 #define DEFAULT_REPORT_BUFFER_STATE On // Default on. Set to \ref Off or 0 to disable.
595 #endif
596 
604 #if !defined DEFAULT_REPORT_LINE_NUMBERS || defined __DOXYGEN__
605 #define DEFAULT_REPORT_LINE_NUMBERS On // Default on. Set to \ref Off or 0 to disable.
606 #endif
607 
614 #if !defined DEFAULT_REPORT_CURRENT_FEED_SPEED || defined __DOXYGEN__
615 #define DEFAULT_REPORT_CURRENT_FEED_SPEED On // Default on. Set to \ref Off or 0 to disable.
616 #endif
617 
624 #if !defined DEFAULT_REPORT_PIN_STATE || defined __DOXYGEN__
625 #define DEFAULT_REPORT_PIN_STATE On // Default on. Set to \ref Off or 0 to disable.
626 #endif
627 
634 #if !defined DEFAULT_REPORT_WORK_COORD_OFFSET || defined __DOXYGEN__
635 #define DEFAULT_REPORT_WORK_COORD_OFFSET On // Default on. Set to \ref Off or 0 to disable.
636 #endif
637 
644 #if !defined DEFAULT_REPORT_OVERRIDES || defined __DOXYGEN__
645 #define DEFAULT_REPORT_OVERRIDES On // Default on. Set to \ref Off or 0 to disable.
646 #endif
647 
655 #if !defined DEFAULT_REPORT_PROBE_COORDINATES || defined __DOXYGEN__
656 #define DEFAULT_REPORT_PROBE_COORDINATES On // Default on. Set to \ref Off or 0 to disable.
657 #endif
658 
669 #if !defined DEFAULT_REPORT_SYNC_ON_WCO_CHANGE || defined __DOXYGEN__
670 #define DEFAULT_REPORT_SYNC_ON_WCO_CHANGE On
671 #endif
672 
680 #if !defined DEFAULT_REPORT_PARSER_STATE || defined __DOXYGEN__
681 #define DEFAULT_REPORT_PARSER_STATE Off // Default off. Set to \ref On or 1 to enable.
682 #endif
683 
694 #if !defined DEFAULT_REPORT_ALARM_SUBSTATE || defined __DOXYGEN__
695 #define DEFAULT_REPORT_ALARM_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
696 #endif
697 
707 #if !defined DEFAULT_REPORT_RUN_SUBSTATE || defined __DOXYGEN__
708 #define DEFAULT_REPORT_RUN_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
709 #endif
710 
717 #if !defined DEFAULT_REPORT_WHEN_HOMING || defined __DOXYGEN__
718 #define DEFAULT_REPORT_WHEN_HOMING Off // Default off. Set to \ref On or 1 to enable.
719 #endif
720 
722 
727 #if !defined DEFAULT_JUNCTION_DEVIATION || defined __DOXYGEN__
728 #define DEFAULT_JUNCTION_DEVIATION 0.01f // mm
729 #endif
731 
736 #if !defined DEFAULT_ARC_TOLERANCE || defined __DOXYGEN__
737 #define DEFAULT_ARC_TOLERANCE 0.002f // mm
738 #endif
740 
746 #if !defined DEFAULT_REPORT_INCHES || defined __DOXYGEN__
747 #define DEFAULT_REPORT_INCHES Off
748 #endif
750 
756 #if !defined DEFAULT_G73_RETRACT || defined __DOXYGEN__
757 #define DEFAULT_G73_RETRACT 0.1f // mm
758 #endif
760 
765 #if !defined DEFAULT_LASER_MODE || defined __DOXYGEN__
766 #define DEFAULT_LASER_MODE Off
767 #endif
768 #if !defined DEFAULT_LATHE_MODE || defined __DOXYGEN__
769 #define DEFAULT_LATHE_MODE Off
770 #endif
772 
782 #if !defined DEFAULT_LEGACY_RTCOMMANDS || defined __DOXYGEN__
783 #define DEFAULT_LEGACY_RTCOMMANDS On
784 #endif
786 
790 #if !defined DEFAULT_RESET_OVERRIDES || defined __DOXYGEN__
791 #define DEFAULT_RESET_OVERRIDES Off
792 #endif
794 
798 #if !defined DEFAULT_SLEEP_ENABLE || defined __DOXYGEN__
799 #define DEFAULT_SLEEP_ENABLE Off
800 #endif
802 
810 #if !defined DEFAULT_DISABLE_LASER_DURING_HOLD || defined __DOXYGEN__
811 #define DEFAULT_DISABLE_LASER_DURING_HOLD On
812 #endif
814 
820 #if !defined DEFAULT_RESTORE_AFTER_FEED_HOLD || defined __DOXYGEN__
821 #define DEFAULT_RESTORE_AFTER_FEED_HOLD On
822 #endif
824 
834 #if !defined DEFAULT_FORCE_INITIALIZATION_ALARM || defined __DOXYGEN__
835 #define DEFAULT_FORCE_INITIALIZATION_ALARM Off
836 #endif
838 
845 #if !defined DEFAULT_DISABLE_G92_PERSISTENCE || defined __DOXYGEN__
846 #if COMPATIBILITY_LEVEL <= 1
847 #define DEFAULT_DISABLE_G92_PERSISTENCE Off
848 #else
849 #define DEFAULT_DISABLE_G92_PERSISTENCE On
850 #endif
851 #endif
853 
862 #if !defined DEFAULT_PLANNER_BUFFER_BLOCKS || defined __DOXYGEN__
863 #define DEFAULT_PLANNER_BUFFER_BLOCKS 100
864 #endif
866 
876 #if !defined DEFAULT_HOMING_KEEP_STATUS_ON_RESET || defined __DOXYGEN__
877 #define DEFAULT_HOMING_KEEP_STATUS_ON_RESET Off // Default disabled. Set to \ref On or 1 to enable.
878 #endif
880 
887 #if !defined DEFAULT_KEEP_OFFSETS_ON_RESET || defined __DOXYGEN__
888 #define DEFAULT_KEEP_OFFSETS_ON_RESET Off
889 #endif
891 
892 // Control signals settings (Group_ControlSignals)
893 
894 #ifndef __DOXYGEN__ // For now do not include in documentation
895 
901 #define SIGNALS_RESET_BIT (1<<0)
902 #define SIGNALS_FEEDHOLD_BIT (1<<1)
903 #define SIGNALS_CYCLESTART_BIT (1<<2)
904 #define SIGNALS_SAFETYDOOR_BIT (1<<3)
905 #define SIGNALS_BLOCKDELETE_BIT (1<<4)
906 #define SIGNALS_STOPDISABLE_BIT (1<<5)
907 #define SIGNALS_ESTOP_BIT (1<<6)
908 #define SIGNALS_PROBE_CONNECTED_BIT (1<<7)
909 #define SIGNALS_MOTOR_FAULT_BIT (1<<8)
910 #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)
912 
913 #endif
914 
921 #if !defined DEFAULT_CONTROL_SIGNALS_INVERT_MASK || defined __DOXYGEN__
922 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
923 #endif
925 
940 #if !defined DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK || defined __DOXYGEN__
941 #define DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
942 #endif
944 
945 // Limits settings (Group_Limits)
946 
955 #if !defined DEFAULT_LIMIT_SIGNALS_INVERT_MASK || defined __DOXYGEN__
956 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
957 #endif
959 
967 #if !defined DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK || defined __DOXYGEN__
968 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK 0 // Set to -1 or AXES_BITMASK to disable pullup for all axes
969 #endif
971 
975 #if !defined DEFAULT_SOFT_LIMIT_ENABLE || defined __DOXYGEN__
976 #define DEFAULT_SOFT_LIMIT_ENABLE Off
977 #endif
979 
983 
990 #if !defined DEFAULT_HARD_LIMIT_ENABLE || defined __DOXYGEN__
991 #define DEFAULT_HARD_LIMIT_ENABLE Off
992 #endif
993 #if !defined DEFAULT_CHECK_LIMITS_AT_INIT || defined __DOXYGEN__
994 #define DEFAULT_CHECK_LIMITS_AT_INIT Off
995 #endif
996 #if !defined DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY || defined __DOXYGEN__
997 #define DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY Off
998 #endif
999 
1012 
1015 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT || defined __DOXYGEN__
1016 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT 5.0f // Float (percent)
1017 #endif
1019 
1023 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN || defined __DOXYGEN__
1024 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN 2.5f // Float (mm)
1025 #endif
1027 
1032 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX || defined __DOXYGEN__
1033 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX 25.0f // Float (mm)
1034 #endif
1036 
1037 // Coolant settings (Group_Coolant)
1038 
1044 #if !defined DEFAULT_INVERT_COOLANT_FLOOD_PIN || defined __DOXYGEN__
1045 #define DEFAULT_INVERT_COOLANT_FLOOD_PIN Off
1046 #endif
1047 #if !defined DEFAULT_INVERT_COOLANT_MIST_PIN || defined __DOXYGEN__
1048 #define DEFAULT_INVERT_COOLANT_MIST_PIN Off // NOTE: not supported by all drivers.
1049 #endif
1051 
1055 #if !defined DEFAULT_COOLANT_ON_DELAY || defined __DOXYGEN__
1056 #define DEFAULT_COOLANT_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1057 #endif
1059 
1060 // Spindle settings (Group_Spindle)
1061 
1065 #if !defined DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED || defined __DOXYGEN__
1066 #define DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED Off
1067 #endif
1068 #if !defined DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE || defined __DOXYGEN__
1069 #define DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE Off
1070 #endif
1072 
1077 #if !defined DEFAULT_INVERT_SPINDLE_ENABLE_PIN || defined __DOXYGEN__
1078 #define DEFAULT_INVERT_SPINDLE_ENABLE_PIN Off
1079 #endif
1080 #if !defined DEFAULT_INVERT_SPINDLE_CCW_PIN || defined __DOXYGEN__
1081 #define DEFAULT_INVERT_SPINDLE_CCW_PIN Off // NOTE: not supported by all drivers.
1082 #endif
1083 #if !defined DEFAULT_INVERT_SPINDLE_PWM_PIN || defined __DOXYGEN__
1084 #define DEFAULT_INVERT_SPINDLE_PWM_PIN Off // NOTE: not supported by all drivers.
1085 #endif
1087 
1091 #if !defined DEFAULT_SPINDLE_RPM_MAX || defined __DOXYGEN__
1092 #define DEFAULT_SPINDLE_RPM_MAX 1000.0f // rpm
1093 #endif
1095 
1099 #if !defined DEFAULT_SPINDLE_RPM_MIN || defined __DOXYGEN__
1100 #define DEFAULT_SPINDLE_RPM_MIN 0.0f // rpm
1101 #endif
1103 
1107 #if !defined DEFAULT_SPINDLE_PWM_FREQ || defined __DOXYGEN__
1108 #define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
1109 #endif
1111 
1115 #if !defined DEFAULT_SPINDLE_PWM_OFF_VALUE || defined __DOXYGEN__
1116 #define DEFAULT_SPINDLE_PWM_OFF_VALUE 0.0f // Percent
1117 #endif
1119 
1132 #if !defined DEFAULT_SPINDLE_PWM_MIN_VALUE || defined __DOXYGEN__
1133 #define DEFAULT_SPINDLE_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1134 #endif
1136 
1140 #if !defined DEFAULT_SPINDLE_PWM_MAX_VALUE || defined __DOXYGEN__
1141 #define DEFAULT_SPINDLE_PWM_MAX_VALUE 100.0f // Percent
1142 #endif
1144 
1153 #if !defined DEFAULT_SPINDLE_PPR || defined __DOXYGEN__
1154 #define DEFAULT_SPINDLE_PPR 0 // Pulses per revolution.
1155 #endif
1157 
1161 #if !defined DEFAULT_SPINDLE_AT_SPEED_TOLERANCE || defined __DOXYGEN__
1162 #define DEFAULT_SPINDLE_AT_SPEED_TOLERANCE 0.0f // Percent - 0 means not checked
1163 #endif
1165 
1169 #if !defined DEFAULT_SPINDLE_ON_DELAY || defined __DOXYGEN__
1170 #define DEFAULT_SPINDLE_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1171 #endif
1173 
1177 #if !defined DEFAULT_SPINDLE || defined __DOXYGEN__
1178 #define DEFAULT_SPINDLE SPINDLE_PWM0 // Spindle number from spindle_control.h
1179 #endif
1181 
1185 #if !defined DEFAULT_SPINDLE_OFF_DELAY || defined __DOXYGEN__
1186 #define DEFAULT_SPINDLE_OFF_DELAY 0 // milliseconds: 0 or 500 - 20000
1187 #endif
1189 
1190 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1191 
1192 // $9 - Setting_SpindlePWMOptions
1193 // bit 0
1194 // always defaults to on
1195 // bit 1
1196 
1197 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1198 
1199 #ifndef DEFAULT_SPINDLE_P_GAIN
1200 #define DEFAULT_SPINDLE_P_GAIN 1.0f
1201 #endif
1202 #ifndef DEFAULT_SPINDLE_I_GAIN
1203 #define DEFAULT_SPINDLE_I_GAIN 0.01f
1204 #endif
1205 #ifndef DEFAULT_SPINDLE_D_GAIN
1206 #define DEFAULT_SPINDLE_D_GAIN 0.0f
1207 #endif
1208 #ifndef DEFAULT_SPINDLE_I_MAX
1209 #define DEFAULT_SPINDLE_I_MAX 10.0f
1210 #endif
1211 
1212 #if ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
1213 
1218 #if !defined DEFAULT_RPM_POINT01 || defined __DOXYGEN__
1219 #define DEFAULT_RPM_POINT01 NAN // DEFAULT_SPINDLE_RPM_MIN // Replace NAN with DEFAULT_SPINDLE_RPM_MIN to enable.
1220 #endif
1221 #if !defined DEFAULT_RPM_LINE_A1 || defined __DOXYGEN__
1222 #define DEFAULT_RPM_LINE_A1 3.197101e-03f
1223 #endif
1224 #if !defined DEFAULT_RPM_LINE_B1 || defined __DOXYGEN__
1225 #define DEFAULT_RPM_LINE_B1 -3.526076e-1f
1226 #endif
1228 
1233 #if !defined DEFAULT_RPM_POINT12 || defined __DOXYGEN__
1234 #define DEFAULT_RPM_POINT12 NAN // Change NAN to a float constant to enable.
1235 #endif
1236 #if !defined DEFAULT_RPM_LINE_A2 || defined __DOXYGEN__
1237 #define DEFAULT_RPM_LINE_A2 1.722950e-2f
1238 #endif
1239 #if !defined DEFAULT_RPM_LINE_B2 || defined __DOXYGEN__
1240 #define DEFAULT_RPM_LINE_B2 1.0f,
1241 #endif
1243 
1248 #if !defined DEFAULT_RPM_POINT23 || defined __DOXYGEN__
1249 #define DEFAULT_RPM_POINT23 NAN // Change NAN to a float constant to enable.
1250 #endif
1251 #if !defined DEFAULT_RPM_LINE_A3 || defined __DOXYGEN__
1252 #define DEFAULT_RPM_LINE_A3 5.901518e-02f
1253 #endif
1254 #if !defined DEFAULT_RPM_LINE_B3 || defined __DOXYGEN__
1255 #define DEFAULT_RPM_LINE_B3 4.881851e+02f
1256 #endif
1258 
1263 #if !defined DEFAULT_RPM_POINT34 || defined __DOXYGEN__
1264 #define DEFAULT_RPM_POINT34 NAN // Change NAN to a float constant to enable.
1265 #endif
1266 #if !defined DEFAULT_RPM_LINE_A4 || defined __DOXYGEN__
1267 #define DEFAULT_RPM_LINE_A4 1.203413e-01f
1268 #endif
1269 #if !defined DEFAULT_RPM_LINE_B4 || defined __DOXYGEN__
1270 #define DEFAULT_RPM_LINE_B4 1.151360e+03f
1271 #endif
1273 
1274 #endif // ENABLE_SPINDLE_LINEARIZATION
1275 
1276 // Settings for second PWM spindle
1277 
1282 #if !defined DEFAULT_INVERT_SPINDLE1_ENABLE_PIN || defined __DOXYGEN__
1283 #define DEFAULT_INVERT_SPINDLE1_ENABLE_PIN Off
1284 #endif
1285 #if !defined DEFAULT_INVERT_SPINDLE1_CCW_PIN || defined __DOXYGEN__
1286 #define DEFAULT_INVERT_SPINDLE1_CCW_PIN Off // NOTE: not supported by all drivers.
1287 #endif
1288 #if !defined DEFAULT_INVERT_SPINDLE1_PWM_PIN || defined __DOXYGEN__
1289 #define DEFAULT_INVERT_SPINDLE1_PWM_PIN Off // NOTE: not supported by all drivers.
1290 #endif
1292 
1296 #if !defined DEFAULT_SPINDLE1_RPM_MAX || defined __DOXYGEN__
1297 #define DEFAULT_SPINDLE1_RPM_MAX 1000.0f // rpm
1298 #endif
1300 
1304 #if !defined DEFAULT_SPINDLE1_RPM_MIN || defined __DOXYGEN__
1305 #define DEFAULT_SPINDLE1_RPM_MIN 0.0f // rpm
1306 #endif
1308 
1312 #if !defined DEFAULT_SPINDLE1_PWM_FREQ || defined __DOXYGEN__
1313 #define DEFAULT_SPINDLE1_PWM_FREQ 5000 // Hz
1314 #endif
1316 
1320 #if !defined DEFAULT_SPINDLE1_PWM_OFF_VALUE || defined __DOXYGEN__
1321 #define DEFAULT_SPINDLE1_PWM_OFF_VALUE 0.0f // Percent
1322 #endif
1324 
1337 #if !defined DEFAULT_SPINDLE1_PWM_MIN_VALUE || defined __DOXYGEN__
1338 #define DEFAULT_SPINDLE1_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1339 #endif
1341 
1345 #if !defined DEFAULT_SPINDLE1_PWM_MAX_VALUE || defined __DOXYGEN__
1346 #define DEFAULT_SPINDLE1_PWM_MAX_VALUE 100.0f // Percent
1347 #endif
1349 
1350 
1351 // Tool change settings (Group_Toolchange)
1352 
1357 #if !defined DEFAULT_TOOLCHANGE_MODE || defined __DOXYGEN__
1358 #define DEFAULT_TOOLCHANGE_MODE 0
1359 #endif
1361 
1365 #if !defined DEFAULT_TOOLCHANGE_PROBING_DISTANCE || defined __DOXYGEN__
1366 #define DEFAULT_TOOLCHANGE_PROBING_DISTANCE 30 // max probing distance in mm for mode 3
1367 #endif
1369 
1373 #if !defined DEFAULT_TOOLCHANGE_FEED_RATE || defined __DOXYGEN__
1374 #define DEFAULT_TOOLCHANGE_FEED_RATE 25.0f // mm/min
1375 #endif
1377 
1382 #if !defined DEFAULT_TOOLCHANGE_SEEK_RATE || defined __DOXYGEN__
1383 #define DEFAULT_TOOLCHANGE_SEEK_RATE 200.0f // mm/min
1384 #endif
1386 
1390 #if !defined DEFAULT_TOOLCHANGE_PULLOFF_RATE || defined __DOXYGEN__
1391 #define DEFAULT_TOOLCHANGE_PULLOFF_RATE 200.0f // mm/min
1392 #endif
1394 
1398 #if !defined DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION || defined __DOXYGEN__
1399 #define DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION Off
1400 #endif
1402 
1403 // Homing settings (Group_Homing)
1404 
1411 #if !defined DEFAULT_HOMING_ENABLE || defined __DOXYGEN__
1412 #define DEFAULT_HOMING_ENABLE Off // Default disabled. Set to \ref On or 1 to enable.
1413 #endif
1414 
1422 #if !defined DEFAULT_HOMING_SINGLE_AXIS_COMMANDS || defined __DOXYGEN__
1423 #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS Off // Default disabled. Set to \ref On or 1 to enable.
1424 #endif
1425 
1433 #if !defined DEFAULT_HOMING_INIT_LOCK || defined __DOXYGEN__
1434 #define DEFAULT_HOMING_INIT_LOCK Off // Default disabled. Set to \ref On or 1 to enable.
1435 #endif
1436 
1444 #if !defined DEFAULT_HOMING_FORCE_SET_ORIGIN || defined __DOXYGEN__
1445 #define DEFAULT_HOMING_FORCE_SET_ORIGIN Off // Default disabled. Set to \ref On or 1 to enable.
1446 #endif
1447 
1458 #if !defined DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES || defined __DOXYGEN__
1459 #define DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES Off // Default disabled. Set to \ref On or 1 to enable.
1460 #endif
1462 
1469 #if !defined DEFAULT_HOMING_ALLOW_MANUAL || defined __DOXYGEN__
1470 #define DEFAULT_HOMING_ALLOW_MANUAL Off // Default disabled. Set to \ref On or 1 to enable.
1471 #endif
1472 
1479 #if !defined DEFAULT_HOMING_OVERRIDE_LOCKS || defined __DOXYGEN__
1480 #define DEFAULT_HOMING_OVERRIDE_LOCKS Off // Default disabled. Set to \ref On or 1 to enable.
1481 #endif
1482 
1488 #if !defined DEFAULT_HOMING_USE_LIMIT_SWITCHES || defined __DOXYGEN__
1489 #define DEFAULT_HOMING_USE_LIMIT_SWITCHES Off // Default disabled. Set to \ref On or 1 to enable.
1490 #endif
1492 
1498 #if !defined DEFAULT_HOMING_DIR_MASK || defined __DOXYGEN__
1499 #define DEFAULT_HOMING_DIR_MASK 0
1500 #endif
1502 
1506 #if !defined DEFAULT_HOMING_FEED_RATE || defined __DOXYGEN__
1507 #define DEFAULT_HOMING_FEED_RATE 25.0f // mm/min
1508 #endif
1510 
1514 #if !defined DEFAULT_HOMING_SEEK_RATE || defined __DOXYGEN__
1515 #define DEFAULT_HOMING_SEEK_RATE 500.0f // mm/min
1516 #endif
1518 
1522 #if !defined DEFAULT_HOMING_DEBOUNCE_DELAY || defined __DOXYGEN__
1523 #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
1524 #endif
1526 
1530 #if !defined DEFAULT_HOMING_PULLOFF || defined __DOXYGEN__
1531 #define DEFAULT_HOMING_PULLOFF 1.0f // mm
1532 #endif
1534 
1541 #if !defined DEFAULT_N_HOMING_LOCATE_CYCLE || defined __DOXYGEN__
1542 #define DEFAULT_N_HOMING_LOCATE_CYCLE 1 // Integer (1-127)
1543 #endif
1545 
1567 #if !defined DEFAULT_HOMING_CYCLE_0 || defined __DOXYGEN__
1568 #define DEFAULT_HOMING_CYCLE_0 (Z_AXIS_BIT) // REQUIRED: First move Z to clear workspace.
1569 #endif
1571 
1575 #if !defined DEFAULT_HOMING_CYCLE_1 || defined __DOXYGEN__
1576 #if COREXY
1577 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT) // OPTIONAL: Then move X.
1578 #else
1579 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT|Y_AXIS_BIT) // OPTIONAL: Then move X,Y at the same time.
1580 #endif
1581 #endif
1583 
1587 #if !defined DEFAULT_HOMING_CYCLE_2 || defined __DOXYGEN__
1588 #if COREXY
1589 #define DEFAULT_HOMING_CYCLE_2 (Y_AXIS_BIT) // OPTIONAL: Then move Y.
1590 #else
1591 #define DEFAULT_HOMING_CYCLE_2 0 // OPTIONAL: Uncomment and add axes mask to enable
1592 #endif
1593 #endif
1595 
1599 #if (defined A_AXIS && !defined DEFAULT_HOMING_CYCLE_3) || defined __DOXYGEN__
1600 #define DEFAULT_HOMING_CYCLE_3 0 // OPTIONAL: Uncomment and add axes mask to enable
1601 #endif
1603 
1608 #if (defined B_AXIS && !defined DEFAULT_HOMING_CYCLE_4) || defined __DOXYGEN__
1609 #define DEFAULT_HOMING_CYCLE_4 0 // OPTIONAL: Uncomment and add axes mask to enable
1610 #endif
1612 
1616 #if (defined C_AXIS && !defined DEFAULT_HOMING_CYCLE_5) || defined __DOXYGEN__
1617 #define DEFAULT_HOMING_CYCLE_5 0 // OPTIONAL: Uncomment and add axes mask to enable
1618 #endif
1620 
1629 #if !defined DEFAULT_HOME_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1630 #define DEFAULT_HOME_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
1631 #endif
1633 
1634 
1635 // Probing settings (Group_Probing)
1636 
1640 #if !defined DEFAULT_PROBE_SIGNAL_INVERT || defined __DOXYGEN__
1641 #define DEFAULT_PROBE_SIGNAL_INVERT Off
1642 #endif
1643 #if !defined DEFAULT_TOOLSETTER_SIGNAL_INVERT || defined __DOXYGEN__
1644 #define DEFAULT_TOOLSETTER_SIGNAL_INVERT Off
1645 #endif
1647 
1651 #if !defined DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1652 #define DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP Off
1653 #endif
1654 #if !defined DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1655 #define DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP Off
1656 #endif
1658 
1667 #if !defined DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES || defined __DOXYGEN__
1668 #define DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES Off
1669 #endif
1670 #if !defined DEFAULT_SOFT_LIMIT_PROBE_CYCLES || defined __DOXYGEN__
1671 #define DEFAULT_SOFT_LIMIT_PROBE_CYCLES Off
1672 #endif
1674 
1675 // Safety door/parking settings (Group_SafetyDoor)
1676 
1677 #ifdef DEFAULT_HOMING_ENABLE
1678 
1696 #if !defined DEFAULT_PARKING_ENABLE || defined __DOXYGEN__
1697 #define DEFAULT_PARKING_ENABLE Off // bit 0
1698 // Enables a special set of M-code commands that enables and disables the parking motion.
1699 // These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to disable.
1700 // The command is modal and will be set after a planner sync. Since it is g-code, it is
1701 // executed in sync with g-code commands. It is not a real-time command.
1702 // NOTE: PARKING_ENABLE is required. By default, M56 is active upon initialization. Use
1703 // DEACTIVATE_PARKING_UPON_INIT to set M56 P0 as the power-up default.
1704 #endif
1705 #if !defined DEFAULT_DEACTIVATE_PARKING_UPON_INIT || defined __DOXYGEN__
1706 #define DEFAULT_DEACTIVATE_PARKING_UPON_INIT Off // bit 1
1707 #endif
1708 #if !defined DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL || defined __DOXYGEN__
1709 #define DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL Off // bit 2
1710 #endif
1712 
1717 #if !defined DEFAULT_PARKING_AXIS || defined __DOXYGEN__
1718 #define DEFAULT_PARKING_AXIS Z_AXIS //
1719 #endif
1721 
1725 #if !defined DEFAULT_PARKING_PULLOUT_INCREMENT || defined __DOXYGEN__
1726 #define DEFAULT_PARKING_PULLOUT_INCREMENT 5.0f //
1727 #endif
1729 
1734 #if !defined DEFAULT_PARKING_PULLOUT_RATE || defined __DOXYGEN__
1735 #define DEFAULT_PARKING_PULLOUT_RATE 100.0f // mm/min.
1736 #endif
1738 
1743 #if !defined DEFAULT_PARKING_TARGET || defined __DOXYGEN__
1744 #define DEFAULT_PARKING_TARGET -5.0f // mm
1745 #endif
1747 
1752 #if !defined DEFAULT_PARKING_RATE || defined __DOXYGEN__
1753 #define DEFAULT_PARKING_RATE 500.0f // mm/min
1754 #endif
1756 
1760 
1765 #if !defined DEFAULT_DOOR_IGNORE_WHEN_IDLE || defined __DOXYGEN__
1766 #define DEFAULT_DOOR_IGNORE_WHEN_IDLE Off
1767 #endif
1772 #if !defined DEFAULT_DOOR_KEEP_COOLANT_ON || defined __DOXYGEN__
1773 #define DEFAULT_DOOR_KEEP_COOLANT_ON Off
1774 #endif
1776 
1782 #if !defined DEFAULT_SAFETY_DOOR_SPINDLE_DELAY || defined __DOXYGEN__
1783 #define DEFAULT_SAFETY_DOOR_SPINDLE_DELAY 4.0f // Float (seconds)
1784 #endif
1786 
1793 #if !defined DEFAULT_SAFETY_DOOR_COOLANT_DELAY || defined __DOXYGEN__
1794 #define DEFAULT_SAFETY_DOOR_COOLANT_DELAY 1.0f // Float (seconds)
1795 #endif
1797 
1798 #endif // DEFAULT_HOMING_ENABLE
1799 
1800 // Jogging settings (Group_Jogging)
1801 
1809 #if !defined DEFAULT_JOG_LIMIT_ENABLE || defined __DOXYGEN__
1810 #define DEFAULT_JOG_LIMIT_ENABLE Off
1811 #endif
1813 
1814 // Stepper settings (Group_Stepper)
1815 
1828 #if !defined DEFAULT_STEP_PULSE_MICROSECONDS || defined __DOXYGEN__
1829 #define DEFAULT_STEP_PULSE_MICROSECONDS 10.0f
1830 #endif
1832 
1841 #if !defined DEFAULT_STEPPER_IDLE_LOCK_TIME || defined __DOXYGEN__
1842 #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // milliseconds
1843 #endif
1845 
1851 #if !defined DEFAULT_STEP_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1852 #define DEFAULT_STEP_SIGNALS_INVERT_MASK 0
1853 #endif
1855 
1861 #if !defined DEFAULT_DIR_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1862 #define DEFAULT_DIR_SIGNALS_INVERT_MASK 0
1863 #endif
1865 
1878 #if !defined DEFAULT_ENABLE_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1879 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
1880 #endif
1882 
1888 #if !defined DEFAULT_GANGED_DIRECTION_INVERT_MASK || defined __DOXYGEN__
1889 #define DEFAULT_GANGED_DIRECTION_INVERT_MASK 0
1890 #endif
1892 
1896 #if !defined DEFAULT_STEP_PULSE_DELAY || defined __DOXYGEN__
1897 #define DEFAULT_STEP_PULSE_DELAY 0.0f
1898 #endif
1900 
1907 #if !defined DEFAULT_STEPPER_DEENERGIZE_MASK || defined __DOXYGEN__
1908 #define DEFAULT_STEPPER_DEENERGIZE_MASK 0
1909 #endif
1911 
1918 #if !defined DEFAULT_AXIS_ROTATIONAL_MASK || defined __DOXYGEN__
1919 #define DEFAULT_AXIS_ROTATIONAL_MASK 0
1920 #endif
1922 
1928 #if !defined DEFAULT_MOTOR_WARNING_SIGNALS_ENABLE || defined __DOXYGEN__
1929 #define DEFAULT_MOTOR_WARNING_SIGNALS_ENABLE 0
1930 #endif
1932 
1938 #if !defined DEFAULT_MOTOR_WARNING_SIGNALS_INVERT || defined __DOXYGEN__
1939 #define DEFAULT_MOTOR_WARNING_SIGNALS_INVERT 0
1940 #endif
1942 
1948 #if !defined DEFAULT_MOTOR_FAULT_SIGNALS_ENABLE || defined __DOXYGEN__
1949 #define DEFAULT_MOTOR_FAULT_SIGNALS_ENABLE 0
1950 #endif
1952 
1958 #if !defined DEFAULT_MOTOR_FAULT_SIGNALS_INVERT || defined __DOXYGEN__
1959 #define DEFAULT_MOTOR_FAULT_SIGNALS_INVERT 0
1960 #endif
1962 
1967 #if !defined DEFAULT_AUTOREPORT_INTERVAL || defined __DOXYGEN__
1968 #define DEFAULT_AUTOREPORT_INTERVAL 0
1969 #endif
1971 
1976 #if !defined DEFAULT_TIMEZONE_OFFSET || defined __DOXYGEN__
1977 #define DEFAULT_TIMEZONE_OFFSET 0.0f
1978 #endif
1980 
1986 #if !defined DEFAULT_NO_UNLOCK_AFTER_ESTOP || defined __DOXYGEN__
1987 #define DEFAULT_NO_UNLOCK_AFTER_ESTOP Off
1988 #endif
1990 
1995 #if !defined DEFAULT_RGB_STRIP0_LENGTH || defined __DOXYGEN__
1996 #define DEFAULT_RGB_STRIP0_LENGTH 0
1997 #endif
1999 
2004 #if !defined DEFAULT_RGB_STRIP1_LENGTH || defined __DOXYGEN__
2005 #define DEFAULT_RGB_STRIP1_LENGTH 0
2006 #endif
2008 
2016 #if !defined DEFAULT_AXIS_ROTARY_WRAP_MASK || defined __DOXYGEN__
2017 #define DEFAULT_AXIS_ROTARY_WRAP_MASK 0
2018 #endif
2020 
2021 // Axis settings (Group_XAxis - Group_VAxis)
2022 
2027 #if !defined DEFAULT_X_STEPS_PER_MM || defined __DOXYGEN__
2028 #define DEFAULT_X_STEPS_PER_MM 250.0f
2029 #endif
2030 #if !defined DEFAULT_Y_STEPS_PER_MM || defined __DOXYGEN__
2031 #define DEFAULT_Y_STEPS_PER_MM 250.0f
2032 #endif
2033 #if !defined DEFAULT_Z_STEPS_PER_MM || defined __DOXYGEN__
2034 #define DEFAULT_Z_STEPS_PER_MM 250.0f
2035 #endif
2036 #if (defined A_AXIS && !defined DEFAULT_A_STEPS_PER_MM) || defined __DOXYGEN__
2037 #define DEFAULT_A_STEPS_PER_MM 250.0f
2038 #endif
2039 #if (defined B_AXIS && !defined DEFAULT_B_STEPS_PER_MM) || defined __DOXYGEN__
2040 #define DEFAULT_B_STEPS_PER_MM 250.0f
2041 #endif
2042 #if (defined C_AXIS && !defined DEFAULT_C_STEPS_PER_MM) || defined __DOXYGEN__
2043 #define DEFAULT_C_STEPS_PER_MM 250.0f
2044 #endif
2045 #if (defined U_AXIS && !defined DEFAULT_U_STEPS_PER_MM) || defined __DOXYGEN__
2046 #define DEFAULT_U_STEPS_PER_MM 250.0f
2047 #endif
2048 #if (defined V_AXIS && !defined DEFAULT_V_STEPS_PER_MM) || defined __DOXYGEN__
2049 #define DEFAULT_V_STEPS_PER_MM 250.0f
2050 #endif
2052 
2057 #if !defined DEFAULT_X_MAX_RATE || defined __DOXYGEN__
2058 #define DEFAULT_X_MAX_RATE 500.0f // mm/min
2059 #endif
2060 #if !defined DEFAULT_Y_MAX_RATE || defined __DOXYGEN__
2061 #define DEFAULT_Y_MAX_RATE 500.0f // mm/min
2062 #endif
2063 #if !defined DEFAULT_Z_MAX_RATE || defined __DOXYGEN__
2064 #define DEFAULT_Z_MAX_RATE 500.0f // mm/min
2065 #endif
2066 #if (defined A_AXIS && !defined DEFAULT_A_MAX_RATE) || defined __DOXYGEN__
2067 #define DEFAULT_A_MAX_RATE 500.0f // mm/min
2068 #endif
2069 #if (defined B_AXIS && !defined DEFAULT_B_MAX_RATE) || defined __DOXYGEN__
2070 #define DEFAULT_B_MAX_RATE 500.0f // mm/min
2071 #endif
2072 #if (defined C_AXIS && !defined DEFAULT_C_MAX_RATE) || defined __DOXYGEN__
2073 #define DEFAULT_C_MAX_RATE 500.0f // mm/min
2074 #endif
2075 #if (defined U_AXIS && !defined DEFAULT_U_MAX_RATE) || defined __DOXYGEN__
2076 #define DEFAULT_U_MAX_RATE 500.0f // mm/min
2077 #endif
2078 #if (defined V_AXIS && !defined DEFAULT_V_MAX_RATE) || defined __DOXYGEN__
2079 #define DEFAULT_V_MAX_RATE 500.0f // mm/min
2080 #endif
2082 
2086 #if !defined DEFAULT_X_ACCELERATION || defined __DOXYGEN__
2087 #define DEFAULT_X_ACCELERATION 10.0f // mm/sec^2
2088 #endif
2089 #if !defined DEFAULT_Y_ACCELERATION || defined __DOXYGEN__
2090 #define DEFAULT_Y_ACCELERATION 10.0f // mm/sec^2
2091 #endif
2092 #if !defined DEFAULT_Z_ACCELERATION || defined __DOXYGEN__
2093 #define DEFAULT_Z_ACCELERATION 10.0f // mm/sec^2
2094 #endif
2095 #if (defined A_AXIS && !defined DEFAULT_A_ACCELERATION) || defined __DOXYGEN__
2096 #define DEFAULT_A_ACCELERATION 10.0f // mm/sec^2
2097 #endif
2098 #if (defined B_AXIS && !defined DEFAULT_B_ACCELERATION) || defined __DOXYGEN__
2099 #define DEFAULT_B_ACCELERATION 10.0f // mm/sec^2
2100 #endif
2101 #if (defined C_AXIS && !defined DEFAULT_C_ACCELERATION) || defined __DOXYGEN__
2102 #define DEFAULT_C_ACCELERATION 10.0f // mm/sec^2
2103 #endif
2104 #if (defined U_AXIS && !defined DEFAULT_U_ACCELERATION) || defined __DOXYGEN__
2105 #define DEFAULT_U_ACCELERATION 10.0f // mm/sec^2
2106 #endif
2107 #if (defined V_AXIS && !defined DEFAULT_V_ACCELERATION) || defined __DOXYGEN__
2108 #define DEFAULT_V_ACCELERATION 10.0f // mm/sec^2
2109 #endif
2111 
2115 #if !defined DEFAULT_X_JERK|| defined __DOXYGEN__
2116 #define DEFAULT_X_JERK 100.0f // mm/sec^3
2117 #endif
2118 #if !defined DEFAULT_Y_JERK|| defined __DOXYGEN__
2119 #define DEFAULT_Y_JERK 100.0f // mm/sec^3
2120 #endif
2121 #if !defined DEFAULT_Z_JERK || defined __DOXYGEN__
2122 #define DEFAULT_Z_JERK 100.0f // mm/sec^3
2123 #endif
2124 #if (defined A_AXIS && !defined DEFAULT_A_JERK) || defined __DOXYGEN__
2125 #define DEFAULT_A_JERK 100.0f // mm/sec^3
2126 #endif
2127 #if (defined B_AXIS && !defined DEFAULT_B_JERK) || defined __DOXYGEN__
2128 #define DEFAULT_B_JERK 100.0f // mm/sec^3
2129 #endif
2130 #if (defined C_AXIS && !defined DEFAULT_C_JERK) || defined __DOXYGEN__
2131 #define DEFAULT_C_JERK 100.0f // mm/sec^3
2132 #endif
2133 #if (defined U_AXIS && !defined DEFAULT_U_JERK) || defined __DOXYGEN__
2134 #define DEFAULT_U_JERK 100.0f // mm/sec^3
2135 #endif
2136 #if (defined V_AXIS && !defined DEFAULT_V_JERK) || defined __DOXYGEN__
2137 #define DEFAULT_V_JERK 100.0f // mm/sec^3
2138 #endif
2140 
2145 #if !defined DEFAULT_X_MAX_TRAVEL || defined __DOXYGEN__
2146 #define DEFAULT_X_MAX_TRAVEL 200.0f // mm
2147 #endif
2148 #if !defined DEFAULT_Y_MAX_TRAVEL || defined __DOXYGEN__
2149 #define DEFAULT_Y_MAX_TRAVEL 200.0f // mm
2150 #endif
2151 #if !defined DEFAULT_Z_MAX_TRAVEL || defined __DOXYGEN__
2152 #define DEFAULT_Z_MAX_TRAVEL 200.0f // mm
2153 #endif
2154 #if (defined A_AXIS && !defined DEFAULT_A_MAX_TRAVEL) || defined __DOXYGEN__
2155 #define DEFAULT_A_MAX_TRAVEL 200.0f // mm
2156 #endif
2157 #if (defined B_AXIS && !defined DEFAULT_B_MAX_TRAVEL) || defined __DOXYGEN__
2158 #define DEFAULT_B_MAX_TRAVEL 200.0f // mm
2159 #endif
2160 #if (defined C_AXIS && !defined DEFAULT_C_MAX_TRAVEL) || defined __DOXYGEN__
2161 #define DEFAULT_C_MAX_TRAVEL 200.0f // mm
2162 #endif
2163 #if (defined U_AXIS && !defined DEFAULT_U_MAX_TRAVEL) || defined __DOXYGEN__
2164 #define DEFAULT_U_MAX_TRAVEL 200.0f // mm
2165 #endif
2166 #if (defined V_AXIS && !defined DEFAULT_V_MAX_TRAVEL) || defined __DOXYGEN__
2167 #define DEFAULT_V_MAX_TRAVEL 200.0f // mm
2168 #endif
2170 
2175 #if !defined DEFAULT_X_CURRENT || defined __DOXYGEN__
2176 #define DEFAULT_X_CURRENT 500.0f // mA RMS
2177 #endif
2178 #if !defined DEFAULT_Y_CURRENT || defined __DOXYGEN__
2179 #define DEFAULT_Y_CURRENT 500.0f // mA RMS
2180 #endif
2181 #if !defined DEFAULT_Z_CURRENT || defined __DOXYGEN__
2182 #define DEFAULT_Z_CURRENT 500.0f // mA RMS
2183 #endif
2184 #if (defined A_AXIS && !defined DEFAULT_A_CURRENT) || defined __DOXYGEN__
2185 #define DEFAULT_A_CURRENT 500.0f // mA RMS
2186 #endif
2187 #if (defined B_AXIS && !defined DEFAULT_B_CURRENT) || defined __DOXYGEN__
2188 #define DEFAULT_B_CURRENT 500.0f // mA RMS
2189 #endif
2190 #if (defined C_AXIS && !defined DEFAULT_C_CURRENT) || defined __DOXYGEN__
2191 #define DEFAULT_C_CURRENT 500.0f // mA RMS
2192 #endif
2193 #if (defined U_AXIS && !defined DEFAULT_U_CURRENT) || defined __DOXYGEN__
2194 #define DEFAULT_U_CURRENT 500.0f // mA RMS
2195 #endif
2196 #if (defined V_AXIS && !defined DEFAULT_V_CURRENT) || defined __DOXYGEN__
2197 #define DEFAULT_V_CURRENT 500.0f // mA RMS
2198 #endif
2200 
2201 // Sanity checks
2202 
2203 // N_TOOLS may have been defined on the compiler command line.
2204 #if defined(N_TOOLS) && N_TOOLS == 0
2205 #undef N_TOOLS
2206 #endif
2207 
2208 #if defined(N_TOOLS) && N_TOOLS > 32
2209 #undef N_TOOLS
2210 #define N_TOOLS 32
2211 #endif
2212 
2213 #if N_SYS_SPINDLE > N_SPINDLE
2214 #undef N_SYS_SPINDLE
2215 #define N_SYS_SPINDLE N_SPINDLE
2216 #endif
2217 
2218 #if N_SYS_SPINDLE < 1
2219 #undef N_SYS_SPINDLE
2220 #define N_SYS_SPINDLE 1
2221 #endif
2222 
2223 #if N_SYS_SPINDLE > 8
2224 #undef N_SYS_SPINDLE
2225 #define N_SYS_SPINDLE 8
2226 #endif
2227 
2228 #if NGC_EXPRESSIONS_ENABLE && !NGC_PARAMETERS_ENABLE
2229 #undef NGC_PARAMETERS_ENABLE
2230 #define NGC_PARAMETERS_ENABLE On
2231 #endif
2232 
2233 #if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
2234  #error "WCO busy refresh is less than idle refresh."
2235 #endif
2236 #if (REPORT_OVERRIDE_REFRESH_BUSY_COUNT < REPORT_OVERRIDE_REFRESH_IDLE_COUNT)
2237  #error "Override busy refresh is less than idle refresh."
2238 #endif
2239 #if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
2240  #error "WCO refresh must be greater than one."
2241 #endif
2242 #if (REPORT_OVERRIDE_REFRESH_IDLE_COUNT < 1)
2243  #error "Override refresh must be greater than zero."
2244 #endif
2245 
2246 #if DEFAULT_LASER_MODE && DEFAULT_LATHE_MODE
2247 #error "Cannot enable laser and lathe mode at the same time!"
2248 #endif
2249 
2250 #if LATHE_UVW_OPTION && (N_AXIS > 6 || AXIS_REMAP_ABC2UVW)
2251 #warning "Cannot enable lathe UVW option when N_AXIS > 6 or ABC words are remapped!"
2252 #undef LATHE_UVW_OPTION
2253 #define LATHE_UVW_OPTION Off
2254 #endif
2255 
2256 #if DEFAULT_CONTROL_SIGNALS_INVERT_MASK < 0
2257 #undef DEFAULT_CONTROL_SIGNALS_INVERT_MASK
2258 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK SIGNALS_BITMASK
2259 #endif
2260 
2261 #if DEFAULT_LIMIT_SIGNALS_INVERT_MASK < 0
2262 #undef DEFAULT_LIMIT_SIGNALS_INVERT_MASK
2263 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK AXES_BITMASK
2264 #endif
2265 
2266 #if DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK < 0
2267 #undef DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK
2268 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK AXES_BITMASK
2269 #endif
2270 
2271 #if DEFAULT_STEP_SIGNALS_INVERT_MASK < 0
2272 #undef DEFAULT_STEP_SIGNALS_INVERT_MASK
2273 #define DEFAULT_STEP_SIGNALS_INVERT_MASK AXES_BITMASK
2274 #endif
2275 
2276 #if DEFAULT_ENABLE_SIGNALS_INVERT_MASK < 0
2277 #undef DEFAULT_ENABLE_SIGNALS_INVERT_MASK
2278 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
2279 #endif
2280 
2281 #if DEFAULT_SPINDLE_ON_DELAY
2282 #if DEFAULT_SPINDLE_ON_DELAY < 500
2283 #undef DEFAULT_SPINDLE_ON_DELAY
2284 #define DEFAULT_SPINDLE_ON_DELAY 500
2285 #elif DEFAULT_SPINDLE_ON_DELAY > 20000
2286 #undef DEFAULT_SPINDLE_ON_DELAY
2287 #define DEFAULT_SPINDLE_ON_DELAY 20000
2288 #endif
2289 #endif
2290 
2291 #if DEFAULT_COOLANT_ON_DELAY
2292 #if DEFAULT_COOLANT_ON_DELAY < 500
2293 #undef DEFAULT_COOLANT_ON_DELAY
2294 #define DEFAULT_COOLANT_ON_DELAY 500
2295 #elif DEFAULT_COOLANT_ON_DELAY > 20000
2296 #undef DEFAULT_COOLANT_ON_DELAY
2297 #define DEFAULT_COOLANT_ON_DELAY 20000
2298 #endif
2299 #endif
2300 
2301 #if DEFAULT_PARKING_ENABLE > 0
2302  #if DEFAULT_HOMING_FORCE_SET_ORIGIN > 0
2303  #error "DEFAULT_HOMING_FORCE_SET_ORIGIN is not supported with DEFAULT_PARKING_ENABLE at this time."
2304  #endif
2305 #endif
2306 
2307 #if DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL > 0
2308  #if DEFAULT_PARKING_ENABLE < 1
2309  #error "DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL must be enabled with DEFAULT_PARKING_ENABLE."
2310  #endif
2311 #endif
2312 
2367 #endif // _GRBL_CONFIG_H_