grblHAL core  20250618
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 #define MAX_TOOL_NUMBER 2147483647 // Limited by max signed 32-bit value - 1
190 
191 // ---------------------------------------------------------------------------------------
192 // ADVANCED CONFIGURATION OPTIONS:
193 
194 // EXPERIMENTAL OPTIONS
195 
196 #define ENABLE_PATH_BLENDING Off // Do NOT enable unless working on adding this feature!
197 
198 #if !defined ENABLE_ACCELERATION_PROFILES || defined __DOXYGEN__
199 #define ENABLE_ACCELERATION_PROFILES Off // Enable to allow G-Code changeable acceleration profiles.
200 #endif
201 
202 #if !defined ENABLE_JERK_ACCELERATION || defined __DOXYGEN__
203 #define ENABLE_JERK_ACCELERATION Off // Enable to use 3rd order acceleration calculations. May need more processing power, a FPU will help.
204 #endif
205 
206 // -
207 
208 // Enables code for debugging purposes. Not for general use and always in constant flux.
209 //#define DEBUG // Uncomment to enable. Default disabled.
210 //#define DEBUGOUT 0 // Uncomment to claim serial port with given instance number and add HAL entry point for debug output.
211 
224 #if !defined REPORT_OVERRIDE_REFRESH_BUSY_COUNT || defined __DOXYGEN__
225 #define REPORT_OVERRIDE_REFRESH_BUSY_COUNT 20 // (1-255)
226 #endif
227 #if !defined REPORT_OVERRIDE_REFRESH_IDLE_COUNT || defined __DOXYGEN__
228 #define REPORT_OVERRIDE_REFRESH_IDLE_COUNT 10 // (1-255) Must be less than or equal to the busy count
229 #endif
230 #if !defined REPORT_WCO_REFRESH_BUSY_COUNT || defined __DOXYGEN__
231 #define REPORT_WCO_REFRESH_BUSY_COUNT 30 // (2-255)
232 #endif
233 #if !defined REPORT_WCO_REFRESH_IDLE_COUNT || defined __DOXYGEN__
234 #define REPORT_WCO_REFRESH_IDLE_COUNT 10 // (2-255) Must be less than or equal to the busy count
235 #endif
237 
248 #if !defined ACCELERATION_TICKS_PER_SECOND || defined __DOXYGEN__
249 #define ACCELERATION_TICKS_PER_SECOND 100
250 #endif
251 
252 // Sets the maximum step rate allowed to be written as a grblHAL setting. This option enables an error
253 // check in the settings module to prevent settings values that will exceed this limitation. The maximum
254 // step rate is strictly limited by the CPU speed and will change if something other than an AVR running
255 // at 16MHz is used.
256 // NOTE: For now disabled, will enable if flash space permits.
257 //#define MAX_STEP_RATE_HZ 30000 // Hz
258 
269 #if !defined REPORT_ECHO_LINE_RECEIVED || defined __DOXYGEN__
270 #define REPORT_ECHO_LINE_RECEIVED Off // Default disabled. Set to \ref On or 1 to enable.
271 #endif
272 
279 #if !defined TOOL_LENGTH_OFFSET_AXIS || defined __DOXYGEN__
280 #define TOOL_LENGTH_OFFSET_AXIS -1 // Default is all axes.
281 #endif
282 
292 #if !defined MINIMUM_JUNCTION_SPEED || defined __DOXYGEN__
293 #define MINIMUM_JUNCTION_SPEED 0.0f // (mm/min)
294 #endif
295 
303 #if !defined MINIMUM_FEED_RATE || defined __DOXYGEN__
304 #define MINIMUM_FEED_RATE 1.0f // (mm/min)
305 #endif
306 
314 #if !defined N_ARC_CORRECTION || defined __DOXYGEN__
315 #define N_ARC_CORRECTION 12 // Integer (1-255)
316 #endif
317 
329 #if !defined ARC_ANGULAR_TRAVEL_EPSILON || defined __DOXYGEN__
330 #define ARC_ANGULAR_TRAVEL_EPSILON 5E-7f // Float (radians)
331 #endif
332 
337 #if !defined BEZIER_MIN_STEP || defined __DOXYGEN__
338 #define BEZIER_MIN_STEP 0.002f
339 #endif
340 #if !defined BEZIER_MAX_STEP || defined __DOXYGEN__
341 #define BEZIER_MAX_STEP 0.1f
342 #endif
343 #if !defined BEZIER_SIGMA || defined __DOXYGEN__
344 #define BEZIER_SIGMA 0.1f
345 #endif
347 
348 
356 #if !defined DWELL_TIME_STEP || defined __DOXYGEN__
357 #define DWELL_TIME_STEP 50 // Integer (1-255) (milliseconds)
358 #endif
359 
369 #if !defined SEGMENT_BUFFER_SIZE || defined __DOXYGEN__
370 #define SEGMENT_BUFFER_SIZE 10 // Uncomment to override default in stepper.h.
371 #endif
372 
378 #if !defined SET_CHECK_MODE_PROBE_TO_START || defined __DOXYGEN__
379 #define SET_CHECK_MODE_PROBE_TO_START Off // Default disabled. Set to \ref On or 1 to enable.
380 #endif
381 
393 #if !defined HARD_LIMIT_FORCE_STATE_CHECK || defined __DOXYGEN__
394 #define HARD_LIMIT_FORCE_STATE_CHECK Off // Default disabled. Set to \ref On or 1 to enable.
395 #endif
396 
408 #if !defined HOMING_AXIS_SEARCH_SCALAR || defined __DOXYGEN__
409 #define HOMING_AXIS_SEARCH_SCALAR 1.5f // Must be > 1 to ensure limit switch will be engaged.
410 #endif
411 #if !defined HOMING_AXIS_LOCATE_SCALAR || defined __DOXYGEN__
412 #define HOMING_AXIS_LOCATE_SCALAR 10.0f// Must be > 1 to ensure limit switch is cleared.
413 #endif
415 
423 #if !defined ENABLE_RESTORE_NVS_WIPE_ALL || defined __DOXYGEN__
424 #define ENABLE_RESTORE_NVS_WIPE_ALL On
425 #endif
426 #if !defined ENABLE_RESTORE_NVS_DEFAULT_SETTINGS || defined __DOXYGEN__
427 #define ENABLE_RESTORE_NVS_DEFAULT_SETTINGS On
428 #endif
429 #if !defined ENABLE_RESTORE_NVS_CLEAR_PARAMETERS || defined __DOXYGEN__
430 #define ENABLE_RESTORE_NVS_CLEAR_PARAMETERS On
431 #endif
432 #if !defined ENABLE_RESTORE_NVS_DRIVER_PARAMETERS || defined __DOXYGEN__
433 #define ENABLE_RESTORE_NVS_DRIVER_PARAMETERS On
434 #endif
436 
447 #if !defined SETTINGS_RESTORE_DEFAULTS || defined __DOXYGEN__
448 #define SETTINGS_RESTORE_DEFAULTS On
449 #endif
450 #if !defined SETTINGS_RESTORE_PARAMETERS || defined __DOXYGEN__
451 #define SETTINGS_RESTORE_PARAMETERS On
452 #endif
453 #if !defined SETTINGS_RESTORE_STARTUP_LINES || defined __DOXYGEN__
454 #define SETTINGS_RESTORE_STARTUP_LINES On
455 #endif
456 #if !defined SETTINGS_RESTORE_BUILD_INFO || defined __DOXYGEN__
457 #define SETTINGS_RESTORE_BUILD_INFO On
458 #endif
459 #if !defined SETTINGS_RESTORE_DRIVER_PARAMETERS || defined __DOXYGEN__
460 #define SETTINGS_RESTORE_DRIVER_PARAMETERS On
461 #endif
470 #if !defined DISABLE_BUILD_INFO_WRITE_COMMAND || defined __DOXYGEN__
471 #define DISABLE_BUILD_INFO_WRITE_COMMAND Off
472 #endif
474 
488 #if !defined SLEEP_DURATION || defined __DOXYGEN__
489 #define SLEEP_DURATION 5.0f // Number of minutes before sleep mode is entered.
490 #endif
491 
497 #if !defined NVSDATA_BUFFER_ENABLE || defined __DOXYGEN__
498 #define NVSDATA_BUFFER_ENABLE On // Default on, set to \ref off or 0 to disable.
499 #endif
500 
510 #if !defined TOOLSETTER_RADIUS || defined __DOXYGEN__
511 #define TOOLSETTER_RADIUS 5.0f
512 #endif
513 
514 #if !defined ENABLE_BACKLASH_COMPENSATION || defined __DOXYGEN__
515 #define ENABLE_BACKLASH_COMPENSATION Off
516 #endif
517 
518 #if COMPATIBILITY_LEVEL == 0 || defined __DOXYGEN__
523 #if !defined N_TOOLS || defined __DOXYGEN__
524 #define N_TOOLS 0
525 #endif
526 #endif
527 
534 #if !defined SPINDLE_SYNC_ENABLE || defined __DOXYGEN__
535 #define SPINDLE_SYNC_ENABLE Off
536 #endif
537 
544 #if !defined NGC_EXPRESSIONS_ENABLE || defined __DOXYGEN__
545 #define NGC_EXPRESSIONS_ENABLE Off
546 #endif
547 
552 #if !defined NGC_PARAMETERS_ENABLE || defined __DOXYGEN__
553 #define NGC_PARAMETERS_ENABLE On
554 #endif
555 
560 #if (NGC_EXPRESSIONS_ENABLE && !defined NGC_N_ASSIGN_PARAMETERS_PER_BLOCK) || defined __DOXYGEN__
561 #define NGC_N_ASSIGN_PARAMETERS_PER_BLOCK 10
562 #endif
563 
568 #if !defined LATHE_UVW_OPTION || defined __DOXYGEN__
569 #define LATHE_UVW_OPTION Off
570 #endif
571 
572 // Max number of entries in log for PID data reporting, to be used for tuning
573 //#define PID_LOG 1000 // Default disabled. Uncomment to enable.
574 
575 // End compile time only default configuration
576 
577 // ---------------------------------------------------------------------------------------
578 // SETTINGS DEFAULT VALUE OVERRIDES:
579 
580 // General settings (Group_General)
581 
591 
596 #if !defined DEFAULT_REPORT_MACHINE_POSITION || defined __DOXYGEN__
597 #define DEFAULT_REPORT_MACHINE_POSITION On // Default on. Set to \ref Off or 0 to disable.
598 #endif
599 
605 #if !defined DEFAULT_REPORT_BUFFER_STATE || defined __DOXYGEN__
606 #define DEFAULT_REPORT_BUFFER_STATE On // Default on. Set to \ref Off or 0 to disable.
607 #endif
608 
616 #if !defined DEFAULT_REPORT_LINE_NUMBERS || defined __DOXYGEN__
617 #define DEFAULT_REPORT_LINE_NUMBERS On // Default on. Set to \ref Off or 0 to disable.
618 #endif
619 
626 #if !defined DEFAULT_REPORT_CURRENT_FEED_SPEED || defined __DOXYGEN__
627 #define DEFAULT_REPORT_CURRENT_FEED_SPEED On // Default on. Set to \ref Off or 0 to disable.
628 #endif
629 
636 #if !defined DEFAULT_REPORT_PIN_STATE || defined __DOXYGEN__
637 #define DEFAULT_REPORT_PIN_STATE On // Default on. Set to \ref Off or 0 to disable.
638 #endif
639 
646 #if !defined DEFAULT_REPORT_WORK_COORD_OFFSET || defined __DOXYGEN__
647 #define DEFAULT_REPORT_WORK_COORD_OFFSET On // Default on. Set to \ref Off or 0 to disable.
648 #endif
649 
656 #if !defined DEFAULT_REPORT_OVERRIDES || defined __DOXYGEN__
657 #define DEFAULT_REPORT_OVERRIDES On // Default on. Set to \ref Off or 0 to disable.
658 #endif
659 
667 #if !defined DEFAULT_REPORT_PROBE_COORDINATES || defined __DOXYGEN__
668 #define DEFAULT_REPORT_PROBE_COORDINATES On // Default on. Set to \ref Off or 0 to disable.
669 #endif
670 
681 #if !defined DEFAULT_REPORT_SYNC_ON_WCO_CHANGE || defined __DOXYGEN__
682 #define DEFAULT_REPORT_SYNC_ON_WCO_CHANGE On
683 #endif
684 
692 #if !defined DEFAULT_REPORT_PARSER_STATE || defined __DOXYGEN__
693 #define DEFAULT_REPORT_PARSER_STATE Off // Default off. Set to \ref On or 1 to enable.
694 #endif
695 
706 #if !defined DEFAULT_REPORT_ALARM_SUBSTATE || defined __DOXYGEN__
707 #define DEFAULT_REPORT_ALARM_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
708 #endif
709 
719 #if !defined DEFAULT_REPORT_RUN_SUBSTATE || defined __DOXYGEN__
720 #define DEFAULT_REPORT_RUN_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
721 #endif
722 
729 #if !defined DEFAULT_REPORT_WHEN_HOMING || defined __DOXYGEN__
730 #define DEFAULT_REPORT_WHEN_HOMING Off // Default off. Set to \ref On or 1 to enable.
731 #endif
732 
734 
739 #if !defined DEFAULT_JUNCTION_DEVIATION || defined __DOXYGEN__
740 #define DEFAULT_JUNCTION_DEVIATION 0.01f // mm
741 #endif
743 
748 #if !defined DEFAULT_ARC_TOLERANCE || defined __DOXYGEN__
749 #define DEFAULT_ARC_TOLERANCE 0.002f // mm
750 #endif
752 
758 #if !defined DEFAULT_REPORT_INCHES || defined __DOXYGEN__
759 #define DEFAULT_REPORT_INCHES Off
760 #endif
762 
768 #if !defined DEFAULT_G73_RETRACT || defined __DOXYGEN__
769 #define DEFAULT_G73_RETRACT 0.1f // mm
770 #endif
772 
777 #if !defined DEFAULT_LASER_MODE || defined __DOXYGEN__
778 #define DEFAULT_LASER_MODE Off
779 #endif
780 #if !defined DEFAULT_LATHE_MODE || defined __DOXYGEN__
781 #define DEFAULT_LATHE_MODE Off
782 #endif
784 
794 #if !defined DEFAULT_LEGACY_RTCOMMANDS || defined __DOXYGEN__
795 #define DEFAULT_LEGACY_RTCOMMANDS On
796 #endif
798 
802 #if !defined DEFAULT_RESET_OVERRIDES || defined __DOXYGEN__
803 #define DEFAULT_RESET_OVERRIDES Off
804 #endif
806 
810 #if !defined DEFAULT_SLEEP_ENABLE || defined __DOXYGEN__
811 #define DEFAULT_SLEEP_ENABLE Off
812 #endif
814 
822 #if !defined DEFAULT_DISABLE_LASER_DURING_HOLD || defined __DOXYGEN__
823 #define DEFAULT_DISABLE_LASER_DURING_HOLD On
824 #endif
826 
832 #if !defined DEFAULT_RESTORE_AFTER_FEED_HOLD || defined __DOXYGEN__
833 #define DEFAULT_RESTORE_AFTER_FEED_HOLD On
834 #endif
836 
846 #if !defined DEFAULT_FORCE_INITIALIZATION_ALARM || defined __DOXYGEN__
847 #define DEFAULT_FORCE_INITIALIZATION_ALARM Off
848 #endif
850 
857 #if !defined DEFAULT_DISABLE_G92_PERSISTENCE || defined __DOXYGEN__
858 #if COMPATIBILITY_LEVEL <= 1
859 #define DEFAULT_DISABLE_G92_PERSISTENCE Off
860 #else
861 #define DEFAULT_DISABLE_G92_PERSISTENCE On
862 #endif
863 #endif
865 
874 #if !defined DEFAULT_PLANNER_BUFFER_BLOCKS || defined __DOXYGEN__
875 #define DEFAULT_PLANNER_BUFFER_BLOCKS 100
876 #endif
878 
888 #if !defined DEFAULT_HOMING_KEEP_STATUS_ON_RESET || defined __DOXYGEN__
889 #define DEFAULT_HOMING_KEEP_STATUS_ON_RESET Off // Default disabled. Set to \ref On or 1 to enable.
890 #endif
892 
899 #if !defined DEFAULT_KEEP_OFFSETS_ON_RESET || defined __DOXYGEN__
900 #define DEFAULT_KEEP_OFFSETS_ON_RESET Off
901 #endif
903 
904 // Control signals settings (Group_ControlSignals)
905 
906 #ifndef __DOXYGEN__ // For now do not include in documentation
907 
913 #define SIGNALS_RESET_BIT (1<<0)
914 #define SIGNALS_FEEDHOLD_BIT (1<<1)
915 #define SIGNALS_CYCLESTART_BIT (1<<2)
916 #define SIGNALS_SAFETYDOOR_BIT (1<<3)
917 #define SIGNALS_BLOCKDELETE_BIT (1<<4)
918 #define SIGNALS_STOPDISABLE_BIT (1<<5)
919 #define SIGNALS_ESTOP_BIT (1<<6)
920 #define SIGNALS_PROBE_CONNECTED_BIT (1<<7)
921 #define SIGNALS_MOTOR_FAULT_BIT (1<<8)
922 #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)
924 
925 #endif
926 
933 #if !defined DEFAULT_CONTROL_SIGNALS_INVERT_MASK || defined __DOXYGEN__
934 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
935 #endif
937 
952 #if !defined DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK || defined __DOXYGEN__
953 #define DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
954 #endif
956 
957 // Limits settings (Group_Limits)
958 
967 #if !defined DEFAULT_LIMIT_SIGNALS_INVERT_MASK || defined __DOXYGEN__
968 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
969 #endif
971 
979 #if !defined DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK || defined __DOXYGEN__
980 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK 0 // Set to -1 or AXES_BITMASK to disable pullup for all axes
981 #endif
983 
987 #if !defined DEFAULT_SOFT_LIMIT_ENABLE || defined __DOXYGEN__
988 #define DEFAULT_SOFT_LIMIT_ENABLE Off
989 #endif
991 
995 
1002 #if !defined DEFAULT_HARD_LIMIT_ENABLE || defined __DOXYGEN__
1003 #define DEFAULT_HARD_LIMIT_ENABLE Off
1004 #endif
1005 #if !defined DEFAULT_CHECK_LIMITS_AT_INIT || defined __DOXYGEN__
1006 #define DEFAULT_CHECK_LIMITS_AT_INIT Off
1007 #endif
1008 #if !defined DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY || defined __DOXYGEN__
1009 #define DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY Off
1010 #endif
1011 
1024 
1027 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT || defined __DOXYGEN__
1028 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT 5.0f // Float (percent)
1029 #endif
1031 
1035 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN || defined __DOXYGEN__
1036 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN 2.5f // Float (mm)
1037 #endif
1039 
1044 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX || defined __DOXYGEN__
1045 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX 25.0f // Float (mm)
1046 #endif
1048 
1049 // Coolant settings (Group_Coolant)
1050 
1056 #if !defined DEFAULT_INVERT_COOLANT_FLOOD_PIN || defined __DOXYGEN__
1057 #define DEFAULT_INVERT_COOLANT_FLOOD_PIN Off
1058 #endif
1059 #if !defined DEFAULT_INVERT_COOLANT_MIST_PIN || defined __DOXYGEN__
1060 #define DEFAULT_INVERT_COOLANT_MIST_PIN Off // NOTE: not supported by all drivers.
1061 #endif
1063 
1067 #if !defined DEFAULT_COOLANT_ON_DELAY || defined __DOXYGEN__
1068 #define DEFAULT_COOLANT_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1069 #endif
1071 
1072 // Spindle settings (Group_Spindle)
1073 
1077 #if !defined DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED || defined __DOXYGEN__
1078 #define DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED Off
1079 #endif
1080 #if !defined DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE || defined __DOXYGEN__
1081 #define DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE Off
1082 #endif
1084 
1089 #if !defined DEFAULT_INVERT_SPINDLE_ENABLE_PIN || defined __DOXYGEN__
1090 #define DEFAULT_INVERT_SPINDLE_ENABLE_PIN Off
1091 #endif
1092 #if !defined DEFAULT_INVERT_SPINDLE_CCW_PIN || defined __DOXYGEN__
1093 #define DEFAULT_INVERT_SPINDLE_CCW_PIN Off // NOTE: not supported by all drivers.
1094 #endif
1095 #if !defined DEFAULT_INVERT_SPINDLE_PWM_PIN || defined __DOXYGEN__
1096 #define DEFAULT_INVERT_SPINDLE_PWM_PIN Off // NOTE: not supported by all drivers.
1097 #endif
1099 
1103 #if !defined DEFAULT_SPINDLE_RPM_MAX || defined __DOXYGEN__
1104 #define DEFAULT_SPINDLE_RPM_MAX 1000.0f // rpm
1105 #endif
1107 
1111 #if !defined DEFAULT_SPINDLE_RPM_MIN || defined __DOXYGEN__
1112 #define DEFAULT_SPINDLE_RPM_MIN 0.0f // rpm
1113 #endif
1115 
1119 #if !defined DEFAULT_SPINDLE_PWM_FREQ || defined __DOXYGEN__
1120 #define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
1121 #endif
1123 
1127 #if !defined DEFAULT_SPINDLE_PWM_OFF_VALUE || defined __DOXYGEN__
1128 #define DEFAULT_SPINDLE_PWM_OFF_VALUE 0.0f // Percent
1129 #endif
1131 
1144 #if !defined DEFAULT_SPINDLE_PWM_MIN_VALUE || defined __DOXYGEN__
1145 #define DEFAULT_SPINDLE_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1146 #endif
1148 
1152 #if !defined DEFAULT_SPINDLE_PWM_MAX_VALUE || defined __DOXYGEN__
1153 #define DEFAULT_SPINDLE_PWM_MAX_VALUE 100.0f // Percent
1154 #endif
1156 
1165 #if !defined DEFAULT_SPINDLE_PPR || defined __DOXYGEN__
1166 #define DEFAULT_SPINDLE_PPR 0 // Pulses per revolution.
1167 #endif
1169 
1173 #if !defined DEFAULT_SPINDLE_AT_SPEED_TOLERANCE || defined __DOXYGEN__
1174 #define DEFAULT_SPINDLE_AT_SPEED_TOLERANCE 0.0f // Percent - 0 means not checked
1175 #endif
1177 
1181 #if !defined DEFAULT_SPINDLE_ON_DELAY || defined __DOXYGEN__
1182 #define DEFAULT_SPINDLE_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1183 #endif
1185 
1189 #if !defined DEFAULT_SPINDLE || defined __DOXYGEN__
1190 #define DEFAULT_SPINDLE SPINDLE_PWM0 // Spindle number from spindle_control.h
1191 #endif
1193 
1197 #if !defined DEFAULT_SPINDLE_OFF_DELAY || defined __DOXYGEN__
1198 #define DEFAULT_SPINDLE_OFF_DELAY 0 // milliseconds: 0 or 500 - 20000
1199 #endif
1201 
1202 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1203 
1204 // $9 - Setting_SpindlePWMOptions
1205 // bit 0
1206 // always defaults to on
1207 // bit 1
1208 
1209 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1210 
1211 #ifndef DEFAULT_SPINDLE_P_GAIN
1212 #define DEFAULT_SPINDLE_P_GAIN 1.0f
1213 #endif
1214 #ifndef DEFAULT_SPINDLE_I_GAIN
1215 #define DEFAULT_SPINDLE_I_GAIN 0.01f
1216 #endif
1217 #ifndef DEFAULT_SPINDLE_D_GAIN
1218 #define DEFAULT_SPINDLE_D_GAIN 0.0f
1219 #endif
1220 #ifndef DEFAULT_SPINDLE_I_MAX
1221 #define DEFAULT_SPINDLE_I_MAX 10.0f
1222 #endif
1223 
1224 #if ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
1225 
1230 #if !defined DEFAULT_RPM_POINT01 || defined __DOXYGEN__
1231 #define DEFAULT_RPM_POINT01 NAN // DEFAULT_SPINDLE_RPM_MIN // Replace NAN with DEFAULT_SPINDLE_RPM_MIN to enable.
1232 #endif
1233 #if !defined DEFAULT_RPM_LINE_A1 || defined __DOXYGEN__
1234 #define DEFAULT_RPM_LINE_A1 3.197101e-03f
1235 #endif
1236 #if !defined DEFAULT_RPM_LINE_B1 || defined __DOXYGEN__
1237 #define DEFAULT_RPM_LINE_B1 -3.526076e-1f
1238 #endif
1240 
1245 #if !defined DEFAULT_RPM_POINT12 || defined __DOXYGEN__
1246 #define DEFAULT_RPM_POINT12 NAN // Change NAN to a float constant to enable.
1247 #endif
1248 #if !defined DEFAULT_RPM_LINE_A2 || defined __DOXYGEN__
1249 #define DEFAULT_RPM_LINE_A2 1.722950e-2f
1250 #endif
1251 #if !defined DEFAULT_RPM_LINE_B2 || defined __DOXYGEN__
1252 #define DEFAULT_RPM_LINE_B2 1.0f,
1253 #endif
1255 
1260 #if !defined DEFAULT_RPM_POINT23 || defined __DOXYGEN__
1261 #define DEFAULT_RPM_POINT23 NAN // Change NAN to a float constant to enable.
1262 #endif
1263 #if !defined DEFAULT_RPM_LINE_A3 || defined __DOXYGEN__
1264 #define DEFAULT_RPM_LINE_A3 5.901518e-02f
1265 #endif
1266 #if !defined DEFAULT_RPM_LINE_B3 || defined __DOXYGEN__
1267 #define DEFAULT_RPM_LINE_B3 4.881851e+02f
1268 #endif
1270 
1275 #if !defined DEFAULT_RPM_POINT34 || defined __DOXYGEN__
1276 #define DEFAULT_RPM_POINT34 NAN // Change NAN to a float constant to enable.
1277 #endif
1278 #if !defined DEFAULT_RPM_LINE_A4 || defined __DOXYGEN__
1279 #define DEFAULT_RPM_LINE_A4 1.203413e-01f
1280 #endif
1281 #if !defined DEFAULT_RPM_LINE_B4 || defined __DOXYGEN__
1282 #define DEFAULT_RPM_LINE_B4 1.151360e+03f
1283 #endif
1285 
1286 #endif // ENABLE_SPINDLE_LINEARIZATION
1287 
1288 // Settings for second PWM spindle
1289 
1294 #if !defined DEFAULT_INVERT_SPINDLE1_ENABLE_PIN || defined __DOXYGEN__
1295 #define DEFAULT_INVERT_SPINDLE1_ENABLE_PIN Off
1296 #endif
1297 #if !defined DEFAULT_INVERT_SPINDLE1_CCW_PIN || defined __DOXYGEN__
1298 #define DEFAULT_INVERT_SPINDLE1_CCW_PIN Off // NOTE: not supported by all drivers.
1299 #endif
1300 #if !defined DEFAULT_INVERT_SPINDLE1_PWM_PIN || defined __DOXYGEN__
1301 #define DEFAULT_INVERT_SPINDLE1_PWM_PIN Off // NOTE: not supported by all drivers.
1302 #endif
1304 
1308 #if !defined DEFAULT_SPINDLE1_RPM_MAX || defined __DOXYGEN__
1309 #define DEFAULT_SPINDLE1_RPM_MAX 1000.0f // rpm
1310 #endif
1312 
1316 #if !defined DEFAULT_SPINDLE1_RPM_MIN || defined __DOXYGEN__
1317 #define DEFAULT_SPINDLE1_RPM_MIN 0.0f // rpm
1318 #endif
1320 
1324 #if !defined DEFAULT_SPINDLE1_PWM_FREQ || defined __DOXYGEN__
1325 #define DEFAULT_SPINDLE1_PWM_FREQ 5000 // Hz
1326 #endif
1328 
1332 #if !defined DEFAULT_SPINDLE1_PWM_OFF_VALUE || defined __DOXYGEN__
1333 #define DEFAULT_SPINDLE1_PWM_OFF_VALUE 0.0f // Percent
1334 #endif
1336 
1349 #if !defined DEFAULT_SPINDLE1_PWM_MIN_VALUE || defined __DOXYGEN__
1350 #define DEFAULT_SPINDLE1_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1351 #endif
1353 
1357 #if !defined DEFAULT_SPINDLE1_PWM_MAX_VALUE || defined __DOXYGEN__
1358 #define DEFAULT_SPINDLE1_PWM_MAX_VALUE 100.0f // Percent
1359 #endif
1361 
1362 
1363 // Tool change settings (Group_Toolchange)
1364 
1369 #if !defined DEFAULT_TOOLCHANGE_MODE || defined __DOXYGEN__
1370 #define DEFAULT_TOOLCHANGE_MODE 0
1371 #endif
1373 
1377 #if !defined DEFAULT_TOOLCHANGE_PROBING_DISTANCE || defined __DOXYGEN__
1378 #define DEFAULT_TOOLCHANGE_PROBING_DISTANCE 30 // max probing distance in mm for mode 3
1379 #endif
1381 
1385 #if !defined DEFAULT_TOOLCHANGE_FEED_RATE || defined __DOXYGEN__
1386 #define DEFAULT_TOOLCHANGE_FEED_RATE 25.0f // mm/min
1387 #endif
1389 
1394 #if !defined DEFAULT_TOOLCHANGE_SEEK_RATE || defined __DOXYGEN__
1395 #define DEFAULT_TOOLCHANGE_SEEK_RATE 200.0f // mm/min
1396 #endif
1398 
1402 #if !defined DEFAULT_TOOLCHANGE_PULLOFF_RATE || defined __DOXYGEN__
1403 #define DEFAULT_TOOLCHANGE_PULLOFF_RATE 200.0f // mm/min
1404 #endif
1406 
1410 #if !defined DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION || defined __DOXYGEN__
1411 #define DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION Off
1412 #endif
1413 #if !defined DEFAULT_TOOLCHANGE_AT_G30 || defined __DOXYGEN__
1414 #define DEFAULT_TOOLCHANGE_AT_G30 Off
1415 #endif
1416 #if !defined DEFAULT_TOOLCHANGE_FAST_PROBE_PULLOFF || defined __DOXYGEN__
1417 #define DEFAULT_TOOLCHANGE_FAST_PROBE_PULLOFF Off
1418 #endif
1420 
1421 // Homing settings (Group_Homing)
1422 
1429 #if !defined DEFAULT_HOMING_ENABLE || defined __DOXYGEN__
1430 #define DEFAULT_HOMING_ENABLE Off // Default disabled. Set to \ref On or 1 to enable.
1431 #endif
1432 
1440 #if !defined DEFAULT_HOMING_SINGLE_AXIS_COMMANDS || defined __DOXYGEN__
1441 #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS Off // Default disabled. Set to \ref On or 1 to enable.
1442 #endif
1443 
1451 #if !defined DEFAULT_HOMING_INIT_LOCK || defined __DOXYGEN__
1452 #define DEFAULT_HOMING_INIT_LOCK Off // Default disabled. Set to \ref On or 1 to enable.
1453 #endif
1454 
1462 #if !defined DEFAULT_HOMING_FORCE_SET_ORIGIN || defined __DOXYGEN__
1463 #define DEFAULT_HOMING_FORCE_SET_ORIGIN Off // Default disabled. Set to \ref On or 1 to enable.
1464 #endif
1465 
1476 #if !defined DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES || defined __DOXYGEN__
1477 #define DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES Off // Default disabled. Set to \ref On or 1 to enable.
1478 #endif
1480 
1487 #if !defined DEFAULT_HOMING_ALLOW_MANUAL || defined __DOXYGEN__
1488 #define DEFAULT_HOMING_ALLOW_MANUAL Off // Default disabled. Set to \ref On or 1 to enable.
1489 #endif
1490 
1497 #if !defined DEFAULT_HOMING_OVERRIDE_LOCKS || defined __DOXYGEN__
1498 #define DEFAULT_HOMING_OVERRIDE_LOCKS Off // Default disabled. Set to \ref On or 1 to enable.
1499 #endif
1500 
1506 #if !defined DEFAULT_HOMING_USE_LIMIT_SWITCHES || defined __DOXYGEN__
1507 #define DEFAULT_HOMING_USE_LIMIT_SWITCHES Off // Default disabled. Set to \ref On or 1 to enable.
1508 #endif
1510 
1516 #if !defined DEFAULT_HOMING_DIR_MASK || defined __DOXYGEN__
1517 #define DEFAULT_HOMING_DIR_MASK 0
1518 #endif
1520 
1524 #if !defined DEFAULT_HOMING_FEED_RATE || defined __DOXYGEN__
1525 #define DEFAULT_HOMING_FEED_RATE 25.0f // mm/min
1526 #endif
1528 
1532 #if !defined DEFAULT_HOMING_SEEK_RATE || defined __DOXYGEN__
1533 #define DEFAULT_HOMING_SEEK_RATE 500.0f // mm/min
1534 #endif
1536 
1540 #if !defined DEFAULT_HOMING_DEBOUNCE_DELAY || defined __DOXYGEN__
1541 #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
1542 #endif
1544 
1548 #if !defined DEFAULT_HOMING_PULLOFF || defined __DOXYGEN__
1549 #define DEFAULT_HOMING_PULLOFF 1.0f // mm
1550 #endif
1552 
1559 #if !defined DEFAULT_N_HOMING_LOCATE_CYCLE || defined __DOXYGEN__
1560 #define DEFAULT_N_HOMING_LOCATE_CYCLE 1 // Integer (1-127)
1561 #endif
1563 
1585 #if !defined DEFAULT_HOMING_CYCLE_0 || defined __DOXYGEN__
1586 #define DEFAULT_HOMING_CYCLE_0 (Z_AXIS_BIT) // REQUIRED: First move Z to clear workspace.
1587 #endif
1589 
1593 #if !defined DEFAULT_HOMING_CYCLE_1 || defined __DOXYGEN__
1594 #if COREXY
1595 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT) // OPTIONAL: Then move X.
1596 #else
1597 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT|Y_AXIS_BIT) // OPTIONAL: Then move X,Y at the same time.
1598 #endif
1599 #endif
1601 
1605 #if !defined DEFAULT_HOMING_CYCLE_2 || defined __DOXYGEN__
1606 #if COREXY
1607 #define DEFAULT_HOMING_CYCLE_2 (Y_AXIS_BIT) // OPTIONAL: Then move Y.
1608 #else
1609 #define DEFAULT_HOMING_CYCLE_2 0 // OPTIONAL: Uncomment and add axes mask to enable
1610 #endif
1611 #endif
1613 
1617 #if (defined A_AXIS && !defined DEFAULT_HOMING_CYCLE_3) || defined __DOXYGEN__
1618 #define DEFAULT_HOMING_CYCLE_3 0 // OPTIONAL: Uncomment and add axes mask to enable
1619 #endif
1621 
1626 #if (defined B_AXIS && !defined DEFAULT_HOMING_CYCLE_4) || defined __DOXYGEN__
1627 #define DEFAULT_HOMING_CYCLE_4 0 // OPTIONAL: Uncomment and add axes mask to enable
1628 #endif
1630 
1634 #if (defined C_AXIS && !defined DEFAULT_HOMING_CYCLE_5) || defined __DOXYGEN__
1635 #define DEFAULT_HOMING_CYCLE_5 0 // OPTIONAL: Uncomment and add axes mask to enable
1636 #endif
1638 
1647 #if !defined DEFAULT_HOME_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1648 #define DEFAULT_HOME_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
1649 #endif
1651 
1652 
1653 // Probing settings (Group_Probing)
1654 
1658 #if !defined DEFAULT_PROBE_SIGNAL_INVERT || defined __DOXYGEN__
1659 #define DEFAULT_PROBE_SIGNAL_INVERT Off
1660 #endif
1661 #if !defined DEFAULT_TOOLSETTER_SIGNAL_INVERT || defined __DOXYGEN__
1662 #define DEFAULT_TOOLSETTER_SIGNAL_INVERT Off
1663 #endif
1665 
1669 #if !defined DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1670 #define DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP Off
1671 #endif
1672 #if !defined DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1673 #define DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP Off
1674 #endif
1676 
1685 #if !defined DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES || defined __DOXYGEN__
1686 #define DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES Off
1687 #endif
1688 #if !defined DEFAULT_SOFT_LIMIT_PROBE_CYCLES || defined __DOXYGEN__
1689 #define DEFAULT_SOFT_LIMIT_PROBE_CYCLES Off
1690 #endif
1692 
1693 // Safety door/parking settings (Group_SafetyDoor)
1694 
1695 #ifdef DEFAULT_HOMING_ENABLE
1696 
1714 #if !defined DEFAULT_PARKING_ENABLE || defined __DOXYGEN__
1715 #define DEFAULT_PARKING_ENABLE Off // bit 0
1716 // Enables a special set of M-code commands that enables and disables the parking motion.
1717 // These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to disable.
1718 // The command is modal and will be set after a planner sync. Since it is g-code, it is
1719 // executed in sync with g-code commands. It is not a real-time command.
1720 // NOTE: PARKING_ENABLE is required. By default, M56 is active upon initialization. Use
1721 // DEACTIVATE_PARKING_UPON_INIT to set M56 P0 as the power-up default.
1722 #endif
1723 #if !defined DEFAULT_DEACTIVATE_PARKING_UPON_INIT || defined __DOXYGEN__
1724 #define DEFAULT_DEACTIVATE_PARKING_UPON_INIT Off // bit 1
1725 #endif
1726 #if !defined DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL || defined __DOXYGEN__
1727 #define DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL Off // bit 2
1728 #endif
1730 
1735 #if !defined DEFAULT_PARKING_AXIS || defined __DOXYGEN__
1736 #define DEFAULT_PARKING_AXIS Z_AXIS //
1737 #endif
1739 
1743 #if !defined DEFAULT_PARKING_PULLOUT_INCREMENT || defined __DOXYGEN__
1744 #define DEFAULT_PARKING_PULLOUT_INCREMENT 5.0f //
1745 #endif
1747 
1752 #if !defined DEFAULT_PARKING_PULLOUT_RATE || defined __DOXYGEN__
1753 #define DEFAULT_PARKING_PULLOUT_RATE 100.0f // mm/min.
1754 #endif
1756 
1761 #if !defined DEFAULT_PARKING_TARGET || defined __DOXYGEN__
1762 #define DEFAULT_PARKING_TARGET -5.0f // mm
1763 #endif
1765 
1770 #if !defined DEFAULT_PARKING_RATE || defined __DOXYGEN__
1771 #define DEFAULT_PARKING_RATE 500.0f // mm/min
1772 #endif
1774 
1778 
1783 #if !defined DEFAULT_DOOR_IGNORE_WHEN_IDLE || defined __DOXYGEN__
1784 #define DEFAULT_DOOR_IGNORE_WHEN_IDLE Off
1785 #endif
1790 #if !defined DEFAULT_DOOR_KEEP_COOLANT_ON || defined __DOXYGEN__
1791 #define DEFAULT_DOOR_KEEP_COOLANT_ON Off
1792 #endif
1794 
1800 #if !defined DEFAULT_SAFETY_DOOR_SPINDLE_DELAY || defined __DOXYGEN__
1801 #define DEFAULT_SAFETY_DOOR_SPINDLE_DELAY 4.0f // Float (seconds)
1802 #endif
1804 
1811 #if !defined DEFAULT_SAFETY_DOOR_COOLANT_DELAY || defined __DOXYGEN__
1812 #define DEFAULT_SAFETY_DOOR_COOLANT_DELAY 1.0f // Float (seconds)
1813 #endif
1815 
1816 #endif // DEFAULT_HOMING_ENABLE
1817 
1818 // Jogging settings (Group_Jogging)
1819 
1827 #if !defined DEFAULT_JOG_LIMIT_ENABLE || defined __DOXYGEN__
1828 #define DEFAULT_JOG_LIMIT_ENABLE Off
1829 #endif
1831 
1832 // Stepper settings (Group_Stepper)
1833 
1846 #if !defined DEFAULT_STEP_PULSE_MICROSECONDS || defined __DOXYGEN__
1847 #define DEFAULT_STEP_PULSE_MICROSECONDS 5.0f
1848 #endif
1850 
1859 #if !defined DEFAULT_STEPPER_IDLE_LOCK_TIME || defined __DOXYGEN__
1860 #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // milliseconds
1861 #endif
1863 
1869 #if !defined DEFAULT_STEP_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1870 #define DEFAULT_STEP_SIGNALS_INVERT_MASK 0
1871 #endif
1873 
1879 #if !defined DEFAULT_DIR_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1880 #define DEFAULT_DIR_SIGNALS_INVERT_MASK 0
1881 #endif
1883 
1896 #if !defined DEFAULT_ENABLE_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1897 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
1898 #endif
1900 
1906 #if !defined DEFAULT_GANGED_DIRECTION_INVERT_MASK || defined __DOXYGEN__
1907 #define DEFAULT_GANGED_DIRECTION_INVERT_MASK 0
1908 #endif
1910 
1914 #if !defined DEFAULT_STEP_PULSE_DELAY || defined __DOXYGEN__
1915 #define DEFAULT_STEP_PULSE_DELAY 0.0f
1916 #endif
1918 
1925 #if !defined DEFAULT_STEPPER_DEENERGIZE_MASK || defined __DOXYGEN__
1926 #define DEFAULT_STEPPER_DEENERGIZE_MASK 0
1927 #endif
1929 
1936 #if !defined DEFAULT_AXIS_ROTATIONAL_MASK || defined __DOXYGEN__
1937 #define DEFAULT_AXIS_ROTATIONAL_MASK 0
1938 #endif
1940 
1945 #if !defined DEFAULT_STEPPER_ENABLE_DELAY || defined __DOXYGEN__
1946 #define DEFAULT_STEPPER_ENABLE_DELAY 0
1947 #endif
1949 
1955 #if !defined DEFAULT_MOTOR_WARNING_SIGNALS_ENABLE || defined __DOXYGEN__
1956 #define DEFAULT_MOTOR_WARNING_SIGNALS_ENABLE 0
1957 #endif
1959 
1965 #if !defined DEFAULT_MOTOR_WARNING_SIGNALS_INVERT || defined __DOXYGEN__
1966 #define DEFAULT_MOTOR_WARNING_SIGNALS_INVERT 0
1967 #endif
1969 
1975 #if !defined DEFAULT_MOTOR_FAULT_SIGNALS_ENABLE || defined __DOXYGEN__
1976 #define DEFAULT_MOTOR_FAULT_SIGNALS_ENABLE 0
1977 #endif
1979 
1985 #if !defined DEFAULT_MOTOR_FAULT_SIGNALS_INVERT || defined __DOXYGEN__
1986 #define DEFAULT_MOTOR_FAULT_SIGNALS_INVERT 0
1987 #endif
1989 
1994 #if !defined DEFAULT_AUTOREPORT_INTERVAL || defined __DOXYGEN__
1995 #define DEFAULT_AUTOREPORT_INTERVAL 0
1996 #endif
1998 
2003 #if !defined DEFAULT_TIMEZONE_OFFSET || defined __DOXYGEN__
2004 #define DEFAULT_TIMEZONE_OFFSET 0.0f
2005 #endif
2007 
2013 #if !defined DEFAULT_NO_UNLOCK_AFTER_ESTOP || defined __DOXYGEN__
2014 #define DEFAULT_NO_UNLOCK_AFTER_ESTOP Off
2015 #endif
2017 
2022 #if !defined DEFAULT_RGB_STRIP0_LENGTH || defined __DOXYGEN__
2023 #define DEFAULT_RGB_STRIP0_LENGTH 0
2024 #endif
2026 
2031 #if !defined DEFAULT_RGB_STRIP1_LENGTH || defined __DOXYGEN__
2032 #define DEFAULT_RGB_STRIP1_LENGTH 0
2033 #endif
2035 
2043 #if !defined DEFAULT_AXIS_ROTARY_WRAP_MASK || defined __DOXYGEN__
2044 #define DEFAULT_AXIS_ROTARY_WRAP_MASK 0
2045 #endif
2047 
2048 // Axis settings (Group_XAxis - Group_VAxis)
2049 
2054 #if !defined DEFAULT_X_STEPS_PER_MM || defined __DOXYGEN__
2055 #define DEFAULT_X_STEPS_PER_MM 250.0f
2056 #endif
2057 #if !defined DEFAULT_Y_STEPS_PER_MM || defined __DOXYGEN__
2058 #define DEFAULT_Y_STEPS_PER_MM 250.0f
2059 #endif
2060 #if !defined DEFAULT_Z_STEPS_PER_MM || defined __DOXYGEN__
2061 #define DEFAULT_Z_STEPS_PER_MM 250.0f
2062 #endif
2063 #if (defined A_AXIS && !defined DEFAULT_A_STEPS_PER_MM) || defined __DOXYGEN__
2064 #define DEFAULT_A_STEPS_PER_MM 250.0f
2065 #endif
2066 #if (defined B_AXIS && !defined DEFAULT_B_STEPS_PER_MM) || defined __DOXYGEN__
2067 #define DEFAULT_B_STEPS_PER_MM 250.0f
2068 #endif
2069 #if (defined C_AXIS && !defined DEFAULT_C_STEPS_PER_MM) || defined __DOXYGEN__
2070 #define DEFAULT_C_STEPS_PER_MM 250.0f
2071 #endif
2072 #if (defined U_AXIS && !defined DEFAULT_U_STEPS_PER_MM) || defined __DOXYGEN__
2073 #define DEFAULT_U_STEPS_PER_MM 250.0f
2074 #endif
2075 #if (defined V_AXIS && !defined DEFAULT_V_STEPS_PER_MM) || defined __DOXYGEN__
2076 #define DEFAULT_V_STEPS_PER_MM 250.0f
2077 #endif
2079 
2084 #if !defined DEFAULT_X_MAX_RATE || defined __DOXYGEN__
2085 #define DEFAULT_X_MAX_RATE 500.0f // mm/min
2086 #endif
2087 #if !defined DEFAULT_Y_MAX_RATE || defined __DOXYGEN__
2088 #define DEFAULT_Y_MAX_RATE 500.0f // mm/min
2089 #endif
2090 #if !defined DEFAULT_Z_MAX_RATE || defined __DOXYGEN__
2091 #define DEFAULT_Z_MAX_RATE 500.0f // mm/min
2092 #endif
2093 #if (defined A_AXIS && !defined DEFAULT_A_MAX_RATE) || defined __DOXYGEN__
2094 #define DEFAULT_A_MAX_RATE 500.0f // mm/min
2095 #endif
2096 #if (defined B_AXIS && !defined DEFAULT_B_MAX_RATE) || defined __DOXYGEN__
2097 #define DEFAULT_B_MAX_RATE 500.0f // mm/min
2098 #endif
2099 #if (defined C_AXIS && !defined DEFAULT_C_MAX_RATE) || defined __DOXYGEN__
2100 #define DEFAULT_C_MAX_RATE 500.0f // mm/min
2101 #endif
2102 #if (defined U_AXIS && !defined DEFAULT_U_MAX_RATE) || defined __DOXYGEN__
2103 #define DEFAULT_U_MAX_RATE 500.0f // mm/min
2104 #endif
2105 #if (defined V_AXIS && !defined DEFAULT_V_MAX_RATE) || defined __DOXYGEN__
2106 #define DEFAULT_V_MAX_RATE 500.0f // mm/min
2107 #endif
2109 
2113 #if !defined DEFAULT_X_ACCELERATION || defined __DOXYGEN__
2114 #define DEFAULT_X_ACCELERATION 10.0f // mm/sec^2
2115 #endif
2116 #if !defined DEFAULT_Y_ACCELERATION || defined __DOXYGEN__
2117 #define DEFAULT_Y_ACCELERATION 10.0f // mm/sec^2
2118 #endif
2119 #if !defined DEFAULT_Z_ACCELERATION || defined __DOXYGEN__
2120 #define DEFAULT_Z_ACCELERATION 10.0f // mm/sec^2
2121 #endif
2122 #if (defined A_AXIS && !defined DEFAULT_A_ACCELERATION) || defined __DOXYGEN__
2123 #define DEFAULT_A_ACCELERATION 10.0f // mm/sec^2
2124 #endif
2125 #if (defined B_AXIS && !defined DEFAULT_B_ACCELERATION) || defined __DOXYGEN__
2126 #define DEFAULT_B_ACCELERATION 10.0f // mm/sec^2
2127 #endif
2128 #if (defined C_AXIS && !defined DEFAULT_C_ACCELERATION) || defined __DOXYGEN__
2129 #define DEFAULT_C_ACCELERATION 10.0f // mm/sec^2
2130 #endif
2131 #if (defined U_AXIS && !defined DEFAULT_U_ACCELERATION) || defined __DOXYGEN__
2132 #define DEFAULT_U_ACCELERATION 10.0f // mm/sec^2
2133 #endif
2134 #if (defined V_AXIS && !defined DEFAULT_V_ACCELERATION) || defined __DOXYGEN__
2135 #define DEFAULT_V_ACCELERATION 10.0f // mm/sec^2
2136 #endif
2138 
2142 #if !defined DEFAULT_X_JERK|| defined __DOXYGEN__
2143 #define DEFAULT_X_JERK 100.0f // mm/sec^3
2144 #endif
2145 #if !defined DEFAULT_Y_JERK|| defined __DOXYGEN__
2146 #define DEFAULT_Y_JERK 100.0f // mm/sec^3
2147 #endif
2148 #if !defined DEFAULT_Z_JERK || defined __DOXYGEN__
2149 #define DEFAULT_Z_JERK 100.0f // mm/sec^3
2150 #endif
2151 #if (defined A_AXIS && !defined DEFAULT_A_JERK) || defined __DOXYGEN__
2152 #define DEFAULT_A_JERK 100.0f // mm/sec^3
2153 #endif
2154 #if (defined B_AXIS && !defined DEFAULT_B_JERK) || defined __DOXYGEN__
2155 #define DEFAULT_B_JERK 100.0f // mm/sec^3
2156 #endif
2157 #if (defined C_AXIS && !defined DEFAULT_C_JERK) || defined __DOXYGEN__
2158 #define DEFAULT_C_JERK 100.0f // mm/sec^3
2159 #endif
2160 #if (defined U_AXIS && !defined DEFAULT_U_JERK) || defined __DOXYGEN__
2161 #define DEFAULT_U_JERK 100.0f // mm/sec^3
2162 #endif
2163 #if (defined V_AXIS && !defined DEFAULT_V_JERK) || defined __DOXYGEN__
2164 #define DEFAULT_V_JERK 100.0f // mm/sec^3
2165 #endif
2167 
2172 #if !defined DEFAULT_X_MAX_TRAVEL || defined __DOXYGEN__
2173 #define DEFAULT_X_MAX_TRAVEL 200.0f // mm
2174 #endif
2175 #if !defined DEFAULT_Y_MAX_TRAVEL || defined __DOXYGEN__
2176 #define DEFAULT_Y_MAX_TRAVEL 200.0f // mm
2177 #endif
2178 #if !defined DEFAULT_Z_MAX_TRAVEL || defined __DOXYGEN__
2179 #define DEFAULT_Z_MAX_TRAVEL 200.0f // mm
2180 #endif
2181 #if (defined A_AXIS && !defined DEFAULT_A_MAX_TRAVEL) || defined __DOXYGEN__
2182 #define DEFAULT_A_MAX_TRAVEL 200.0f // mm
2183 #endif
2184 #if (defined B_AXIS && !defined DEFAULT_B_MAX_TRAVEL) || defined __DOXYGEN__
2185 #define DEFAULT_B_MAX_TRAVEL 200.0f // mm
2186 #endif
2187 #if (defined C_AXIS && !defined DEFAULT_C_MAX_TRAVEL) || defined __DOXYGEN__
2188 #define DEFAULT_C_MAX_TRAVEL 200.0f // mm
2189 #endif
2190 #if (defined U_AXIS && !defined DEFAULT_U_MAX_TRAVEL) || defined __DOXYGEN__
2191 #define DEFAULT_U_MAX_TRAVEL 200.0f // mm
2192 #endif
2193 #if (defined V_AXIS && !defined DEFAULT_V_MAX_TRAVEL) || defined __DOXYGEN__
2194 #define DEFAULT_V_MAX_TRAVEL 200.0f // mm
2195 #endif
2197 
2202 #if !defined DEFAULT_X_CURRENT || defined __DOXYGEN__
2203 #define DEFAULT_X_CURRENT 500.0f // mA RMS
2204 #endif
2205 #if !defined DEFAULT_Y_CURRENT || defined __DOXYGEN__
2206 #define DEFAULT_Y_CURRENT 500.0f // mA RMS
2207 #endif
2208 #if !defined DEFAULT_Z_CURRENT || defined __DOXYGEN__
2209 #define DEFAULT_Z_CURRENT 500.0f // mA RMS
2210 #endif
2211 #if (defined A_AXIS && !defined DEFAULT_A_CURRENT) || defined __DOXYGEN__
2212 #define DEFAULT_A_CURRENT 500.0f // mA RMS
2213 #endif
2214 #if (defined B_AXIS && !defined DEFAULT_B_CURRENT) || defined __DOXYGEN__
2215 #define DEFAULT_B_CURRENT 500.0f // mA RMS
2216 #endif
2217 #if (defined C_AXIS && !defined DEFAULT_C_CURRENT) || defined __DOXYGEN__
2218 #define DEFAULT_C_CURRENT 500.0f // mA RMS
2219 #endif
2220 #if (defined U_AXIS && !defined DEFAULT_U_CURRENT) || defined __DOXYGEN__
2221 #define DEFAULT_U_CURRENT 500.0f // mA RMS
2222 #endif
2223 #if (defined V_AXIS && !defined DEFAULT_V_CURRENT) || defined __DOXYGEN__
2224 #define DEFAULT_V_CURRENT 500.0f // mA RMS
2225 #endif
2227 
2228 // Sanity checks
2229 
2230 // N_TOOLS may have been defined on the compiler command line.
2231 #if !defined(N_TOOLS)
2232 #define N_TOOLS 0
2233 #elif N_TOOLS > 32
2234 #undef N_TOOLS
2235 #define N_TOOLS 32
2236 #endif
2237 
2238 #if N_SYS_SPINDLE > N_SPINDLE
2239 #undef N_SYS_SPINDLE
2240 #define N_SYS_SPINDLE N_SPINDLE
2241 #endif
2242 
2243 #if N_SYS_SPINDLE < 1
2244 #undef N_SYS_SPINDLE
2245 #define N_SYS_SPINDLE 1
2246 #endif
2247 
2248 #if N_SYS_SPINDLE > 8
2249 #undef N_SYS_SPINDLE
2250 #define N_SYS_SPINDLE 8
2251 #endif
2252 
2253 #if NGC_EXPRESSIONS_ENABLE && !NGC_PARAMETERS_ENABLE
2254 #undef NGC_PARAMETERS_ENABLE
2255 #define NGC_PARAMETERS_ENABLE On
2256 #endif
2257 
2258 #if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
2259  #error "WCO busy refresh is less than idle refresh."
2260 #endif
2261 #if (REPORT_OVERRIDE_REFRESH_BUSY_COUNT < REPORT_OVERRIDE_REFRESH_IDLE_COUNT)
2262  #error "Override busy refresh is less than idle refresh."
2263 #endif
2264 #if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
2265  #error "WCO refresh must be greater than one."
2266 #endif
2267 #if (REPORT_OVERRIDE_REFRESH_IDLE_COUNT < 1)
2268  #error "Override refresh must be greater than zero."
2269 #endif
2270 
2271 #if DEFAULT_LASER_MODE && DEFAULT_LATHE_MODE
2272 #error "Cannot enable laser and lathe mode at the same time!"
2273 #endif
2274 
2275 #if LATHE_UVW_OPTION && (N_AXIS > 6 || AXIS_REMAP_ABC2UVW)
2276 #warning "Cannot enable lathe UVW option when N_AXIS > 6 or ABC words are remapped!"
2277 #undef LATHE_UVW_OPTION
2278 #define LATHE_UVW_OPTION Off
2279 #endif
2280 
2281 #if DEFAULT_CONTROL_SIGNALS_INVERT_MASK < 0
2282 #undef DEFAULT_CONTROL_SIGNALS_INVERT_MASK
2283 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK SIGNALS_BITMASK
2284 #endif
2285 
2286 #if DEFAULT_LIMIT_SIGNALS_INVERT_MASK < 0
2287 #undef DEFAULT_LIMIT_SIGNALS_INVERT_MASK
2288 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK AXES_BITMASK
2289 #endif
2290 
2291 #if DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK < 0
2292 #undef DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK
2293 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK AXES_BITMASK
2294 #endif
2295 
2296 #if DEFAULT_STEP_SIGNALS_INVERT_MASK < 0
2297 #undef DEFAULT_STEP_SIGNALS_INVERT_MASK
2298 #define DEFAULT_STEP_SIGNALS_INVERT_MASK AXES_BITMASK
2299 #endif
2300 
2301 #if DEFAULT_ENABLE_SIGNALS_INVERT_MASK < 0
2302 #undef DEFAULT_ENABLE_SIGNALS_INVERT_MASK
2303 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
2304 #endif
2305 
2306 #if DEFAULT_SPINDLE_ON_DELAY
2307 #if DEFAULT_SPINDLE_ON_DELAY < 500
2308 #undef DEFAULT_SPINDLE_ON_DELAY
2309 #define DEFAULT_SPINDLE_ON_DELAY 500
2310 #elif DEFAULT_SPINDLE_ON_DELAY > 20000
2311 #undef DEFAULT_SPINDLE_ON_DELAY
2312 #define DEFAULT_SPINDLE_ON_DELAY 20000
2313 #endif
2314 #endif
2315 
2316 #if DEFAULT_COOLANT_ON_DELAY
2317 #if DEFAULT_COOLANT_ON_DELAY < 500
2318 #undef DEFAULT_COOLANT_ON_DELAY
2319 #define DEFAULT_COOLANT_ON_DELAY 500
2320 #elif DEFAULT_COOLANT_ON_DELAY > 20000
2321 #undef DEFAULT_COOLANT_ON_DELAY
2322 #define DEFAULT_COOLANT_ON_DELAY 20000
2323 #endif
2324 #endif
2325 
2326 #if DEFAULT_PARKING_ENABLE > 0
2327  #if DEFAULT_HOMING_FORCE_SET_ORIGIN > 0
2328  #error "DEFAULT_HOMING_FORCE_SET_ORIGIN is not supported with DEFAULT_PARKING_ENABLE at this time."
2329  #endif
2330 #endif
2331 
2332 #if DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL > 0
2333  #if DEFAULT_PARKING_ENABLE < 1
2334  #error "DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL must be enabled with DEFAULT_PARKING_ENABLE."
2335  #endif
2336 #endif
2337 
2392 #endif // _GRBL_CONFIG_H_