grblHAL core  20250104
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 Off
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 
867 // Control signals settings (Group_ControlSignals)
868 
869 #ifndef __DOXYGEN__ // For now do not include in documentation
870 
876 #define SIGNALS_RESET_BIT (1<<0)
877 #define SIGNALS_FEEDHOLD_BIT (1<<1)
878 #define SIGNALS_CYCLESTART_BIT (1<<2)
879 #define SIGNALS_SAFETYDOOR_BIT (1<<3)
880 #define SIGNALS_BLOCKDELETE_BIT (1<<4)
881 #define SIGNALS_STOPDISABLE_BIT (1<<5)
882 #define SIGNALS_ESTOP_BIT (1<<6)
883 #define SIGNALS_PROBE_CONNECTED_BIT (1<<7)
884 #define SIGNALS_MOTOR_FAULT_BIT (1<<8)
885 #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)
887 
888 #endif
889 
896 #if !defined DEFAULT_CONTROL_SIGNALS_INVERT_MASK || defined __DOXYGEN__
897 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
898 #endif
900 
915 #if !defined DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK || defined __DOXYGEN__
916 #define DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
917 #endif
919 
920 // Limits settings (Group_Limits)
921 
930 #if !defined DEFAULT_LIMIT_SIGNALS_INVERT_MASK || defined __DOXYGEN__
931 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
932 #endif
934 
942 #if !defined DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK || defined __DOXYGEN__
943 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK 0 // Set to -1 or AXES_BITMASK to disable pullup for all axes
944 #endif
946 
950 #if !defined DEFAULT_SOFT_LIMIT_ENABLE || defined __DOXYGEN__
951 #define DEFAULT_SOFT_LIMIT_ENABLE Off
952 #endif
954 
958 
965 #if !defined DEFAULT_HARD_LIMIT_ENABLE || defined __DOXYGEN__
966 #define DEFAULT_HARD_LIMIT_ENABLE Off
967 #endif
968 #if !defined DEFAULT_CHECK_LIMITS_AT_INIT || defined __DOXYGEN__
969 #define DEFAULT_CHECK_LIMITS_AT_INIT Off
970 #endif
971 #if !defined DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY || defined __DOXYGEN__
972 #define DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY Off
973 #endif
974 
987 
990 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT || defined __DOXYGEN__
991 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT 5.0f // Float (percent)
992 #endif
994 
998 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN || defined __DOXYGEN__
999 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN 2.5f // Float (mm)
1000 #endif
1002 
1007 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX || defined __DOXYGEN__
1008 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX 25.0f // Float (mm)
1009 #endif
1011 
1012 // Coolant settings (Group_Coolant)
1013 
1019 #if !defined DEFAULT_INVERT_COOLANT_FLOOD_PIN || defined __DOXYGEN__
1020 #define DEFAULT_INVERT_COOLANT_FLOOD_PIN Off
1021 #endif
1022 #if !defined DEFAULT_INVERT_COOLANT_MIST_PIN || defined __DOXYGEN__
1023 #define DEFAULT_INVERT_COOLANT_MIST_PIN Off // NOTE: not supported by all drivers.
1024 #endif
1026 
1030 #if !defined DEFAULT_COOLANT_ON_DELAY || defined __DOXYGEN__
1031 #define DEFAULT_COOLANT_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1032 #endif
1034 
1035 // Spindle settings (Group_Spindle)
1036 
1040 #if !defined DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED || defined __DOXYGEN__
1041 #define DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED Off
1042 #endif
1043 #if !defined DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE || defined __DOXYGEN__
1044 #define DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE Off
1045 #endif
1047 
1052 #if !defined DEFAULT_INVERT_SPINDLE_ENABLE_PIN || defined __DOXYGEN__
1053 #define DEFAULT_INVERT_SPINDLE_ENABLE_PIN Off
1054 #endif
1055 #if !defined DEFAULT_INVERT_SPINDLE_CCW_PIN || defined __DOXYGEN__
1056 #define DEFAULT_INVERT_SPINDLE_CCW_PIN Off // NOTE: not supported by all drivers.
1057 #endif
1058 #if !defined DEFAULT_INVERT_SPINDLE_PWM_PIN || defined __DOXYGEN__
1059 #define DEFAULT_INVERT_SPINDLE_PWM_PIN Off // NOTE: not supported by all drivers.
1060 #endif
1062 
1066 #if !defined DEFAULT_SPINDLE_RPM_MAX || defined __DOXYGEN__
1067 #define DEFAULT_SPINDLE_RPM_MAX 1000.0f // rpm
1068 #endif
1070 
1074 #if !defined DEFAULT_SPINDLE_RPM_MIN || defined __DOXYGEN__
1075 #define DEFAULT_SPINDLE_RPM_MIN 0.0f // rpm
1076 #endif
1078 
1082 #if !defined DEFAULT_SPINDLE_PWM_FREQ || defined __DOXYGEN__
1083 #define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
1084 #endif
1086 
1090 #if !defined DEFAULT_SPINDLE_PWM_OFF_VALUE || defined __DOXYGEN__
1091 #define DEFAULT_SPINDLE_PWM_OFF_VALUE 0.0f // Percent
1092 #endif
1094 
1107 #if !defined DEFAULT_SPINDLE_PWM_MIN_VALUE || defined __DOXYGEN__
1108 #define DEFAULT_SPINDLE_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1109 #endif
1111 
1115 #if !defined DEFAULT_SPINDLE_PWM_MAX_VALUE || defined __DOXYGEN__
1116 #define DEFAULT_SPINDLE_PWM_MAX_VALUE 100.0f // Percent
1117 #endif
1119 
1128 #if !defined DEFAULT_SPINDLE_PPR || defined __DOXYGEN__
1129 #define DEFAULT_SPINDLE_PPR 0 // Pulses per revolution.
1130 #endif
1132 
1136 #if !defined DEFAULT_SPINDLE_AT_SPEED_TOLERANCE || defined __DOXYGEN__
1137 #define DEFAULT_SPINDLE_AT_SPEED_TOLERANCE 0.0f // Percent - 0 means not checked
1138 #endif
1140 
1144 #if !defined DEFAULT_SPINDLE_ON_DELAY || defined __DOXYGEN__
1145 #define DEFAULT_SPINDLE_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1146 #endif
1148 
1152 #if !defined DEFAULT_SPINDLE || defined __DOXYGEN__
1153 #define DEFAULT_SPINDLE SPINDLE_PWM0 // Spindle number from spindle_control.h
1154 #endif
1156 
1157 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1158 
1159 // $9 - Setting_SpindlePWMOptions
1160 // bit 0
1161 // always defaults to on
1162 // bit 1
1163 
1164 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1165 
1166 #ifndef DEFAULT_SPINDLE_P_GAIN
1167 #define DEFAULT_SPINDLE_P_GAIN 1.0f
1168 #endif
1169 #ifndef DEFAULT_SPINDLE_I_GAIN
1170 #define DEFAULT_SPINDLE_I_GAIN 0.01f
1171 #endif
1172 #ifndef DEFAULT_SPINDLE_D_GAIN
1173 #define DEFAULT_SPINDLE_D_GAIN 0.0f
1174 #endif
1175 #ifndef DEFAULT_SPINDLE_I_MAX
1176 #define DEFAULT_SPINDLE_I_MAX 10.0f
1177 #endif
1178 
1179 #if ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
1180 
1185 #if !defined DEFAULT_RPM_POINT01 || defined __DOXYGEN__
1186 #define DEFAULT_RPM_POINT01 NAN // DEFAULT_SPINDLE_RPM_MIN // Replace NAN with DEFAULT_SPINDLE_RPM_MIN to enable.
1187 #endif
1188 #if !defined DEFAULT_RPM_LINE_A1 || defined __DOXYGEN__
1189 #define DEFAULT_RPM_LINE_A1 3.197101e-03f
1190 #endif
1191 #if !defined DEFAULT_RPM_LINE_B1 || defined __DOXYGEN__
1192 #define DEFAULT_RPM_LINE_B1 -3.526076e-1f
1193 #endif
1195 
1200 #if !defined DEFAULT_RPM_POINT12 || defined __DOXYGEN__
1201 #define DEFAULT_RPM_POINT12 NAN // Change NAN to a float constant to enable.
1202 #endif
1203 #if !defined DEFAULT_RPM_LINE_A2 || defined __DOXYGEN__
1204 #define DEFAULT_RPM_LINE_A2 1.722950e-2f
1205 #endif
1206 #if !defined DEFAULT_RPM_LINE_B2 || defined __DOXYGEN__
1207 #define DEFAULT_RPM_LINE_B2 1.0f,
1208 #endif
1210 
1215 #if !defined DEFAULT_RPM_POINT23 || defined __DOXYGEN__
1216 #define DEFAULT_RPM_POINT23 NAN // Change NAN to a float constant to enable.
1217 #endif
1218 #if !defined DEFAULT_RPM_LINE_A3 || defined __DOXYGEN__
1219 #define DEFAULT_RPM_LINE_A3 5.901518e-02f
1220 #endif
1221 #if !defined DEFAULT_RPM_LINE_B3 || defined __DOXYGEN__
1222 #define DEFAULT_RPM_LINE_B3 4.881851e+02f
1223 #endif
1225 
1230 #if !defined DEFAULT_RPM_POINT34 || defined __DOXYGEN__
1231 #define DEFAULT_RPM_POINT34 NAN // Change NAN to a float constant to enable.
1232 #endif
1233 #if !defined DEFAULT_RPM_LINE_A4 || defined __DOXYGEN__
1234 #define DEFAULT_RPM_LINE_A4 1.203413e-01f
1235 #endif
1236 #if !defined DEFAULT_RPM_LINE_B4 || defined __DOXYGEN__
1237 #define DEFAULT_RPM_LINE_B4 1.151360e+03f
1238 #endif
1240 
1241 #endif // ENABLE_SPINDLE_LINEARIZATION
1242 
1243 // Settings for second PWM spindle
1244 
1249 #if !defined DEFAULT_INVERT_SPINDLE1_ENABLE_PIN || defined __DOXYGEN__
1250 #define DEFAULT_INVERT_SPINDLE1_ENABLE_PIN Off
1251 #endif
1252 #if !defined DEFAULT_INVERT_SPINDLE1_CCW_PIN || defined __DOXYGEN__
1253 #define DEFAULT_INVERT_SPINDLE1_CCW_PIN Off // NOTE: not supported by all drivers.
1254 #endif
1255 #if !defined DEFAULT_INVERT_SPINDLE1_PWM_PIN || defined __DOXYGEN__
1256 #define DEFAULT_INVERT_SPINDLE1_PWM_PIN Off // NOTE: not supported by all drivers.
1257 #endif
1259 
1263 #if !defined DEFAULT_SPINDLE1_RPM_MAX || defined __DOXYGEN__
1264 #define DEFAULT_SPINDLE1_RPM_MAX 1000.0f // rpm
1265 #endif
1267 
1271 #if !defined DEFAULT_SPINDLE1_RPM_MIN || defined __DOXYGEN__
1272 #define DEFAULT_SPINDLE1_RPM_MIN 0.0f // rpm
1273 #endif
1275 
1279 #if !defined DEFAULT_SPINDLE1_PWM_FREQ || defined __DOXYGEN__
1280 #define DEFAULT_SPINDLE1_PWM_FREQ 5000 // Hz
1281 #endif
1283 
1287 #if !defined DEFAULT_SPINDLE1_PWM_OFF_VALUE || defined __DOXYGEN__
1288 #define DEFAULT_SPINDLE1_PWM_OFF_VALUE 0.0f // Percent
1289 #endif
1291 
1304 #if !defined DEFAULT_SPINDLE1_PWM_MIN_VALUE || defined __DOXYGEN__
1305 #define DEFAULT_SPINDLE1_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1306 #endif
1308 
1312 #if !defined DEFAULT_SPINDLE1_PWM_MAX_VALUE || defined __DOXYGEN__
1313 #define DEFAULT_SPINDLE1_PWM_MAX_VALUE 100.0f // Percent
1314 #endif
1316 
1317 
1318 // Tool change settings (Group_Toolchange)
1319 
1324 #if !defined DEFAULT_TOOLCHANGE_MODE || defined __DOXYGEN__
1325 #define DEFAULT_TOOLCHANGE_MODE 0
1326 #endif
1328 
1332 #if !defined DEFAULT_TOOLCHANGE_PROBING_DISTANCE || defined __DOXYGEN__
1333 #define DEFAULT_TOOLCHANGE_PROBING_DISTANCE 30 // max probing distance in mm for mode 3
1334 #endif
1336 
1340 #if !defined DEFAULT_TOOLCHANGE_FEED_RATE || defined __DOXYGEN__
1341 #define DEFAULT_TOOLCHANGE_FEED_RATE 25.0f // mm/min
1342 #endif
1344 
1349 #if !defined DEFAULT_TOOLCHANGE_SEEK_RATE || defined __DOXYGEN__
1350 #define DEFAULT_TOOLCHANGE_SEEK_RATE 200.0f // mm/min
1351 #endif
1353 
1357 #if !defined DEFAULT_TOOLCHANGE_PULLOFF_RATE || defined __DOXYGEN__
1358 #define DEFAULT_TOOLCHANGE_PULLOFF_RATE 200.0f // mm/min
1359 #endif
1361 
1365 #if !defined DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION || defined __DOXYGEN__
1366 #define DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION Off
1367 #endif
1369 
1370 // Homing settings (Group_Homing)
1371 
1378 #if !defined DEFAULT_HOMING_ENABLE || defined __DOXYGEN__
1379 #define DEFAULT_HOMING_ENABLE Off // Default disabled. Set to \ref On or 1 to enable.
1380 #endif
1381 
1389 #if !defined DEFAULT_HOMING_SINGLE_AXIS_COMMANDS || defined __DOXYGEN__
1390 #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS Off // Default disabled. Set to \ref On or 1 to enable.
1391 #endif
1392 
1400 #if !defined DEFAULT_HOMING_INIT_LOCK || defined __DOXYGEN__
1401 #define DEFAULT_HOMING_INIT_LOCK Off // Default disabled. Set to \ref On or 1 to enable.
1402 #endif
1403 
1411 #if !defined DEFAULT_HOMING_FORCE_SET_ORIGIN || defined __DOXYGEN__
1412 #define DEFAULT_HOMING_FORCE_SET_ORIGIN Off // Default disabled. Set to \ref On or 1 to enable.
1413 #endif
1414 
1425 #if !defined DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES || defined __DOXYGEN__
1426 #define DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES Off // Default disabled. Set to \ref On or 1 to enable.
1427 #endif
1429 
1436 #if !defined DEFAULT_HOMING_ALLOW_MANUAL || defined __DOXYGEN__
1437 #define DEFAULT_HOMING_ALLOW_MANUAL Off // Default disabled. Set to \ref On or 1 to enable.
1438 #endif
1439 
1446 #if !defined DEFAULT_HOMING_OVERRIDE_LOCKS || defined __DOXYGEN__
1447 #define DEFAULT_HOMING_OVERRIDE_LOCKS Off // Default disabled. Set to \ref On or 1 to enable.
1448 #endif
1449 
1456 #if !defined DEFAULT_HOMING_KEEP_STATUS_ON_RESET || defined __DOXYGEN__
1457 #define DEFAULT_HOMING_KEEP_STATUS_ON_RESET Off // Default disabled. Set to \ref On or 1 to enable.
1458 #endif
1460 
1466 #if !defined DEFAULT_HOMING_USE_LIMIT_SWITCHES || defined __DOXYGEN__
1467 #define DEFAULT_HOMING_USE_LIMIT_SWITCHES Off // Default disabled. Set to \ref On or 1 to enable.
1468 #endif
1470 
1476 #if !defined DEFAULT_HOMING_DIR_MASK || defined __DOXYGEN__
1477 #define DEFAULT_HOMING_DIR_MASK 0
1478 #endif
1480 
1484 #if !defined DEFAULT_HOMING_FEED_RATE || defined __DOXYGEN__
1485 #define DEFAULT_HOMING_FEED_RATE 25.0f // mm/min
1486 #endif
1488 
1492 #if !defined DEFAULT_HOMING_SEEK_RATE || defined __DOXYGEN__
1493 #define DEFAULT_HOMING_SEEK_RATE 500.0f // mm/min
1494 #endif
1496 
1500 #if !defined DEFAULT_HOMING_DEBOUNCE_DELAY || defined __DOXYGEN__
1501 #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
1502 #endif
1504 
1508 #if !defined DEFAULT_HOMING_PULLOFF || defined __DOXYGEN__
1509 #define DEFAULT_HOMING_PULLOFF 1.0f // mm
1510 #endif
1512 
1519 #if !defined DEFAULT_N_HOMING_LOCATE_CYCLE || defined __DOXYGEN__
1520 #define DEFAULT_N_HOMING_LOCATE_CYCLE 1 // Integer (1-127)
1521 #endif
1523 
1545 #if !defined DEFAULT_HOMING_CYCLE_0 || defined __DOXYGEN__
1546 #define DEFAULT_HOMING_CYCLE_0 (Z_AXIS_BIT) // REQUIRED: First move Z to clear workspace.
1547 #endif
1549 
1553 #if !defined DEFAULT_HOMING_CYCLE_1 || defined __DOXYGEN__
1554 #if COREXY
1555 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT) // OPTIONAL: Then move X.
1556 #else
1557 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT|Y_AXIS_BIT) // OPTIONAL: Then move X,Y at the same time.
1558 #endif
1559 #endif
1561 
1565 #if !defined DEFAULT_HOMING_CYCLE_2 || defined __DOXYGEN__
1566 #if COREXY
1567 #define DEFAULT_HOMING_CYCLE_2 (Y_AXIS_BIT) // OPTIONAL: Then move Y.
1568 #else
1569 #define DEFAULT_HOMING_CYCLE_2 0 // OPTIONAL: Uncomment and add axes mask to enable
1570 #endif
1571 #endif
1573 
1577 #if (defined A_AXIS && !defined DEFAULT_HOMING_CYCLE_3) || defined __DOXYGEN__
1578 #define DEFAULT_HOMING_CYCLE_3 0 // OPTIONAL: Uncomment and add axes mask to enable
1579 #endif
1581 
1586 #if (defined B_AXIS && !defined DEFAULT_HOMING_CYCLE_4) || defined __DOXYGEN__
1587 #define DEFAULT_HOMING_CYCLE_4 0 // OPTIONAL: Uncomment and add axes mask to enable
1588 #endif
1590 
1594 #if (defined C_AXIS && !defined DEFAULT_HOMING_CYCLE_5) || defined __DOXYGEN__
1595 #define DEFAULT_HOMING_CYCLE_5 0 // OPTIONAL: Uncomment and add axes mask to enable
1596 #endif
1598 
1607 #if !defined DEFAULT_HOME_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1608 #define DEFAULT_HOME_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
1609 #endif
1611 
1612 
1613 // Probing settings (Group_Probing)
1614 
1618 #if !defined DEFAULT_PROBE_SIGNAL_INVERT || defined __DOXYGEN__
1619 #define DEFAULT_PROBE_SIGNAL_INVERT Off
1620 #endif
1621 #if !defined DEFAULT_TOOLSETTER_SIGNAL_INVERT || defined __DOXYGEN__
1622 #define DEFAULT_TOOLSETTER_SIGNAL_INVERT Off
1623 #endif
1625 
1629 #if !defined DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1630 #define DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP Off
1631 #endif
1632 #if !defined DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1633 #define DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP Off
1634 #endif
1636 
1645 #if !defined DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES || defined __DOXYGEN__
1646 #define DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES Off
1647 #endif
1649 
1650 // Safety door/parking settings (Group_SafetyDoor)
1651 
1652 #ifdef DEFAULT_HOMING_ENABLE
1653 
1671 #if !defined DEFAULT_PARKING_ENABLE || defined __DOXYGEN__
1672 #define DEFAULT_PARKING_ENABLE Off // bit 0
1673 // Enables a special set of M-code commands that enables and disables the parking motion.
1674 // These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to disable.
1675 // The command is modal and will be set after a planner sync. Since it is g-code, it is
1676 // executed in sync with g-code commands. It is not a real-time command.
1677 // NOTE: PARKING_ENABLE is required. By default, M56 is active upon initialization. Use
1678 // DEACTIVATE_PARKING_UPON_INIT to set M56 P0 as the power-up default.
1679 #endif
1680 #if !defined DEFAULT_DEACTIVATE_PARKING_UPON_INIT || defined __DOXYGEN__
1681 #define DEFAULT_DEACTIVATE_PARKING_UPON_INIT Off // bit 1
1682 #endif
1683 #if !defined DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL || defined __DOXYGEN__
1684 #define DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL Off // bit 2
1685 #endif
1687 
1692 #if !defined DEFAULT_PARKING_AXIS || defined __DOXYGEN__
1693 #define DEFAULT_PARKING_AXIS Z_AXIS //
1694 #endif
1696 
1700 #if !defined DEFAULT_PARKING_PULLOUT_INCREMENT || defined __DOXYGEN__
1701 #define DEFAULT_PARKING_PULLOUT_INCREMENT 5.0f //
1702 #endif
1704 
1709 #if !defined DEFAULT_PARKING_PULLOUT_RATE || defined __DOXYGEN__
1710 #define DEFAULT_PARKING_PULLOUT_RATE 100.0f // mm/min.
1711 #endif
1713 
1718 #if !defined DEFAULT_PARKING_TARGET || defined __DOXYGEN__
1719 #define DEFAULT_PARKING_TARGET -5.0f // mm
1720 #endif
1722 
1727 #if !defined DEFAULT_PARKING_RATE || defined __DOXYGEN__
1728 #define DEFAULT_PARKING_RATE 500.0f // mm/min
1729 #endif
1731 
1735 
1740 #if !defined DEFAULT_DOOR_IGNORE_WHEN_IDLE || defined __DOXYGEN__
1741 #define DEFAULT_DOOR_IGNORE_WHEN_IDLE Off
1742 #endif
1747 #if !defined DEFAULT_DOOR_KEEP_COOLANT_ON || defined __DOXYGEN__
1748 #define DEFAULT_DOOR_KEEP_COOLANT_ON Off
1749 #endif
1751 
1757 #if !defined DEFAULT_SAFETY_DOOR_SPINDLE_DELAY || defined __DOXYGEN__
1758 #define DEFAULT_SAFETY_DOOR_SPINDLE_DELAY 4.0f // Float (seconds)
1759 #endif
1761 
1768 #if !defined DEFAULT_SAFETY_DOOR_COOLANT_DELAY || defined __DOXYGEN__
1769 #define DEFAULT_SAFETY_DOOR_COOLANT_DELAY 1.0f // Float (seconds)
1770 #endif
1772 
1773 #endif // DEFAULT_HOMING_ENABLE
1774 
1775 // Jogging settings (Group_Jogging)
1776 
1784 #if !defined DEFAULT_JOG_LIMIT_ENABLE || defined __DOXYGEN__
1785 #define DEFAULT_JOG_LIMIT_ENABLE Off
1786 #endif
1788 
1789 // Stepper settings (Group_Stepper)
1790 
1803 #if !defined DEFAULT_STEP_PULSE_MICROSECONDS || defined __DOXYGEN__
1804 #define DEFAULT_STEP_PULSE_MICROSECONDS 10.0f
1805 #endif
1807 
1816 #if !defined DEFAULT_STEPPER_IDLE_LOCK_TIME || defined __DOXYGEN__
1817 #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // milliseconds
1818 #endif
1820 
1826 #if !defined DEFAULT_STEP_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1827 #define DEFAULT_STEP_SIGNALS_INVERT_MASK 0
1828 #endif
1830 
1836 #if !defined DEFAULT_DIR_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1837 #define DEFAULT_DIR_SIGNALS_INVERT_MASK 0
1838 #endif
1840 
1853 #if !defined DEFAULT_ENABLE_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1854 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
1855 #endif
1857 
1863 #if !defined DEFAULT_GANGED_DIRECTION_INVERT_MASK || defined __DOXYGEN__
1864 #define DEFAULT_GANGED_DIRECTION_INVERT_MASK 0
1865 #endif
1867 
1871 #if !defined DEFAULT_STEP_PULSE_DELAY || defined __DOXYGEN__
1872 #define DEFAULT_STEP_PULSE_DELAY 0.0f
1873 #endif
1875 
1882 #if !defined DEFAULT_STEPPER_DEENERGIZE_MASK || defined __DOXYGEN__
1883 #define DEFAULT_STEPPER_DEENERGIZE_MASK 0
1884 #endif
1886 
1893 #if !defined DEFAULT_AXIS_ROTATIONAL_MASK || defined __DOXYGEN__
1894 #define DEFAULT_AXIS_ROTATIONAL_MASK 0
1895 #endif
1897 
1902 #if !defined DEFAULT_AUTOREPORT_INTERVAL || defined __DOXYGEN__
1903 #define DEFAULT_AUTOREPORT_INTERVAL 0
1904 #endif
1906 
1911 #if !defined DEFAULT_TIMEZONE_OFFSET || defined __DOXYGEN__
1912 #define DEFAULT_TIMEZONE_OFFSET 0.0f
1913 #endif
1915 
1921 #if !defined DEFAULT_NO_UNLOCK_AFTER_ESTOP || defined __DOXYGEN__
1922 #define DEFAULT_NO_UNLOCK_AFTER_ESTOP Off
1923 #endif
1925 
1930 #if !defined DEFAULT_RGB_STRIP0_LENGTH || defined __DOXYGEN__
1931 #define DEFAULT_RGB_STRIP0_LENGTH 0
1932 #endif
1934 
1939 #if !defined DEFAULT_RGB_STRIP1_LENGTH || defined __DOXYGEN__
1940 #define DEFAULT_RGB_STRIP1_LENGTH 0
1941 #endif
1943 
1951 #if !defined DEFAULT_AXIS_ROTARY_WRAP_MASK || defined __DOXYGEN__
1952 #define DEFAULT_AXIS_ROTARY_WRAP_MASK 0
1953 #endif
1955 
1956 // Axis settings (Group_XAxis - Group_VAxis)
1957 
1962 #if !defined DEFAULT_X_STEPS_PER_MM || defined __DOXYGEN__
1963 #define DEFAULT_X_STEPS_PER_MM 250.0f
1964 #endif
1965 #if !defined DEFAULT_Y_STEPS_PER_MM || defined __DOXYGEN__
1966 #define DEFAULT_Y_STEPS_PER_MM 250.0f
1967 #endif
1968 #if !defined DEFAULT_Z_STEPS_PER_MM || defined __DOXYGEN__
1969 #define DEFAULT_Z_STEPS_PER_MM 250.0f
1970 #endif
1971 #if (defined A_AXIS && !defined DEFAULT_A_STEPS_PER_MM) || defined __DOXYGEN__
1972 #define DEFAULT_A_STEPS_PER_MM 250.0f
1973 #endif
1974 #if (defined B_AXIS && !defined DEFAULT_B_STEPS_PER_MM) || defined __DOXYGEN__
1975 #define DEFAULT_B_STEPS_PER_MM 250.0f
1976 #endif
1977 #if (defined C_AXIS && !defined DEFAULT_C_STEPS_PER_MM) || defined __DOXYGEN__
1978 #define DEFAULT_C_STEPS_PER_MM 250.0f
1979 #endif
1980 #if (defined U_AXIS && !defined DEFAULT_U_STEPS_PER_MM) || defined __DOXYGEN__
1981 #define DEFAULT_U_STEPS_PER_MM 250.0f
1982 #endif
1983 #if (defined V_AXIS && !defined DEFAULT_V_STEPS_PER_MM) || defined __DOXYGEN__
1984 #define DEFAULT_V_STEPS_PER_MM 250.0f
1985 #endif
1987 
1992 #if !defined DEFAULT_X_MAX_RATE || defined __DOXYGEN__
1993 #define DEFAULT_X_MAX_RATE 500.0f // mm/min
1994 #endif
1995 #if !defined DEFAULT_Y_MAX_RATE || defined __DOXYGEN__
1996 #define DEFAULT_Y_MAX_RATE 500.0f // mm/min
1997 #endif
1998 #if !defined DEFAULT_Z_MAX_RATE || defined __DOXYGEN__
1999 #define DEFAULT_Z_MAX_RATE 500.0f // mm/min
2000 #endif
2001 #if (defined A_AXIS && !defined DEFAULT_A_MAX_RATE) || defined __DOXYGEN__
2002 #define DEFAULT_A_MAX_RATE 500.0f // mm/min
2003 #endif
2004 #if (defined B_AXIS && !defined DEFAULT_B_MAX_RATE) || defined __DOXYGEN__
2005 #define DEFAULT_B_MAX_RATE 500.0f // mm/min
2006 #endif
2007 #if (defined C_AXIS && !defined DEFAULT_C_MAX_RATE) || defined __DOXYGEN__
2008 #define DEFAULT_C_MAX_RATE 500.0f // mm/min
2009 #endif
2010 #if (defined U_AXIS && !defined DEFAULT_U_MAX_RATE) || defined __DOXYGEN__
2011 #define DEFAULT_U_MAX_RATE 500.0f // mm/min
2012 #endif
2013 #if (defined V_AXIS && !defined DEFAULT_V_MAX_RATE) || defined __DOXYGEN__
2014 #define DEFAULT_V_MAX_RATE 500.0f // mm/min
2015 #endif
2017 
2021 #if !defined DEFAULT_X_ACCELERATION || defined __DOXYGEN__
2022 #define DEFAULT_X_ACCELERATION 10.0f // mm/sec^2
2023 #endif
2024 #if !defined DEFAULT_Y_ACCELERATION || defined __DOXYGEN__
2025 #define DEFAULT_Y_ACCELERATION 10.0f // mm/sec^2
2026 #endif
2027 #if !defined DEFAULT_Z_ACCELERATION || defined __DOXYGEN__
2028 #define DEFAULT_Z_ACCELERATION 10.0f // mm/sec^2
2029 #endif
2030 #if (defined A_AXIS && !defined DEFAULT_A_ACCELERATION) || defined __DOXYGEN__
2031 #define DEFAULT_A_ACCELERATION 10.0f // mm/sec^2
2032 #endif
2033 #if (defined B_AXIS && !defined DEFAULT_B_ACCELERATION) || defined __DOXYGEN__
2034 #define DEFAULT_B_ACCELERATION 10.0f // mm/sec^2
2035 #endif
2036 #if (defined C_AXIS && !defined DEFAULT_C_ACCELERATION) || defined __DOXYGEN__
2037 #define DEFAULT_C_ACCELERATION 10.0f // mm/sec^2
2038 #endif
2039 #if (defined U_AXIS && !defined DEFAULT_U_ACCELERATION) || defined __DOXYGEN__
2040 #define DEFAULT_U_ACCELERATION 10.0f // mm/sec^2
2041 #endif
2042 #if (defined V_AXIS && !defined DEFAULT_V_ACCELERATION) || defined __DOXYGEN__
2043 #define DEFAULT_V_ACCELERATION 10.0f // mm/sec^2
2044 #endif
2046 
2050 #if !defined DEFAULT_X_JERK|| defined __DOXYGEN__
2051 #define DEFAULT_X_JERK 100.0f // mm/sec^3
2052 #endif
2053 #if !defined DEFAULT_Y_JERK|| defined __DOXYGEN__
2054 #define DEFAULT_Y_JERK 100.0f // mm/sec^3
2055 #endif
2056 #if !defined DEFAULT_Z_JERK || defined __DOXYGEN__
2057 #define DEFAULT_Z_JERK 100.0f // mm/sec^3
2058 #endif
2059 #if (defined A_AXIS && !defined DEFAULT_A_JERK) || defined __DOXYGEN__
2060 #define DEFAULT_A_JERK 100.0f // mm/sec^3
2061 #endif
2062 #if (defined B_AXIS && !defined DEFAULT_B_JERK) || defined __DOXYGEN__
2063 #define DEFAULT_B_JERK 100.0f // mm/sec^3
2064 #endif
2065 #if (defined C_AXIS && !defined DEFAULT_C_JERK) || defined __DOXYGEN__
2066 #define DEFAULT_C_JERK 100.0f // mm/sec^3
2067 #endif
2068 #if (defined U_AXIS && !defined DEFAULT_U_JERK) || defined __DOXYGEN__
2069 #define DEFAULT_U_JERK 100.0f // mm/sec^3
2070 #endif
2071 #if (defined V_AXIS && !defined DEFAULT_V_JERK) || defined __DOXYGEN__
2072 #define DEFAULT_V_JERK 100.0f // mm/sec^3
2073 #endif
2075 
2080 #if !defined DEFAULT_X_MAX_TRAVEL || defined __DOXYGEN__
2081 #define DEFAULT_X_MAX_TRAVEL 200.0f // mm
2082 #endif
2083 #if !defined DEFAULT_Y_MAX_TRAVEL || defined __DOXYGEN__
2084 #define DEFAULT_Y_MAX_TRAVEL 200.0f // mm
2085 #endif
2086 #if !defined DEFAULT_Z_MAX_TRAVEL || defined __DOXYGEN__
2087 #define DEFAULT_Z_MAX_TRAVEL 200.0f // mm
2088 #endif
2089 #if (defined A_AXIS && !defined DEFAULT_A_MAX_TRAVEL) || defined __DOXYGEN__
2090 #define DEFAULT_A_MAX_TRAVEL 200.0f // mm
2091 #endif
2092 #if (defined B_AXIS && !defined DEFAULT_B_MAX_TRAVEL) || defined __DOXYGEN__
2093 #define DEFAULT_B_MAX_TRAVEL 200.0f // mm
2094 #endif
2095 #if (defined C_AXIS && !defined DEFAULT_C_MAX_TRAVEL) || defined __DOXYGEN__
2096 #define DEFAULT_C_MAX_TRAVEL 200.0f // mm
2097 #endif
2098 #if (defined U_AXIS && !defined DEFAULT_U_MAX_TRAVEL) || defined __DOXYGEN__
2099 #define DEFAULT_U_MAX_TRAVEL 200.0f // mm
2100 #endif
2101 #if (defined V_AXIS && !defined DEFAULT_V_MAX_TRAVEL) || defined __DOXYGEN__
2102 #define DEFAULT_V_MAX_TRAVEL 200.0f // mm
2103 #endif
2105 
2110 #if !defined DEFAULT_X_CURRENT || defined __DOXYGEN__
2111 #define DEFAULT_X_CURRENT 500.0f // mA RMS
2112 #endif
2113 #if !defined DEFAULT_Y_CURRENT || defined __DOXYGEN__
2114 #define DEFAULT_Y_CURRENT 500.0f // mA RMS
2115 #endif
2116 #if !defined DEFAULT_Z_CURRENT || defined __DOXYGEN__
2117 #define DEFAULT_Z_CURRENT 500.0f // mA RMS
2118 #endif
2119 #if (defined A_AXIS && !defined DEFAULT_A_CURRENT) || defined __DOXYGEN__
2120 #define DEFAULT_A_CURRENT 500.0f // mA RMS
2121 #endif
2122 #if (defined B_AXIS && !defined DEFAULT_B_CURRENT) || defined __DOXYGEN__
2123 #define DEFAULT_B_CURRENT 500.0f // mA RMS
2124 #endif
2125 #if (defined C_AXIS && !defined DEFAULT_C_CURRENT) || defined __DOXYGEN__
2126 #define DEFAULT_C_CURRENT 500.0f // mA RMS
2127 #endif
2128 #if (defined U_AXIS && !defined DEFAULT_U_CURRENT) || defined __DOXYGEN__
2129 #define DEFAULT_U_CURRENT 500.0f // mA RMS
2130 #endif
2131 #if (defined V_AXIS && !defined DEFAULT_V_CURRENT) || defined __DOXYGEN__
2132 #define DEFAULT_V_CURRENT 500.0f // mA RMS
2133 #endif
2135 
2136 // Sanity checks
2137 
2138 // N_TOOLS may have been defined on the compiler command line.
2139 #if defined(N_TOOLS) && N_TOOLS == 0
2140 #undef N_TOOLS
2141 #endif
2142 
2143 #if defined(N_TOOLS) && N_TOOLS > 32
2144 #undef N_TOOLS
2145 #define N_TOOLS 32
2146 #endif
2147 
2148 #if N_SYS_SPINDLE > N_SPINDLE
2149 #undef N_SYS_SPINDLE
2150 #define N_SYS_SPINDLE N_SPINDLE
2151 #endif
2152 
2153 #if N_SYS_SPINDLE < 1
2154 #undef N_SYS_SPINDLE
2155 #define N_SYS_SPINDLE 1
2156 #endif
2157 
2158 #if N_SYS_SPINDLE > 8
2159 #undef N_SYS_SPINDLE
2160 #define N_SYS_SPINDLE 8
2161 #endif
2162 
2163 #if NGC_EXPRESSIONS_ENABLE && !NGC_PARAMETERS_ENABLE
2164 #undef NGC_PARAMETERS_ENABLE
2165 #define NGC_PARAMETERS_ENABLE On
2166 #endif
2167 
2168 #if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
2169  #error "WCO busy refresh is less than idle refresh."
2170 #endif
2171 #if (REPORT_OVERRIDE_REFRESH_BUSY_COUNT < REPORT_OVERRIDE_REFRESH_IDLE_COUNT)
2172  #error "Override busy refresh is less than idle refresh."
2173 #endif
2174 #if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
2175  #error "WCO refresh must be greater than one."
2176 #endif
2177 #if (REPORT_OVERRIDE_REFRESH_IDLE_COUNT < 1)
2178  #error "Override refresh must be greater than zero."
2179 #endif
2180 
2181 #if DEFAULT_LASER_MODE && DEFAULT_LATHE_MODE
2182 #error "Cannot enable laser and lathe mode at the same time!"
2183 #endif
2184 
2185 #if LATHE_UVW_OPTION && (N_AXIS > 6 || AXIS_REMAP_ABC2UVW)
2186 #warning "Cannot enable lathe UVW option when N_AXIS > 6 or ABC words are remapped!"
2187 #undef LATHE_UVW_OPTION
2188 #define LATHE_UVW_OPTION Off
2189 #endif
2190 
2191 #if DEFAULT_CONTROL_SIGNALS_INVERT_MASK < 0
2192 #undef DEFAULT_CONTROL_SIGNALS_INVERT_MASK
2193 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK SIGNALS_BITMASK
2194 #endif
2195 
2196 #if DEFAULT_LIMIT_SIGNALS_INVERT_MASK < 0
2197 #undef DEFAULT_LIMIT_SIGNALS_INVERT_MASK
2198 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK AXES_BITMASK
2199 #endif
2200 
2201 #if DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK < 0
2202 #undef DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK
2203 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK AXES_BITMASK
2204 #endif
2205 
2206 #if DEFAULT_STEP_SIGNALS_INVERT_MASK < 0
2207 #undef DEFAULT_STEP_SIGNALS_INVERT_MASK
2208 #define DEFAULT_STEP_SIGNALS_INVERT_MASK AXES_BITMASK
2209 #endif
2210 
2211 #if DEFAULT_ENABLE_SIGNALS_INVERT_MASK < 0
2212 #undef DEFAULT_ENABLE_SIGNALS_INVERT_MASK
2213 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
2214 #endif
2215 
2216 #if DEFAULT_SPINDLE_ON_DELAY
2217 #if DEFAULT_SPINDLE_ON_DELAY < 500
2218 #undef DEFAULT_SPINDLE_ON_DELAY
2219 #define DEFAULT_SPINDLE_ON_DELAY 500
2220 #elif DEFAULT_SPINDLE_ON_DELAY > 20000
2221 #undef DEFAULT_SPINDLE_ON_DELAY
2222 #define DEFAULT_SPINDLE_ON_DELAY 20000
2223 #endif
2224 #endif
2225 
2226 #if DEFAULT_COOLANT_ON_DELAY
2227 #if DEFAULT_COOLANT_ON_DELAY < 500
2228 #undef DEFAULT_COOLANT_ON_DELAY
2229 #define DEFAULT_COOLANT_ON_DELAY 500
2230 #elif DEFAULT_COOLANT_ON_DELAY > 20000
2231 #undef DEFAULT_COOLANT_ON_DELAY
2232 #define DEFAULT_COOLANT_ON_DELAY 20000
2233 #endif
2234 #endif
2235 
2236 #if DEFAULT_PARKING_ENABLE > 0
2237  #if DEFAULT_HOMING_FORCE_SET_ORIGIN > 0
2238  #error "DEFAULT_HOMING_FORCE_SET_ORIGIN is not supported with DEFAULT_PARKING_ENABLE at this time."
2239  #endif
2240 #endif
2241 
2242 #if DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL > 0
2243  #if DEFAULT_PARKING_ENABLE < 1
2244  #error "DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL must be enabled with DEFAULT_PARKING_ENABLE."
2245  #endif
2246 #endif
2247 
2302 #endif // _GRBL_CONFIG_H_