grblHAL core  20250514
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 SPINDLE_SYNC_ENABLE || defined __DOXYGEN__
533 #define SPINDLE_SYNC_ENABLE Off
534 #endif
535 
542 #if !defined NGC_EXPRESSIONS_ENABLE || defined __DOXYGEN__
543 #define NGC_EXPRESSIONS_ENABLE Off
544 #endif
545 
550 #if !defined NGC_PARAMETERS_ENABLE || defined __DOXYGEN__
551 #define NGC_PARAMETERS_ENABLE On
552 #endif
553 
558 #if (NGC_EXPRESSIONS_ENABLE && !defined NGC_N_ASSIGN_PARAMETERS_PER_BLOCK) || defined __DOXYGEN__
559 #define NGC_N_ASSIGN_PARAMETERS_PER_BLOCK 10
560 #endif
561 
566 #if !defined LATHE_UVW_OPTION || defined __DOXYGEN__
567 #define LATHE_UVW_OPTION Off
568 #endif
569 
570 // Max number of entries in log for PID data reporting, to be used for tuning
571 //#define PID_LOG 1000 // Default disabled. Uncomment to enable.
572 
573 // End compile time only default configuration
574 
575 // ---------------------------------------------------------------------------------------
576 // SETTINGS DEFAULT VALUE OVERRIDES:
577 
578 // General settings (Group_General)
579 
589 
594 #if !defined DEFAULT_REPORT_MACHINE_POSITION || defined __DOXYGEN__
595 #define DEFAULT_REPORT_MACHINE_POSITION On // Default on. Set to \ref Off or 0 to disable.
596 #endif
597 
603 #if !defined DEFAULT_REPORT_BUFFER_STATE || defined __DOXYGEN__
604 #define DEFAULT_REPORT_BUFFER_STATE On // Default on. Set to \ref Off or 0 to disable.
605 #endif
606 
614 #if !defined DEFAULT_REPORT_LINE_NUMBERS || defined __DOXYGEN__
615 #define DEFAULT_REPORT_LINE_NUMBERS On // Default on. Set to \ref Off or 0 to disable.
616 #endif
617 
624 #if !defined DEFAULT_REPORT_CURRENT_FEED_SPEED || defined __DOXYGEN__
625 #define DEFAULT_REPORT_CURRENT_FEED_SPEED On // Default on. Set to \ref Off or 0 to disable.
626 #endif
627 
634 #if !defined DEFAULT_REPORT_PIN_STATE || defined __DOXYGEN__
635 #define DEFAULT_REPORT_PIN_STATE On // Default on. Set to \ref Off or 0 to disable.
636 #endif
637 
644 #if !defined DEFAULT_REPORT_WORK_COORD_OFFSET || defined __DOXYGEN__
645 #define DEFAULT_REPORT_WORK_COORD_OFFSET On // Default on. Set to \ref Off or 0 to disable.
646 #endif
647 
654 #if !defined DEFAULT_REPORT_OVERRIDES || defined __DOXYGEN__
655 #define DEFAULT_REPORT_OVERRIDES On // Default on. Set to \ref Off or 0 to disable.
656 #endif
657 
665 #if !defined DEFAULT_REPORT_PROBE_COORDINATES || defined __DOXYGEN__
666 #define DEFAULT_REPORT_PROBE_COORDINATES On // Default on. Set to \ref Off or 0 to disable.
667 #endif
668 
679 #if !defined DEFAULT_REPORT_SYNC_ON_WCO_CHANGE || defined __DOXYGEN__
680 #define DEFAULT_REPORT_SYNC_ON_WCO_CHANGE On
681 #endif
682 
690 #if !defined DEFAULT_REPORT_PARSER_STATE || defined __DOXYGEN__
691 #define DEFAULT_REPORT_PARSER_STATE Off // Default off. Set to \ref On or 1 to enable.
692 #endif
693 
704 #if !defined DEFAULT_REPORT_ALARM_SUBSTATE || defined __DOXYGEN__
705 #define DEFAULT_REPORT_ALARM_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
706 #endif
707 
717 #if !defined DEFAULT_REPORT_RUN_SUBSTATE || defined __DOXYGEN__
718 #define DEFAULT_REPORT_RUN_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
719 #endif
720 
727 #if !defined DEFAULT_REPORT_WHEN_HOMING || defined __DOXYGEN__
728 #define DEFAULT_REPORT_WHEN_HOMING Off // Default off. Set to \ref On or 1 to enable.
729 #endif
730 
732 
737 #if !defined DEFAULT_JUNCTION_DEVIATION || defined __DOXYGEN__
738 #define DEFAULT_JUNCTION_DEVIATION 0.01f // mm
739 #endif
741 
746 #if !defined DEFAULT_ARC_TOLERANCE || defined __DOXYGEN__
747 #define DEFAULT_ARC_TOLERANCE 0.002f // mm
748 #endif
750 
756 #if !defined DEFAULT_REPORT_INCHES || defined __DOXYGEN__
757 #define DEFAULT_REPORT_INCHES Off
758 #endif
760 
766 #if !defined DEFAULT_G73_RETRACT || defined __DOXYGEN__
767 #define DEFAULT_G73_RETRACT 0.1f // mm
768 #endif
770 
775 #if !defined DEFAULT_LASER_MODE || defined __DOXYGEN__
776 #define DEFAULT_LASER_MODE Off
777 #endif
778 #if !defined DEFAULT_LATHE_MODE || defined __DOXYGEN__
779 #define DEFAULT_LATHE_MODE Off
780 #endif
782 
792 #if !defined DEFAULT_LEGACY_RTCOMMANDS || defined __DOXYGEN__
793 #define DEFAULT_LEGACY_RTCOMMANDS On
794 #endif
796 
800 #if !defined DEFAULT_RESET_OVERRIDES || defined __DOXYGEN__
801 #define DEFAULT_RESET_OVERRIDES Off
802 #endif
804 
808 #if !defined DEFAULT_SLEEP_ENABLE || defined __DOXYGEN__
809 #define DEFAULT_SLEEP_ENABLE Off
810 #endif
812 
820 #if !defined DEFAULT_DISABLE_LASER_DURING_HOLD || defined __DOXYGEN__
821 #define DEFAULT_DISABLE_LASER_DURING_HOLD On
822 #endif
824 
830 #if !defined DEFAULT_RESTORE_AFTER_FEED_HOLD || defined __DOXYGEN__
831 #define DEFAULT_RESTORE_AFTER_FEED_HOLD On
832 #endif
834 
844 #if !defined DEFAULT_FORCE_INITIALIZATION_ALARM || defined __DOXYGEN__
845 #define DEFAULT_FORCE_INITIALIZATION_ALARM Off
846 #endif
848 
855 #if !defined DEFAULT_DISABLE_G92_PERSISTENCE || defined __DOXYGEN__
856 #if COMPATIBILITY_LEVEL <= 1
857 #define DEFAULT_DISABLE_G92_PERSISTENCE Off
858 #else
859 #define DEFAULT_DISABLE_G92_PERSISTENCE On
860 #endif
861 #endif
863 
872 #if !defined DEFAULT_PLANNER_BUFFER_BLOCKS || defined __DOXYGEN__
873 #define DEFAULT_PLANNER_BUFFER_BLOCKS 100
874 #endif
876 
886 #if !defined DEFAULT_HOMING_KEEP_STATUS_ON_RESET || defined __DOXYGEN__
887 #define DEFAULT_HOMING_KEEP_STATUS_ON_RESET Off // Default disabled. Set to \ref On or 1 to enable.
888 #endif
890 
897 #if !defined DEFAULT_KEEP_OFFSETS_ON_RESET || defined __DOXYGEN__
898 #define DEFAULT_KEEP_OFFSETS_ON_RESET Off
899 #endif
901 
902 // Control signals settings (Group_ControlSignals)
903 
904 #ifndef __DOXYGEN__ // For now do not include in documentation
905 
911 #define SIGNALS_RESET_BIT (1<<0)
912 #define SIGNALS_FEEDHOLD_BIT (1<<1)
913 #define SIGNALS_CYCLESTART_BIT (1<<2)
914 #define SIGNALS_SAFETYDOOR_BIT (1<<3)
915 #define SIGNALS_BLOCKDELETE_BIT (1<<4)
916 #define SIGNALS_STOPDISABLE_BIT (1<<5)
917 #define SIGNALS_ESTOP_BIT (1<<6)
918 #define SIGNALS_PROBE_CONNECTED_BIT (1<<7)
919 #define SIGNALS_MOTOR_FAULT_BIT (1<<8)
920 #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)
922 
923 #endif
924 
931 #if !defined DEFAULT_CONTROL_SIGNALS_INVERT_MASK || defined __DOXYGEN__
932 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
933 #endif
935 
950 #if !defined DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK || defined __DOXYGEN__
951 #define DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
952 #endif
954 
955 // Limits settings (Group_Limits)
956 
965 #if !defined DEFAULT_LIMIT_SIGNALS_INVERT_MASK || defined __DOXYGEN__
966 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
967 #endif
969 
977 #if !defined DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK || defined __DOXYGEN__
978 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK 0 // Set to -1 or AXES_BITMASK to disable pullup for all axes
979 #endif
981 
985 #if !defined DEFAULT_SOFT_LIMIT_ENABLE || defined __DOXYGEN__
986 #define DEFAULT_SOFT_LIMIT_ENABLE Off
987 #endif
989 
993 
1000 #if !defined DEFAULT_HARD_LIMIT_ENABLE || defined __DOXYGEN__
1001 #define DEFAULT_HARD_LIMIT_ENABLE Off
1002 #endif
1003 #if !defined DEFAULT_CHECK_LIMITS_AT_INIT || defined __DOXYGEN__
1004 #define DEFAULT_CHECK_LIMITS_AT_INIT Off
1005 #endif
1006 #if !defined DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY || defined __DOXYGEN__
1007 #define DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY Off
1008 #endif
1009 
1022 
1025 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT || defined __DOXYGEN__
1026 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT 5.0f // Float (percent)
1027 #endif
1029 
1033 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN || defined __DOXYGEN__
1034 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN 2.5f // Float (mm)
1035 #endif
1037 
1042 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX || defined __DOXYGEN__
1043 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX 25.0f // Float (mm)
1044 #endif
1046 
1047 // Coolant settings (Group_Coolant)
1048 
1054 #if !defined DEFAULT_INVERT_COOLANT_FLOOD_PIN || defined __DOXYGEN__
1055 #define DEFAULT_INVERT_COOLANT_FLOOD_PIN Off
1056 #endif
1057 #if !defined DEFAULT_INVERT_COOLANT_MIST_PIN || defined __DOXYGEN__
1058 #define DEFAULT_INVERT_COOLANT_MIST_PIN Off // NOTE: not supported by all drivers.
1059 #endif
1061 
1065 #if !defined DEFAULT_COOLANT_ON_DELAY || defined __DOXYGEN__
1066 #define DEFAULT_COOLANT_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1067 #endif
1069 
1070 // Spindle settings (Group_Spindle)
1071 
1075 #if !defined DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED || defined __DOXYGEN__
1076 #define DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED Off
1077 #endif
1078 #if !defined DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE || defined __DOXYGEN__
1079 #define DEFAULT_PWM_SPINDLE_DISABLE_LASER_MODE Off
1080 #endif
1082 
1087 #if !defined DEFAULT_INVERT_SPINDLE_ENABLE_PIN || defined __DOXYGEN__
1088 #define DEFAULT_INVERT_SPINDLE_ENABLE_PIN Off
1089 #endif
1090 #if !defined DEFAULT_INVERT_SPINDLE_CCW_PIN || defined __DOXYGEN__
1091 #define DEFAULT_INVERT_SPINDLE_CCW_PIN Off // NOTE: not supported by all drivers.
1092 #endif
1093 #if !defined DEFAULT_INVERT_SPINDLE_PWM_PIN || defined __DOXYGEN__
1094 #define DEFAULT_INVERT_SPINDLE_PWM_PIN Off // NOTE: not supported by all drivers.
1095 #endif
1097 
1101 #if !defined DEFAULT_SPINDLE_RPM_MAX || defined __DOXYGEN__
1102 #define DEFAULT_SPINDLE_RPM_MAX 1000.0f // rpm
1103 #endif
1105 
1109 #if !defined DEFAULT_SPINDLE_RPM_MIN || defined __DOXYGEN__
1110 #define DEFAULT_SPINDLE_RPM_MIN 0.0f // rpm
1111 #endif
1113 
1117 #if !defined DEFAULT_SPINDLE_PWM_FREQ || defined __DOXYGEN__
1118 #define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
1119 #endif
1121 
1125 #if !defined DEFAULT_SPINDLE_PWM_OFF_VALUE || defined __DOXYGEN__
1126 #define DEFAULT_SPINDLE_PWM_OFF_VALUE 0.0f // Percent
1127 #endif
1129 
1142 #if !defined DEFAULT_SPINDLE_PWM_MIN_VALUE || defined __DOXYGEN__
1143 #define DEFAULT_SPINDLE_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1144 #endif
1146 
1150 #if !defined DEFAULT_SPINDLE_PWM_MAX_VALUE || defined __DOXYGEN__
1151 #define DEFAULT_SPINDLE_PWM_MAX_VALUE 100.0f // Percent
1152 #endif
1154 
1163 #if !defined DEFAULT_SPINDLE_PPR || defined __DOXYGEN__
1164 #define DEFAULT_SPINDLE_PPR 0 // Pulses per revolution.
1165 #endif
1167 
1171 #if !defined DEFAULT_SPINDLE_AT_SPEED_TOLERANCE || defined __DOXYGEN__
1172 #define DEFAULT_SPINDLE_AT_SPEED_TOLERANCE 0.0f // Percent - 0 means not checked
1173 #endif
1175 
1179 #if !defined DEFAULT_SPINDLE_ON_DELAY || defined __DOXYGEN__
1180 #define DEFAULT_SPINDLE_ON_DELAY 0 // milliseconds: 0 or 500 - 20000
1181 #endif
1183 
1187 #if !defined DEFAULT_SPINDLE || defined __DOXYGEN__
1188 #define DEFAULT_SPINDLE SPINDLE_PWM0 // Spindle number from spindle_control.h
1189 #endif
1191 
1195 #if !defined DEFAULT_SPINDLE_OFF_DELAY || defined __DOXYGEN__
1196 #define DEFAULT_SPINDLE_OFF_DELAY 0 // milliseconds: 0 or 500 - 20000
1197 #endif
1199 
1200 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1201 
1202 // $9 - Setting_SpindlePWMOptions
1203 // bit 0
1204 // always defaults to on
1205 // bit 1
1206 
1207 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1208 
1209 #ifndef DEFAULT_SPINDLE_P_GAIN
1210 #define DEFAULT_SPINDLE_P_GAIN 1.0f
1211 #endif
1212 #ifndef DEFAULT_SPINDLE_I_GAIN
1213 #define DEFAULT_SPINDLE_I_GAIN 0.01f
1214 #endif
1215 #ifndef DEFAULT_SPINDLE_D_GAIN
1216 #define DEFAULT_SPINDLE_D_GAIN 0.0f
1217 #endif
1218 #ifndef DEFAULT_SPINDLE_I_MAX
1219 #define DEFAULT_SPINDLE_I_MAX 10.0f
1220 #endif
1221 
1222 #if ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
1223 
1228 #if !defined DEFAULT_RPM_POINT01 || defined __DOXYGEN__
1229 #define DEFAULT_RPM_POINT01 NAN // DEFAULT_SPINDLE_RPM_MIN // Replace NAN with DEFAULT_SPINDLE_RPM_MIN to enable.
1230 #endif
1231 #if !defined DEFAULT_RPM_LINE_A1 || defined __DOXYGEN__
1232 #define DEFAULT_RPM_LINE_A1 3.197101e-03f
1233 #endif
1234 #if !defined DEFAULT_RPM_LINE_B1 || defined __DOXYGEN__
1235 #define DEFAULT_RPM_LINE_B1 -3.526076e-1f
1236 #endif
1238 
1243 #if !defined DEFAULT_RPM_POINT12 || defined __DOXYGEN__
1244 #define DEFAULT_RPM_POINT12 NAN // Change NAN to a float constant to enable.
1245 #endif
1246 #if !defined DEFAULT_RPM_LINE_A2 || defined __DOXYGEN__
1247 #define DEFAULT_RPM_LINE_A2 1.722950e-2f
1248 #endif
1249 #if !defined DEFAULT_RPM_LINE_B2 || defined __DOXYGEN__
1250 #define DEFAULT_RPM_LINE_B2 1.0f,
1251 #endif
1253 
1258 #if !defined DEFAULT_RPM_POINT23 || defined __DOXYGEN__
1259 #define DEFAULT_RPM_POINT23 NAN // Change NAN to a float constant to enable.
1260 #endif
1261 #if !defined DEFAULT_RPM_LINE_A3 || defined __DOXYGEN__
1262 #define DEFAULT_RPM_LINE_A3 5.901518e-02f
1263 #endif
1264 #if !defined DEFAULT_RPM_LINE_B3 || defined __DOXYGEN__
1265 #define DEFAULT_RPM_LINE_B3 4.881851e+02f
1266 #endif
1268 
1273 #if !defined DEFAULT_RPM_POINT34 || defined __DOXYGEN__
1274 #define DEFAULT_RPM_POINT34 NAN // Change NAN to a float constant to enable.
1275 #endif
1276 #if !defined DEFAULT_RPM_LINE_A4 || defined __DOXYGEN__
1277 #define DEFAULT_RPM_LINE_A4 1.203413e-01f
1278 #endif
1279 #if !defined DEFAULT_RPM_LINE_B4 || defined __DOXYGEN__
1280 #define DEFAULT_RPM_LINE_B4 1.151360e+03f
1281 #endif
1283 
1284 #endif // ENABLE_SPINDLE_LINEARIZATION
1285 
1286 // Settings for second PWM spindle
1287 
1292 #if !defined DEFAULT_INVERT_SPINDLE1_ENABLE_PIN || defined __DOXYGEN__
1293 #define DEFAULT_INVERT_SPINDLE1_ENABLE_PIN Off
1294 #endif
1295 #if !defined DEFAULT_INVERT_SPINDLE1_CCW_PIN || defined __DOXYGEN__
1296 #define DEFAULT_INVERT_SPINDLE1_CCW_PIN Off // NOTE: not supported by all drivers.
1297 #endif
1298 #if !defined DEFAULT_INVERT_SPINDLE1_PWM_PIN || defined __DOXYGEN__
1299 #define DEFAULT_INVERT_SPINDLE1_PWM_PIN Off // NOTE: not supported by all drivers.
1300 #endif
1302 
1306 #if !defined DEFAULT_SPINDLE1_RPM_MAX || defined __DOXYGEN__
1307 #define DEFAULT_SPINDLE1_RPM_MAX 1000.0f // rpm
1308 #endif
1310 
1314 #if !defined DEFAULT_SPINDLE1_RPM_MIN || defined __DOXYGEN__
1315 #define DEFAULT_SPINDLE1_RPM_MIN 0.0f // rpm
1316 #endif
1318 
1322 #if !defined DEFAULT_SPINDLE1_PWM_FREQ || defined __DOXYGEN__
1323 #define DEFAULT_SPINDLE1_PWM_FREQ 5000 // Hz
1324 #endif
1326 
1330 #if !defined DEFAULT_SPINDLE1_PWM_OFF_VALUE || defined __DOXYGEN__
1331 #define DEFAULT_SPINDLE1_PWM_OFF_VALUE 0.0f // Percent
1332 #endif
1334 
1347 #if !defined DEFAULT_SPINDLE1_PWM_MIN_VALUE || defined __DOXYGEN__
1348 #define DEFAULT_SPINDLE1_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1349 #endif
1351 
1355 #if !defined DEFAULT_SPINDLE1_PWM_MAX_VALUE || defined __DOXYGEN__
1356 #define DEFAULT_SPINDLE1_PWM_MAX_VALUE 100.0f // Percent
1357 #endif
1359 
1360 
1361 // Tool change settings (Group_Toolchange)
1362 
1367 #if !defined DEFAULT_TOOLCHANGE_MODE || defined __DOXYGEN__
1368 #define DEFAULT_TOOLCHANGE_MODE 0
1369 #endif
1371 
1375 #if !defined DEFAULT_TOOLCHANGE_PROBING_DISTANCE || defined __DOXYGEN__
1376 #define DEFAULT_TOOLCHANGE_PROBING_DISTANCE 30 // max probing distance in mm for mode 3
1377 #endif
1379 
1383 #if !defined DEFAULT_TOOLCHANGE_FEED_RATE || defined __DOXYGEN__
1384 #define DEFAULT_TOOLCHANGE_FEED_RATE 25.0f // mm/min
1385 #endif
1387 
1392 #if !defined DEFAULT_TOOLCHANGE_SEEK_RATE || defined __DOXYGEN__
1393 #define DEFAULT_TOOLCHANGE_SEEK_RATE 200.0f // mm/min
1394 #endif
1396 
1400 #if !defined DEFAULT_TOOLCHANGE_PULLOFF_RATE || defined __DOXYGEN__
1401 #define DEFAULT_TOOLCHANGE_PULLOFF_RATE 200.0f // mm/min
1402 #endif
1404 
1408 #if !defined DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION || defined __DOXYGEN__
1409 #define DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION Off
1410 #endif
1411 #if !defined DEFAULT_TOOLCHANGE_AT_G30 || defined __DOXYGEN__
1412 #define DEFAULT_TOOLCHANGE_AT_G30 Off
1413 #endif
1414 #if !defined DEFAULT_TOOLCHANGE_FAST_PROBE_PULLOFF || defined __DOXYGEN__
1415 #define DEFAULT_TOOLCHANGE_FAST_PROBE_PULLOFF Off
1416 #endif
1418 
1419 // Homing settings (Group_Homing)
1420 
1427 #if !defined DEFAULT_HOMING_ENABLE || defined __DOXYGEN__
1428 #define DEFAULT_HOMING_ENABLE Off // Default disabled. Set to \ref On or 1 to enable.
1429 #endif
1430 
1438 #if !defined DEFAULT_HOMING_SINGLE_AXIS_COMMANDS || defined __DOXYGEN__
1439 #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS Off // Default disabled. Set to \ref On or 1 to enable.
1440 #endif
1441 
1449 #if !defined DEFAULT_HOMING_INIT_LOCK || defined __DOXYGEN__
1450 #define DEFAULT_HOMING_INIT_LOCK Off // Default disabled. Set to \ref On or 1 to enable.
1451 #endif
1452 
1460 #if !defined DEFAULT_HOMING_FORCE_SET_ORIGIN || defined __DOXYGEN__
1461 #define DEFAULT_HOMING_FORCE_SET_ORIGIN Off // Default disabled. Set to \ref On or 1 to enable.
1462 #endif
1463 
1474 #if !defined DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES || defined __DOXYGEN__
1475 #define DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES Off // Default disabled. Set to \ref On or 1 to enable.
1476 #endif
1478 
1485 #if !defined DEFAULT_HOMING_ALLOW_MANUAL || defined __DOXYGEN__
1486 #define DEFAULT_HOMING_ALLOW_MANUAL Off // Default disabled. Set to \ref On or 1 to enable.
1487 #endif
1488 
1495 #if !defined DEFAULT_HOMING_OVERRIDE_LOCKS || defined __DOXYGEN__
1496 #define DEFAULT_HOMING_OVERRIDE_LOCKS Off // Default disabled. Set to \ref On or 1 to enable.
1497 #endif
1498 
1504 #if !defined DEFAULT_HOMING_USE_LIMIT_SWITCHES || defined __DOXYGEN__
1505 #define DEFAULT_HOMING_USE_LIMIT_SWITCHES Off // Default disabled. Set to \ref On or 1 to enable.
1506 #endif
1508 
1514 #if !defined DEFAULT_HOMING_DIR_MASK || defined __DOXYGEN__
1515 #define DEFAULT_HOMING_DIR_MASK 0
1516 #endif
1518 
1522 #if !defined DEFAULT_HOMING_FEED_RATE || defined __DOXYGEN__
1523 #define DEFAULT_HOMING_FEED_RATE 25.0f // mm/min
1524 #endif
1526 
1530 #if !defined DEFAULT_HOMING_SEEK_RATE || defined __DOXYGEN__
1531 #define DEFAULT_HOMING_SEEK_RATE 500.0f // mm/min
1532 #endif
1534 
1538 #if !defined DEFAULT_HOMING_DEBOUNCE_DELAY || defined __DOXYGEN__
1539 #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
1540 #endif
1542 
1546 #if !defined DEFAULT_HOMING_PULLOFF || defined __DOXYGEN__
1547 #define DEFAULT_HOMING_PULLOFF 1.0f // mm
1548 #endif
1550 
1557 #if !defined DEFAULT_N_HOMING_LOCATE_CYCLE || defined __DOXYGEN__
1558 #define DEFAULT_N_HOMING_LOCATE_CYCLE 1 // Integer (1-127)
1559 #endif
1561 
1583 #if !defined DEFAULT_HOMING_CYCLE_0 || defined __DOXYGEN__
1584 #define DEFAULT_HOMING_CYCLE_0 (Z_AXIS_BIT) // REQUIRED: First move Z to clear workspace.
1585 #endif
1587 
1591 #if !defined DEFAULT_HOMING_CYCLE_1 || defined __DOXYGEN__
1592 #if COREXY
1593 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT) // OPTIONAL: Then move X.
1594 #else
1595 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT|Y_AXIS_BIT) // OPTIONAL: Then move X,Y at the same time.
1596 #endif
1597 #endif
1599 
1603 #if !defined DEFAULT_HOMING_CYCLE_2 || defined __DOXYGEN__
1604 #if COREXY
1605 #define DEFAULT_HOMING_CYCLE_2 (Y_AXIS_BIT) // OPTIONAL: Then move Y.
1606 #else
1607 #define DEFAULT_HOMING_CYCLE_2 0 // OPTIONAL: Uncomment and add axes mask to enable
1608 #endif
1609 #endif
1611 
1615 #if (defined A_AXIS && !defined DEFAULT_HOMING_CYCLE_3) || defined __DOXYGEN__
1616 #define DEFAULT_HOMING_CYCLE_3 0 // OPTIONAL: Uncomment and add axes mask to enable
1617 #endif
1619 
1624 #if (defined B_AXIS && !defined DEFAULT_HOMING_CYCLE_4) || defined __DOXYGEN__
1625 #define DEFAULT_HOMING_CYCLE_4 0 // OPTIONAL: Uncomment and add axes mask to enable
1626 #endif
1628 
1632 #if (defined C_AXIS && !defined DEFAULT_HOMING_CYCLE_5) || defined __DOXYGEN__
1633 #define DEFAULT_HOMING_CYCLE_5 0 // OPTIONAL: Uncomment and add axes mask to enable
1634 #endif
1636 
1645 #if !defined DEFAULT_HOME_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1646 #define DEFAULT_HOME_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
1647 #endif
1649 
1650 
1651 // Probing settings (Group_Probing)
1652 
1656 #if !defined DEFAULT_PROBE_SIGNAL_INVERT || defined __DOXYGEN__
1657 #define DEFAULT_PROBE_SIGNAL_INVERT Off
1658 #endif
1659 #if !defined DEFAULT_TOOLSETTER_SIGNAL_INVERT || defined __DOXYGEN__
1660 #define DEFAULT_TOOLSETTER_SIGNAL_INVERT Off
1661 #endif
1663 
1667 #if !defined DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1668 #define DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP Off
1669 #endif
1670 #if !defined DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1671 #define DEFAULT_TOOLSETTER_SIGNAL_DISABLE_PULLUP Off
1672 #endif
1674 
1683 #if !defined DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES || defined __DOXYGEN__
1684 #define DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES Off
1685 #endif
1686 #if !defined DEFAULT_SOFT_LIMIT_PROBE_CYCLES || defined __DOXYGEN__
1687 #define DEFAULT_SOFT_LIMIT_PROBE_CYCLES Off
1688 #endif
1690 
1691 // Safety door/parking settings (Group_SafetyDoor)
1692 
1693 #ifdef DEFAULT_HOMING_ENABLE
1694 
1712 #if !defined DEFAULT_PARKING_ENABLE || defined __DOXYGEN__
1713 #define DEFAULT_PARKING_ENABLE Off // bit 0
1714 // Enables a special set of M-code commands that enables and disables the parking motion.
1715 // These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to disable.
1716 // The command is modal and will be set after a planner sync. Since it is g-code, it is
1717 // executed in sync with g-code commands. It is not a real-time command.
1718 // NOTE: PARKING_ENABLE is required. By default, M56 is active upon initialization. Use
1719 // DEACTIVATE_PARKING_UPON_INIT to set M56 P0 as the power-up default.
1720 #endif
1721 #if !defined DEFAULT_DEACTIVATE_PARKING_UPON_INIT || defined __DOXYGEN__
1722 #define DEFAULT_DEACTIVATE_PARKING_UPON_INIT Off // bit 1
1723 #endif
1724 #if !defined DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL || defined __DOXYGEN__
1725 #define DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL Off // bit 2
1726 #endif
1728 
1733 #if !defined DEFAULT_PARKING_AXIS || defined __DOXYGEN__
1734 #define DEFAULT_PARKING_AXIS Z_AXIS //
1735 #endif
1737 
1741 #if !defined DEFAULT_PARKING_PULLOUT_INCREMENT || defined __DOXYGEN__
1742 #define DEFAULT_PARKING_PULLOUT_INCREMENT 5.0f //
1743 #endif
1745 
1750 #if !defined DEFAULT_PARKING_PULLOUT_RATE || defined __DOXYGEN__
1751 #define DEFAULT_PARKING_PULLOUT_RATE 100.0f // mm/min.
1752 #endif
1754 
1759 #if !defined DEFAULT_PARKING_TARGET || defined __DOXYGEN__
1760 #define DEFAULT_PARKING_TARGET -5.0f // mm
1761 #endif
1763 
1768 #if !defined DEFAULT_PARKING_RATE || defined __DOXYGEN__
1769 #define DEFAULT_PARKING_RATE 500.0f // mm/min
1770 #endif
1772 
1776 
1781 #if !defined DEFAULT_DOOR_IGNORE_WHEN_IDLE || defined __DOXYGEN__
1782 #define DEFAULT_DOOR_IGNORE_WHEN_IDLE Off
1783 #endif
1788 #if !defined DEFAULT_DOOR_KEEP_COOLANT_ON || defined __DOXYGEN__
1789 #define DEFAULT_DOOR_KEEP_COOLANT_ON Off
1790 #endif
1792 
1798 #if !defined DEFAULT_SAFETY_DOOR_SPINDLE_DELAY || defined __DOXYGEN__
1799 #define DEFAULT_SAFETY_DOOR_SPINDLE_DELAY 4.0f // Float (seconds)
1800 #endif
1802 
1809 #if !defined DEFAULT_SAFETY_DOOR_COOLANT_DELAY || defined __DOXYGEN__
1810 #define DEFAULT_SAFETY_DOOR_COOLANT_DELAY 1.0f // Float (seconds)
1811 #endif
1813 
1814 #endif // DEFAULT_HOMING_ENABLE
1815 
1816 // Jogging settings (Group_Jogging)
1817 
1825 #if !defined DEFAULT_JOG_LIMIT_ENABLE || defined __DOXYGEN__
1826 #define DEFAULT_JOG_LIMIT_ENABLE Off
1827 #endif
1829 
1830 // Stepper settings (Group_Stepper)
1831 
1844 #if !defined DEFAULT_STEP_PULSE_MICROSECONDS || defined __DOXYGEN__
1845 #define DEFAULT_STEP_PULSE_MICROSECONDS 5.0f
1846 #endif
1848 
1857 #if !defined DEFAULT_STEPPER_IDLE_LOCK_TIME || defined __DOXYGEN__
1858 #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // milliseconds
1859 #endif
1861 
1867 #if !defined DEFAULT_STEP_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1868 #define DEFAULT_STEP_SIGNALS_INVERT_MASK 0
1869 #endif
1871 
1877 #if !defined DEFAULT_DIR_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1878 #define DEFAULT_DIR_SIGNALS_INVERT_MASK 0
1879 #endif
1881 
1894 #if !defined DEFAULT_ENABLE_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1895 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
1896 #endif
1898 
1904 #if !defined DEFAULT_GANGED_DIRECTION_INVERT_MASK || defined __DOXYGEN__
1905 #define DEFAULT_GANGED_DIRECTION_INVERT_MASK 0
1906 #endif
1908 
1912 #if !defined DEFAULT_STEP_PULSE_DELAY || defined __DOXYGEN__
1913 #define DEFAULT_STEP_PULSE_DELAY 0.0f
1914 #endif
1916 
1923 #if !defined DEFAULT_STEPPER_DEENERGIZE_MASK || defined __DOXYGEN__
1924 #define DEFAULT_STEPPER_DEENERGIZE_MASK 0
1925 #endif
1927 
1934 #if !defined DEFAULT_AXIS_ROTATIONAL_MASK || defined __DOXYGEN__
1935 #define DEFAULT_AXIS_ROTATIONAL_MASK 0
1936 #endif
1938 
1944 #if !defined DEFAULT_MOTOR_WARNING_SIGNALS_ENABLE || defined __DOXYGEN__
1945 #define DEFAULT_MOTOR_WARNING_SIGNALS_ENABLE 0
1946 #endif
1948 
1954 #if !defined DEFAULT_MOTOR_WARNING_SIGNALS_INVERT || defined __DOXYGEN__
1955 #define DEFAULT_MOTOR_WARNING_SIGNALS_INVERT 0
1956 #endif
1958 
1964 #if !defined DEFAULT_MOTOR_FAULT_SIGNALS_ENABLE || defined __DOXYGEN__
1965 #define DEFAULT_MOTOR_FAULT_SIGNALS_ENABLE 0
1966 #endif
1968 
1974 #if !defined DEFAULT_MOTOR_FAULT_SIGNALS_INVERT || defined __DOXYGEN__
1975 #define DEFAULT_MOTOR_FAULT_SIGNALS_INVERT 0
1976 #endif
1978 
1983 #if !defined DEFAULT_AUTOREPORT_INTERVAL || defined __DOXYGEN__
1984 #define DEFAULT_AUTOREPORT_INTERVAL 0
1985 #endif
1987 
1992 #if !defined DEFAULT_TIMEZONE_OFFSET || defined __DOXYGEN__
1993 #define DEFAULT_TIMEZONE_OFFSET 0.0f
1994 #endif
1996 
2002 #if !defined DEFAULT_NO_UNLOCK_AFTER_ESTOP || defined __DOXYGEN__
2003 #define DEFAULT_NO_UNLOCK_AFTER_ESTOP Off
2004 #endif
2006 
2011 #if !defined DEFAULT_RGB_STRIP0_LENGTH || defined __DOXYGEN__
2012 #define DEFAULT_RGB_STRIP0_LENGTH 0
2013 #endif
2015 
2020 #if !defined DEFAULT_RGB_STRIP1_LENGTH || defined __DOXYGEN__
2021 #define DEFAULT_RGB_STRIP1_LENGTH 0
2022 #endif
2024 
2032 #if !defined DEFAULT_AXIS_ROTARY_WRAP_MASK || defined __DOXYGEN__
2033 #define DEFAULT_AXIS_ROTARY_WRAP_MASK 0
2034 #endif
2036 
2037 // Axis settings (Group_XAxis - Group_VAxis)
2038 
2043 #if !defined DEFAULT_X_STEPS_PER_MM || defined __DOXYGEN__
2044 #define DEFAULT_X_STEPS_PER_MM 250.0f
2045 #endif
2046 #if !defined DEFAULT_Y_STEPS_PER_MM || defined __DOXYGEN__
2047 #define DEFAULT_Y_STEPS_PER_MM 250.0f
2048 #endif
2049 #if !defined DEFAULT_Z_STEPS_PER_MM || defined __DOXYGEN__
2050 #define DEFAULT_Z_STEPS_PER_MM 250.0f
2051 #endif
2052 #if (defined A_AXIS && !defined DEFAULT_A_STEPS_PER_MM) || defined __DOXYGEN__
2053 #define DEFAULT_A_STEPS_PER_MM 250.0f
2054 #endif
2055 #if (defined B_AXIS && !defined DEFAULT_B_STEPS_PER_MM) || defined __DOXYGEN__
2056 #define DEFAULT_B_STEPS_PER_MM 250.0f
2057 #endif
2058 #if (defined C_AXIS && !defined DEFAULT_C_STEPS_PER_MM) || defined __DOXYGEN__
2059 #define DEFAULT_C_STEPS_PER_MM 250.0f
2060 #endif
2061 #if (defined U_AXIS && !defined DEFAULT_U_STEPS_PER_MM) || defined __DOXYGEN__
2062 #define DEFAULT_U_STEPS_PER_MM 250.0f
2063 #endif
2064 #if (defined V_AXIS && !defined DEFAULT_V_STEPS_PER_MM) || defined __DOXYGEN__
2065 #define DEFAULT_V_STEPS_PER_MM 250.0f
2066 #endif
2068 
2073 #if !defined DEFAULT_X_MAX_RATE || defined __DOXYGEN__
2074 #define DEFAULT_X_MAX_RATE 500.0f // mm/min
2075 #endif
2076 #if !defined DEFAULT_Y_MAX_RATE || defined __DOXYGEN__
2077 #define DEFAULT_Y_MAX_RATE 500.0f // mm/min
2078 #endif
2079 #if !defined DEFAULT_Z_MAX_RATE || defined __DOXYGEN__
2080 #define DEFAULT_Z_MAX_RATE 500.0f // mm/min
2081 #endif
2082 #if (defined A_AXIS && !defined DEFAULT_A_MAX_RATE) || defined __DOXYGEN__
2083 #define DEFAULT_A_MAX_RATE 500.0f // mm/min
2084 #endif
2085 #if (defined B_AXIS && !defined DEFAULT_B_MAX_RATE) || defined __DOXYGEN__
2086 #define DEFAULT_B_MAX_RATE 500.0f // mm/min
2087 #endif
2088 #if (defined C_AXIS && !defined DEFAULT_C_MAX_RATE) || defined __DOXYGEN__
2089 #define DEFAULT_C_MAX_RATE 500.0f // mm/min
2090 #endif
2091 #if (defined U_AXIS && !defined DEFAULT_U_MAX_RATE) || defined __DOXYGEN__
2092 #define DEFAULT_U_MAX_RATE 500.0f // mm/min
2093 #endif
2094 #if (defined V_AXIS && !defined DEFAULT_V_MAX_RATE) || defined __DOXYGEN__
2095 #define DEFAULT_V_MAX_RATE 500.0f // mm/min
2096 #endif
2098 
2102 #if !defined DEFAULT_X_ACCELERATION || defined __DOXYGEN__
2103 #define DEFAULT_X_ACCELERATION 10.0f // mm/sec^2
2104 #endif
2105 #if !defined DEFAULT_Y_ACCELERATION || defined __DOXYGEN__
2106 #define DEFAULT_Y_ACCELERATION 10.0f // mm/sec^2
2107 #endif
2108 #if !defined DEFAULT_Z_ACCELERATION || defined __DOXYGEN__
2109 #define DEFAULT_Z_ACCELERATION 10.0f // mm/sec^2
2110 #endif
2111 #if (defined A_AXIS && !defined DEFAULT_A_ACCELERATION) || defined __DOXYGEN__
2112 #define DEFAULT_A_ACCELERATION 10.0f // mm/sec^2
2113 #endif
2114 #if (defined B_AXIS && !defined DEFAULT_B_ACCELERATION) || defined __DOXYGEN__
2115 #define DEFAULT_B_ACCELERATION 10.0f // mm/sec^2
2116 #endif
2117 #if (defined C_AXIS && !defined DEFAULT_C_ACCELERATION) || defined __DOXYGEN__
2118 #define DEFAULT_C_ACCELERATION 10.0f // mm/sec^2
2119 #endif
2120 #if (defined U_AXIS && !defined DEFAULT_U_ACCELERATION) || defined __DOXYGEN__
2121 #define DEFAULT_U_ACCELERATION 10.0f // mm/sec^2
2122 #endif
2123 #if (defined V_AXIS && !defined DEFAULT_V_ACCELERATION) || defined __DOXYGEN__
2124 #define DEFAULT_V_ACCELERATION 10.0f // mm/sec^2
2125 #endif
2127 
2131 #if !defined DEFAULT_X_JERK|| defined __DOXYGEN__
2132 #define DEFAULT_X_JERK 100.0f // mm/sec^3
2133 #endif
2134 #if !defined DEFAULT_Y_JERK|| defined __DOXYGEN__
2135 #define DEFAULT_Y_JERK 100.0f // mm/sec^3
2136 #endif
2137 #if !defined DEFAULT_Z_JERK || defined __DOXYGEN__
2138 #define DEFAULT_Z_JERK 100.0f // mm/sec^3
2139 #endif
2140 #if (defined A_AXIS && !defined DEFAULT_A_JERK) || defined __DOXYGEN__
2141 #define DEFAULT_A_JERK 100.0f // mm/sec^3
2142 #endif
2143 #if (defined B_AXIS && !defined DEFAULT_B_JERK) || defined __DOXYGEN__
2144 #define DEFAULT_B_JERK 100.0f // mm/sec^3
2145 #endif
2146 #if (defined C_AXIS && !defined DEFAULT_C_JERK) || defined __DOXYGEN__
2147 #define DEFAULT_C_JERK 100.0f // mm/sec^3
2148 #endif
2149 #if (defined U_AXIS && !defined DEFAULT_U_JERK) || defined __DOXYGEN__
2150 #define DEFAULT_U_JERK 100.0f // mm/sec^3
2151 #endif
2152 #if (defined V_AXIS && !defined DEFAULT_V_JERK) || defined __DOXYGEN__
2153 #define DEFAULT_V_JERK 100.0f // mm/sec^3
2154 #endif
2156 
2161 #if !defined DEFAULT_X_MAX_TRAVEL || defined __DOXYGEN__
2162 #define DEFAULT_X_MAX_TRAVEL 200.0f // mm
2163 #endif
2164 #if !defined DEFAULT_Y_MAX_TRAVEL || defined __DOXYGEN__
2165 #define DEFAULT_Y_MAX_TRAVEL 200.0f // mm
2166 #endif
2167 #if !defined DEFAULT_Z_MAX_TRAVEL || defined __DOXYGEN__
2168 #define DEFAULT_Z_MAX_TRAVEL 200.0f // mm
2169 #endif
2170 #if (defined A_AXIS && !defined DEFAULT_A_MAX_TRAVEL) || defined __DOXYGEN__
2171 #define DEFAULT_A_MAX_TRAVEL 200.0f // mm
2172 #endif
2173 #if (defined B_AXIS && !defined DEFAULT_B_MAX_TRAVEL) || defined __DOXYGEN__
2174 #define DEFAULT_B_MAX_TRAVEL 200.0f // mm
2175 #endif
2176 #if (defined C_AXIS && !defined DEFAULT_C_MAX_TRAVEL) || defined __DOXYGEN__
2177 #define DEFAULT_C_MAX_TRAVEL 200.0f // mm
2178 #endif
2179 #if (defined U_AXIS && !defined DEFAULT_U_MAX_TRAVEL) || defined __DOXYGEN__
2180 #define DEFAULT_U_MAX_TRAVEL 200.0f // mm
2181 #endif
2182 #if (defined V_AXIS && !defined DEFAULT_V_MAX_TRAVEL) || defined __DOXYGEN__
2183 #define DEFAULT_V_MAX_TRAVEL 200.0f // mm
2184 #endif
2186 
2191 #if !defined DEFAULT_X_CURRENT || defined __DOXYGEN__
2192 #define DEFAULT_X_CURRENT 500.0f // mA RMS
2193 #endif
2194 #if !defined DEFAULT_Y_CURRENT || defined __DOXYGEN__
2195 #define DEFAULT_Y_CURRENT 500.0f // mA RMS
2196 #endif
2197 #if !defined DEFAULT_Z_CURRENT || defined __DOXYGEN__
2198 #define DEFAULT_Z_CURRENT 500.0f // mA RMS
2199 #endif
2200 #if (defined A_AXIS && !defined DEFAULT_A_CURRENT) || defined __DOXYGEN__
2201 #define DEFAULT_A_CURRENT 500.0f // mA RMS
2202 #endif
2203 #if (defined B_AXIS && !defined DEFAULT_B_CURRENT) || defined __DOXYGEN__
2204 #define DEFAULT_B_CURRENT 500.0f // mA RMS
2205 #endif
2206 #if (defined C_AXIS && !defined DEFAULT_C_CURRENT) || defined __DOXYGEN__
2207 #define DEFAULT_C_CURRENT 500.0f // mA RMS
2208 #endif
2209 #if (defined U_AXIS && !defined DEFAULT_U_CURRENT) || defined __DOXYGEN__
2210 #define DEFAULT_U_CURRENT 500.0f // mA RMS
2211 #endif
2212 #if (defined V_AXIS && !defined DEFAULT_V_CURRENT) || defined __DOXYGEN__
2213 #define DEFAULT_V_CURRENT 500.0f // mA RMS
2214 #endif
2216 
2217 // Sanity checks
2218 
2219 // N_TOOLS may have been defined on the compiler command line.
2220 #if defined(N_TOOLS) && N_TOOLS == 0
2221 #undef N_TOOLS
2222 #endif
2223 
2224 #if defined(N_TOOLS) && N_TOOLS > 32
2225 #undef N_TOOLS
2226 #define N_TOOLS 32
2227 #endif
2228 
2229 #if N_SYS_SPINDLE > N_SPINDLE
2230 #undef N_SYS_SPINDLE
2231 #define N_SYS_SPINDLE N_SPINDLE
2232 #endif
2233 
2234 #if N_SYS_SPINDLE < 1
2235 #undef N_SYS_SPINDLE
2236 #define N_SYS_SPINDLE 1
2237 #endif
2238 
2239 #if N_SYS_SPINDLE > 8
2240 #undef N_SYS_SPINDLE
2241 #define N_SYS_SPINDLE 8
2242 #endif
2243 
2244 #if NGC_EXPRESSIONS_ENABLE && !NGC_PARAMETERS_ENABLE
2245 #undef NGC_PARAMETERS_ENABLE
2246 #define NGC_PARAMETERS_ENABLE On
2247 #endif
2248 
2249 #if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
2250  #error "WCO busy refresh is less than idle refresh."
2251 #endif
2252 #if (REPORT_OVERRIDE_REFRESH_BUSY_COUNT < REPORT_OVERRIDE_REFRESH_IDLE_COUNT)
2253  #error "Override busy refresh is less than idle refresh."
2254 #endif
2255 #if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
2256  #error "WCO refresh must be greater than one."
2257 #endif
2258 #if (REPORT_OVERRIDE_REFRESH_IDLE_COUNT < 1)
2259  #error "Override refresh must be greater than zero."
2260 #endif
2261 
2262 #if DEFAULT_LASER_MODE && DEFAULT_LATHE_MODE
2263 #error "Cannot enable laser and lathe mode at the same time!"
2264 #endif
2265 
2266 #if LATHE_UVW_OPTION && (N_AXIS > 6 || AXIS_REMAP_ABC2UVW)
2267 #warning "Cannot enable lathe UVW option when N_AXIS > 6 or ABC words are remapped!"
2268 #undef LATHE_UVW_OPTION
2269 #define LATHE_UVW_OPTION Off
2270 #endif
2271 
2272 #if DEFAULT_CONTROL_SIGNALS_INVERT_MASK < 0
2273 #undef DEFAULT_CONTROL_SIGNALS_INVERT_MASK
2274 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK SIGNALS_BITMASK
2275 #endif
2276 
2277 #if DEFAULT_LIMIT_SIGNALS_INVERT_MASK < 0
2278 #undef DEFAULT_LIMIT_SIGNALS_INVERT_MASK
2279 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK AXES_BITMASK
2280 #endif
2281 
2282 #if DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK < 0
2283 #undef DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK
2284 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK AXES_BITMASK
2285 #endif
2286 
2287 #if DEFAULT_STEP_SIGNALS_INVERT_MASK < 0
2288 #undef DEFAULT_STEP_SIGNALS_INVERT_MASK
2289 #define DEFAULT_STEP_SIGNALS_INVERT_MASK AXES_BITMASK
2290 #endif
2291 
2292 #if DEFAULT_ENABLE_SIGNALS_INVERT_MASK < 0
2293 #undef DEFAULT_ENABLE_SIGNALS_INVERT_MASK
2294 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
2295 #endif
2296 
2297 #if DEFAULT_SPINDLE_ON_DELAY
2298 #if DEFAULT_SPINDLE_ON_DELAY < 500
2299 #undef DEFAULT_SPINDLE_ON_DELAY
2300 #define DEFAULT_SPINDLE_ON_DELAY 500
2301 #elif DEFAULT_SPINDLE_ON_DELAY > 20000
2302 #undef DEFAULT_SPINDLE_ON_DELAY
2303 #define DEFAULT_SPINDLE_ON_DELAY 20000
2304 #endif
2305 #endif
2306 
2307 #if DEFAULT_COOLANT_ON_DELAY
2308 #if DEFAULT_COOLANT_ON_DELAY < 500
2309 #undef DEFAULT_COOLANT_ON_DELAY
2310 #define DEFAULT_COOLANT_ON_DELAY 500
2311 #elif DEFAULT_COOLANT_ON_DELAY > 20000
2312 #undef DEFAULT_COOLANT_ON_DELAY
2313 #define DEFAULT_COOLANT_ON_DELAY 20000
2314 #endif
2315 #endif
2316 
2317 #if DEFAULT_PARKING_ENABLE > 0
2318  #if DEFAULT_HOMING_FORCE_SET_ORIGIN > 0
2319  #error "DEFAULT_HOMING_FORCE_SET_ORIGIN is not supported with DEFAULT_PARKING_ENABLE at this time."
2320  #endif
2321 #endif
2322 
2323 #if DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL > 0
2324  #if DEFAULT_PARKING_ENABLE < 1
2325  #error "DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL must be enabled with DEFAULT_PARKING_ENABLE."
2326  #endif
2327 #endif
2328 
2383 #endif // _GRBL_CONFIG_H_