grblHAL core  20240704
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-2024 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 4 // 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 On
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 #define ENABLE_PATH_BLENDING Off // Do NOT enable unless working on adding this feature!
193 
194 // Enables code for debugging purposes. Not for general use and always in constant flux.
195 //#define DEBUG // Uncomment to enable. Default disabled.
196 //#define DEBUGOUT 0 // Uncomment to claim serial port with given instance number and add HAL entry point for debug output.
197 
210 #if !defined REPORT_OVERRIDE_REFRESH_BUSY_COUNT || defined __DOXYGEN__
211 #define REPORT_OVERRIDE_REFRESH_BUSY_COUNT 20 // (1-255)
212 #endif
213 #if !defined REPORT_OVERRIDE_REFRESH_IDLE_COUNT || defined __DOXYGEN__
214 #define REPORT_OVERRIDE_REFRESH_IDLE_COUNT 10 // (1-255) Must be less than or equal to the busy count
215 #endif
216 #if !defined REPORT_WCO_REFRESH_BUSY_COUNT || defined __DOXYGEN__
217 #define REPORT_WCO_REFRESH_BUSY_COUNT 30 // (2-255)
218 #endif
219 #if !defined REPORT_WCO_REFRESH_IDLE_COUNT || defined __DOXYGEN__
220 #define REPORT_WCO_REFRESH_IDLE_COUNT 10 // (2-255) Must be less than or equal to the busy count
221 #endif
223 
234 #if !defined ACCELERATION_TICKS_PER_SECOND || defined __DOXYGEN__
235 #define ACCELERATION_TICKS_PER_SECOND 100
236 #endif
237 
238 // Sets the maximum step rate allowed to be written as a grblHAL setting. This option enables an error
239 // check in the settings module to prevent settings values that will exceed this limitation. The maximum
240 // step rate is strictly limited by the CPU speed and will change if something other than an AVR running
241 // at 16MHz is used.
242 // NOTE: For now disabled, will enable if flash space permits.
243 //#define MAX_STEP_RATE_HZ 30000 // Hz
244 
255 #if !defined REPORT_ECHO_LINE_RECEIVED || defined __DOXYGEN__
256 #define REPORT_ECHO_LINE_RECEIVED Off // Default disabled. Set to \ref On or 1 to enable.
257 #endif
258 
265 #if !defined TOOL_LENGTH_OFFSET_AXIS || defined __DOXYGEN__
266 #define TOOL_LENGTH_OFFSET_AXIS -1 // Default is all axes.
267 #endif
268 
278 #if !defined MINIMUM_JUNCTION_SPEED || defined __DOXYGEN__
279 #define MINIMUM_JUNCTION_SPEED 0.0f // (mm/min)
280 #endif
281 
289 #if !defined MINIMUM_FEED_RATE || defined __DOXYGEN__
290 #define MINIMUM_FEED_RATE 1.0f // (mm/min)
291 #endif
292 
300 #if !defined N_ARC_CORRECTION || defined __DOXYGEN__
301 #define N_ARC_CORRECTION 12 // Integer (1-255)
302 #endif
303 
315 #if !defined ARC_ANGULAR_TRAVEL_EPSILON || defined __DOXYGEN__
316 #define ARC_ANGULAR_TRAVEL_EPSILON 5E-7f // Float (radians)
317 #endif
318 
323 #if !defined BEZIER_MIN_STEP || defined __DOXYGEN__
324 #define BEZIER_MIN_STEP 0.002f
325 #endif
326 #if !defined BEZIER_MAX_STEP || defined __DOXYGEN__
327 #define BEZIER_MAX_STEP 0.1f
328 #endif
329 #if !defined BEZIER_SIGMA || defined __DOXYGEN__
330 #define BEZIER_SIGMA 0.1f
331 #endif
333 
334 
342 #if !defined DWELL_TIME_STEP || defined __DOXYGEN__
343 #define DWELL_TIME_STEP 50 // Integer (1-255) (milliseconds)
344 #endif
345 
355 #if !defined SEGMENT_BUFFER_SIZE || defined __DOXYGEN__
356 #define SEGMENT_BUFFER_SIZE 10 // Uncomment to override default in stepper.h.
357 #endif
358 
364 #if !defined SET_CHECK_MODE_PROBE_TO_START || defined __DOXYGEN__
365 #define SET_CHECK_MODE_PROBE_TO_START Off // Default disabled. Set to \ref On or 1 to enable.
366 #endif
367 
379 #if !defined HARD_LIMIT_FORCE_STATE_CHECK || defined __DOXYGEN__
380 #define HARD_LIMIT_FORCE_STATE_CHECK Off // Default disabled. Set to \ref On or 1 to enable.
381 #endif
382 
394 #if !defined HOMING_AXIS_SEARCH_SCALAR || defined __DOXYGEN__
395 #define HOMING_AXIS_SEARCH_SCALAR 1.5f // Must be > 1 to ensure limit switch will be engaged.
396 #endif
397 #if !defined HOMING_AXIS_LOCATE_SCALAR || defined __DOXYGEN__
398 #define HOMING_AXIS_LOCATE_SCALAR 10.0f// Must be > 1 to ensure limit switch is cleared.
399 #endif
401 
409 #if !defined ENABLE_RESTORE_NVS_WIPE_ALL || defined __DOXYGEN__
410 #define ENABLE_RESTORE_NVS_WIPE_ALL On
411 #endif
412 #if !defined ENABLE_RESTORE_NVS_DEFAULT_SETTINGS || defined __DOXYGEN__
413 #define ENABLE_RESTORE_NVS_DEFAULT_SETTINGS On
414 #endif
415 #if !defined ENABLE_RESTORE_NVS_CLEAR_PARAMETERS || defined __DOXYGEN__
416 #define ENABLE_RESTORE_NVS_CLEAR_PARAMETERS On
417 #endif
418 #if !defined ENABLE_RESTORE_NVS_DRIVER_PARAMETERS || defined __DOXYGEN__
419 #define ENABLE_RESTORE_NVS_DRIVER_PARAMETERS On
420 #endif
422 
433 #if !defined SETTINGS_RESTORE_DEFAULTS || defined __DOXYGEN__
434 #define SETTINGS_RESTORE_DEFAULTS On
435 #endif
436 #if !defined SETTINGS_RESTORE_PARAMETERS || defined __DOXYGEN__
437 #define SETTINGS_RESTORE_PARAMETERS On
438 #endif
439 #if !defined SETTINGS_RESTORE_STARTUP_LINES || defined __DOXYGEN__
440 #define SETTINGS_RESTORE_STARTUP_LINES On
441 #endif
442 #if !defined SETTINGS_RESTORE_BUILD_INFO || defined __DOXYGEN__
443 #define SETTINGS_RESTORE_BUILD_INFO On
444 #endif
445 #if !defined SETTINGS_RESTORE_DRIVER_PARAMETERS || defined __DOXYGEN__
446 #define SETTINGS_RESTORE_DRIVER_PARAMETERS On
447 #endif
456 #if !defined DISABLE_BUILD_INFO_WRITE_COMMAND || defined __DOXYGEN__
457 #define DISABLE_BUILD_INFO_WRITE_COMMAND Off
458 #endif
460 
474 #if !defined SLEEP_DURATION || defined __DOXYGEN__
475 #define SLEEP_DURATION 5.0f // Number of minutes before sleep mode is entered.
476 #endif
477 
483 #if !defined NVSDATA_BUFFER_ENABLE || defined __DOXYGEN__
484 #define NVSDATA_BUFFER_ENABLE On // Default on, set to \ref off or 0 to disable.
485 #endif
486 
496 #if !defined TOOLSETTER_RADIUS || defined __DOXYGEN__
497 #define TOOLSETTER_RADIUS 5.0f
498 #endif
499 
500 #if !defined ENABLE_BACKLASH_COMPENSATION || defined __DOXYGEN__
501 #define ENABLE_BACKLASH_COMPENSATION Off
502 #endif
503 
504 #if COMPATIBILITY_LEVEL == 0 || defined __DOXYGEN__
509 #if !defined N_TOOLS || defined __DOXYGEN__
510 #define N_TOOLS 0
511 #endif
512 #endif
513 
520 #if !defined NGC_EXPRESSIONS_ENABLE || defined __DOXYGEN__
521 #define NGC_EXPRESSIONS_ENABLE Off
522 #endif
523 
528 #if !defined NGC_PARAMETERS_ENABLE || defined __DOXYGEN__
529 #define NGC_PARAMETERS_ENABLE On
530 #endif
531 
536 #if (NGC_EXPRESSIONS_ENABLE && !defined NGC_N_ASSIGN_PARAMETERS_PER_BLOCK) || defined __DOXYGEN__
537 #define NGC_N_ASSIGN_PARAMETERS_PER_BLOCK 10
538 #endif
539 
544 #if !defined LATHE_UVW_OPTION || defined __DOXYGEN__
545 #define LATHE_UVW_OPTION Off
546 #endif
547 
548 // Max number of entries in log for PID data reporting, to be used for tuning
549 //#define PID_LOG 1000 // Default disabled. Uncomment to enable.
550 
551 // End compile time only default configuration
552 
553 // ---------------------------------------------------------------------------------------
554 // SETTINGS DEFAULT VALUE OVERRIDES:
555 
556 // General settings (Group_General)
557 
567 
572 #if !defined DEFAULT_REPORT_MACHINE_POSITION || defined __DOXYGEN__
573 #define DEFAULT_REPORT_MACHINE_POSITION On // Default on. Set to \ref Off or 0 to disable.
574 #endif
575 
581 #if !defined DEFAULT_REPORT_BUFFER_STATE || defined __DOXYGEN__
582 #define DEFAULT_REPORT_BUFFER_STATE On // Default on. Set to \ref Off or 0 to disable.
583 #endif
584 
592 #if !defined DEFAULT_REPORT_LINE_NUMBERS || defined __DOXYGEN__
593 #define DEFAULT_REPORT_LINE_NUMBERS On // Default on. Set to \ref Off or 0 to disable.
594 #endif
595 
602 #if !defined DEFAULT_REPORT_CURRENT_FEED_SPEED || defined __DOXYGEN__
603 #define DEFAULT_REPORT_CURRENT_FEED_SPEED On // Default on. Set to \ref Off or 0 to disable.
604 #endif
605 
612 #if !defined DEFAULT_REPORT_PIN_STATE || defined __DOXYGEN__
613 #define DEFAULT_REPORT_PIN_STATE On // Default on. Set to \ref Off or 0 to disable.
614 #endif
615 
622 #if !defined DEFAULT_REPORT_WORK_COORD_OFFSET || defined __DOXYGEN__
623 #define DEFAULT_REPORT_WORK_COORD_OFFSET On // Default on. Set to \ref Off or 0 to disable.
624 #endif
625 
632 #if !defined DEFAULT_REPORT_OVERRIDES || defined __DOXYGEN__
633 #define DEFAULT_REPORT_OVERRIDES On // Default on. Set to \ref Off or 0 to disable.
634 #endif
635 
643 #if !defined DEFAULT_REPORT_PROBE_COORDINATES || defined __DOXYGEN__
644 #define DEFAULT_REPORT_PROBE_COORDINATES On // Default on. Set to \ref Off or 0 to disable.
645 #endif
646 
657 #if !defined DEFAULT_REPORT_SYNC_ON_WCO_CHANGE || defined __DOXYGEN__
658 #define DEFAULT_REPORT_SYNC_ON_WCO_CHANGE On
659 #endif
660 
668 #if !defined DEFAULT_REPORT_PARSER_STATE || defined __DOXYGEN__
669 #define DEFAULT_REPORT_PARSER_STATE Off // Default off. Set to \ref On or 1 to enable.
670 #endif
671 
682 #if !defined DEFAULT_REPORT_ALARM_SUBSTATE || defined __DOXYGEN__
683 #define DEFAULT_REPORT_ALARM_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
684 #endif
685 
695 #if !defined DEFAULT_REPORT_RUN_SUBSTATE || defined __DOXYGEN__
696 #define DEFAULT_REPORT_RUN_SUBSTATE Off // Default off. Set to \ref On or 1 to enable.
697 #endif
698 
700 
705 #if !defined DEFAULT_JUNCTION_DEVIATION || defined __DOXYGEN__
706 #define DEFAULT_JUNCTION_DEVIATION 0.01f // mm
707 #endif
709 
714 #if !defined DEFAULT_ARC_TOLERANCE || defined __DOXYGEN__
715 #define DEFAULT_ARC_TOLERANCE 0.002f // mm
716 #endif
718 
724 #if !defined DEFAULT_REPORT_INCHES || defined __DOXYGEN__
725 #define DEFAULT_REPORT_INCHES Off
726 #endif
728 
734 #if !defined DEFAULT_G73_RETRACT || defined __DOXYGEN__
735 #define DEFAULT_G73_RETRACT 0.1f // mm
736 #endif
738 
743 #if !defined DEFAULT_LASER_MODE || defined __DOXYGEN__
744 #define DEFAULT_LASER_MODE Off
745 #endif
746 #if !defined DEFAULT_LATHE_MODE || defined __DOXYGEN__
747 #define DEFAULT_LATHE_MODE Off
748 #endif
750 
760 #if !defined DEFAULT_LEGACY_RTCOMMANDS || defined __DOXYGEN__
761 #define DEFAULT_LEGACY_RTCOMMANDS On
762 #endif
764 
768 #if !defined DEFAULT_RESET_OVERRIDES || defined __DOXYGEN__
769 #define DEFAULT_RESET_OVERRIDES Off
770 #endif
772 
776 #if !defined DEFAULT_SLEEP_ENABLE || defined __DOXYGEN__
777 #define DEFAULT_SLEEP_ENABLE Off
778 #endif
780 
788 #if !defined DEFAULT_DISABLE_LASER_DURING_HOLD || defined __DOXYGEN__
789 #define DEFAULT_DISABLE_LASER_DURING_HOLD On
790 #endif
792 
798 #if !defined DEFAULT_RESTORE_AFTER_FEED_HOLD || defined __DOXYGEN__
799 #define DEFAULT_RESTORE_AFTER_FEED_HOLD On
800 #endif
802 
812 #if !defined DEFAULT_FORCE_INITIALIZATION_ALARM || defined __DOXYGEN__
813 #define DEFAULT_FORCE_INITIALIZATION_ALARM Off
814 #endif
816 
823 #if !defined DEFAULT_DISABLE_G92_PERSISTENCE || defined __DOXYGEN__
824 #if COMPATIBILITY_LEVEL <= 1
825 #define DEFAULT_DISABLE_G92_PERSISTENCE Off
826 #else
827 #define DEFAULT_DISABLE_G92_PERSISTENCE On
828 #endif
829 #endif
831 
840 #if !defined DEFAULT_PLANNER_BUFFER_BLOCKS || defined __DOXYGEN__
841 #define DEFAULT_PLANNER_BUFFER_BLOCKS 100
842 #endif
844 
845 // Control signals settings (Group_ControlSignals)
846 
847 #ifndef __DOXYGEN__ // For now do not include in documentation
848 
854 #define SIGNALS_RESET_BIT (1<<0)
855 #define SIGNALS_FEEDHOLD_BIT (1<<1)
856 #define SIGNALS_CYCLESTART_BIT (1<<2)
857 #define SIGNALS_SAFETYDOOR_BIT (1<<3)
858 #define SIGNALS_BLOCKDELETE_BIT (1<<4)
859 #define SIGNALS_STOPDISABLE_BIT (1<<5)
860 #define SIGNALS_ESTOP_BIT (1<<6)
861 #define SIGNALS_PROBE_CONNECTED_BIT (1<<7)
862 #define SIGNALS_MOTOR_FAULT_BIT (1<<8)
863 #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)
865 
866 #endif
867 
874 #if !defined DEFAULT_CONTROL_SIGNALS_INVERT_MASK || defined __DOXYGEN__
875 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
876 #endif
878 
893 #if !defined DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK || defined __DOXYGEN__
894 #define DEFAULT_DISABLE_CONTROL_PINS_PULL_UP_MASK 0 // Set to SIGNALS_BITMASK or -1 to invert all signals
895 #endif
897 
898 // Limits settings (Group_Limits)
899 
908 #if !defined DEFAULT_LIMIT_SIGNALS_INVERT_MASK || defined __DOXYGEN__
909 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
910 #endif
912 
920 #if !defined DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK || defined __DOXYGEN__
921 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK 0 // Set to -1 or AXES_BITMASK to disable pullup for all axes
922 #endif
924 
928 #if !defined DEFAULT_SOFT_LIMIT_ENABLE || defined __DOXYGEN__
929 #define DEFAULT_SOFT_LIMIT_ENABLE Off
930 #endif
932 
936 
943 #if !defined DEFAULT_HARD_LIMIT_ENABLE || defined __DOXYGEN__
944 #define DEFAULT_HARD_LIMIT_ENABLE Off
945 #endif
946 #if !defined DEFAULT_CHECK_LIMITS_AT_INIT || defined __DOXYGEN__
947 #define DEFAULT_CHECK_LIMITS_AT_INIT Off
948 #endif
949 #if !defined DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY || defined __DOXYGEN__
950 #define DEFAULT_HARD_LIMITS_DISABLE_FOR_ROTARY Off
951 #endif
952 
965 
968 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT || defined __DOXYGEN__
969 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_AXIS_LENGTH_PERCENT 5.0f // Float (percent)
970 #endif
972 
976 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN || defined __DOXYGEN__
977 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MIN 2.5f // Float (mm)
978 #endif
980 
985 #if !defined DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX || defined __DOXYGEN__
986 #define DEFAULT_DUAL_AXIS_HOMING_FAIL_DISTANCE_MAX 25.0f // Float (mm)
987 #endif
989 
990 // Coolant settings (Group_Coolant)
991 
997 #if !defined DEFAULT_INVERT_COOLANT_FLOOD_PIN || defined __DOXYGEN__
998 #define DEFAULT_INVERT_COOLANT_FLOOD_PIN Off
999 #endif
1000 #if !defined DEFAULT_INVERT_COOLANT_MIST_PIN || defined __DOXYGEN__
1001 #define DEFAULT_INVERT_COOLANT_MIST_PIN Off // NOTE: not supported by all drivers.
1002 #endif
1004 
1005 // Spindle settings (Group_Spindle)
1006 
1010 #if !defined DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED || defined __DOXYGEN__
1011 #define DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED Off
1012 #endif
1014 
1019 #if !defined DEFAULT_INVERT_SPINDLE_ENABLE_PIN || defined __DOXYGEN__
1020 #define DEFAULT_INVERT_SPINDLE_ENABLE_PIN Off
1021 #endif
1022 #if !defined DEFAULT_INVERT_SPINDLE_CCW_PIN || defined __DOXYGEN__
1023 #define DEFAULT_INVERT_SPINDLE_CCW_PIN Off // NOTE: not supported by all drivers.
1024 #endif
1025 #if !defined DEFAULT_INVERT_SPINDLE_PWM_PIN || defined __DOXYGEN__
1026 #define DEFAULT_INVERT_SPINDLE_PWM_PIN Off // NOTE: not supported by all drivers.
1027 #endif
1029 
1033 #if !defined DEFAULT_SPINDLE_RPM_MAX || defined __DOXYGEN__
1034 #define DEFAULT_SPINDLE_RPM_MAX 1000.0f // rpm
1035 #endif
1037 
1041 #if !defined DEFAULT_SPINDLE_RPM_MIN || defined __DOXYGEN__
1042 #define DEFAULT_SPINDLE_RPM_MIN 0.0f // rpm
1043 #endif
1045 
1049 #if !defined DEFAULT_SPINDLE_PWM_FREQ || defined __DOXYGEN__
1050 #define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
1051 #endif
1053 
1057 #if !defined DEFAULT_SPINDLE_PWM_OFF_VALUE || defined __DOXYGEN__
1058 #define DEFAULT_SPINDLE_PWM_OFF_VALUE 0.0f // Percent
1059 #endif
1061 
1074 #if !defined DEFAULT_SPINDLE_PWM_MIN_VALUE || defined __DOXYGEN__
1075 #define DEFAULT_SPINDLE_PWM_MIN_VALUE 0.0f // Must be greater than zero. Integer (+-255).
1076 #endif
1078 
1082 #if !defined DEFAULT_SPINDLE_PWM_MAX_VALUE || defined __DOXYGEN__
1083 #define DEFAULT_SPINDLE_PWM_MAX_VALUE 100.0f // Percent
1084 #endif
1086 
1095 #if !defined DEFAULT_SPINDLE_PPR || defined __DOXYGEN__
1096 #define DEFAULT_SPINDLE_PPR 0 // Pulses per revolution.
1097 #endif
1099 
1103 #if !defined DEFAULT_SPINDLE_AT_SPEED_TOLERANCE || defined __DOXYGEN__
1104 #define DEFAULT_SPINDLE_AT_SPEED_TOLERANCE 0.0f // Percent - 0 means not checked
1105 #endif
1107 
1108 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1109 
1110 // $9 - Setting_SpindlePWMOptions
1111 // bit 0
1112 // always defaults to on
1113 // bit 1
1114 
1115 // Closed loop spindle settings (Group_Spindle_ClosedLoop)
1116 
1117 #ifndef DEFAULT_SPINDLE_P_GAIN
1118 #define DEFAULT_SPINDLE_P_GAIN 1.0f
1119 #endif
1120 #ifndef DEFAULT_SPINDLE_I_GAIN
1121 #define DEFAULT_SPINDLE_I_GAIN 0.01f
1122 #endif
1123 #ifndef DEFAULT_SPINDLE_D_GAIN
1124 #define DEFAULT_SPINDLE_D_GAIN 0.0f
1125 #endif
1126 #ifndef DEFAULT_SPINDLE_I_MAX
1127 #define DEFAULT_SPINDLE_I_MAX 10.0f
1128 #endif
1129 
1130 #if ENABLE_SPINDLE_LINEARIZATION || defined __DOXYGEN__
1131 
1136 #if !defined DEFAULT_RPM_POINT01 || defined __DOXYGEN__
1137 #define DEFAULT_RPM_POINT01 NAN // DEFAULT_SPINDLE_RPM_MIN // Replace NAN with DEFAULT_SPINDLE_RPM_MIN to enable.
1138 #endif
1139 #if !defined DEFAULT_RPM_LINE_A1 || defined __DOXYGEN__
1140 #define DEFAULT_RPM_LINE_A1 3.197101e-03f
1141 #endif
1142 #if !defined DEFAULT_RPM_LINE_B1 || defined __DOXYGEN__
1143 #define DEFAULT_RPM_LINE_B1 -3.526076e-1f
1144 #endif
1146 
1151 #if !defined DEFAULT_RPM_POINT12 || defined __DOXYGEN__
1152 #define DEFAULT_RPM_POINT12 NAN // Change NAN to a float constant to enable.
1153 #endif
1154 #if !defined DEFAULT_RPM_LINE_A2 || defined __DOXYGEN__
1155 #define DEFAULT_RPM_LINE_A2 1.722950e-2f
1156 #endif
1157 #if !defined DEFAULT_RPM_LINE_B2 || defined __DOXYGEN__
1158 #define DEFAULT_RPM_LINE_B2 1.0f,
1159 #endif
1161 
1166 #if !defined DEFAULT_RPM_POINT23 || defined __DOXYGEN__
1167 #define DEFAULT_RPM_POINT23 NAN // Change NAN to a float constant to enable.
1168 #endif
1169 #if !defined DEFAULT_RPM_LINE_A3 || defined __DOXYGEN__
1170 #define DEFAULT_RPM_LINE_A3 5.901518e-02f
1171 #endif
1172 #if !defined DEFAULT_RPM_LINE_B3 || defined __DOXYGEN__
1173 #define DEFAULT_RPM_LINE_B3 4.881851e+02f
1174 #endif
1176 
1181 #if !defined DEFAULT_RPM_POINT34 || defined __DOXYGEN__
1182 #define DEFAULT_RPM_POINT34 NAN // Change NAN to a float constant to enable.
1183 #endif
1184 #if !defined DEFAULT_RPM_LINE_A4 || defined __DOXYGEN__
1185 #define DEFAULT_RPM_LINE_A4 1.203413e-01f
1186 #endif
1187 #if !defined DEFAULT_RPM_LINE_B4 || defined __DOXYGEN__
1188 #define DEFAULT_RPM_LINE_B4 1.151360e+03f
1189 #endif
1191 
1192 #endif // ENABLE_SPINDLE_LINEARIZATION
1193 
1194 // Tool change settings (Group_Toolchange)
1195 
1200 #if !defined DEFAULT_TOOLCHANGE_MODE || defined __DOXYGEN__
1201 #define DEFAULT_TOOLCHANGE_MODE 0
1202 #endif
1204 
1208 #if !defined DEFAULT_TOOLCHANGE_PROBING_DISTANCE || defined __DOXYGEN__
1209 #define DEFAULT_TOOLCHANGE_PROBING_DISTANCE 30 // max probing distance in mm for mode 3
1210 #endif
1212 
1216 #if !defined DEFAULT_TOOLCHANGE_FEED_RATE || defined __DOXYGEN__
1217 #define DEFAULT_TOOLCHANGE_FEED_RATE 25.0f // mm/min
1218 #endif
1220 
1225 #if !defined DEFAULT_TOOLCHANGE_SEEK_RATE || defined __DOXYGEN__
1226 #define DEFAULT_TOOLCHANGE_SEEK_RATE 200.0f // mm/min
1227 #endif
1229 
1233 #if !defined DEFAULT_TOOLCHANGE_PULLOFF_RATE || defined __DOXYGEN__
1234 #define DEFAULT_TOOLCHANGE_PULLOFF_RATE 200.0f // mm/min
1235 #endif
1237 
1241 #if !defined DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION || defined __DOXYGEN__
1242 #define DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION Off
1243 #endif
1245 
1246 // Homing settings (Group_Homing)
1247 
1254 #if !defined DEFAULT_HOMING_ENABLE || defined __DOXYGEN__
1255 #define DEFAULT_HOMING_ENABLE Off // Default disabled. Set to \ref On or 1 to enable.
1256 #endif
1257 
1265 #if !defined DEFAULT_HOMING_SINGLE_AXIS_COMMANDS || defined __DOXYGEN__
1266 #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS Off // Default disabled. Set to \ref On or 1 to enable.
1267 #endif
1268 
1276 #if !defined DEFAULT_HOMING_INIT_LOCK || defined __DOXYGEN__
1277 #define DEFAULT_HOMING_INIT_LOCK Off // Default disabled. Set to \ref On or 1 to enable.
1278 #endif
1279 
1287 #if !defined DEFAULT_HOMING_FORCE_SET_ORIGIN || defined __DOXYGEN__
1288 #define DEFAULT_HOMING_FORCE_SET_ORIGIN Off // Default disabled. Set to \ref On or 1 to enable.
1289 #endif
1290 
1301 #if !defined DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES || defined __DOXYGEN__
1302 #define DEFAULT_LIMITS_TWO_SWITCHES_ON_AXES Off // Default disabled. Set to \ref On or 1 to enable.
1303 #endif
1305 
1312 #if !defined DEFAULT_HOMING_ALLOW_MANUAL || defined __DOXYGEN__
1313 #define DEFAULT_HOMING_ALLOW_MANUAL Off // Default disabled. Set to \ref On or 1 to enable.
1314 #endif
1315 
1322 #if !defined DEFAULT_HOMING_OVERRIDE_LOCKS || defined __DOXYGEN__
1323 #define DEFAULT_HOMING_OVERRIDE_LOCKS Off // Default disabled. Set to \ref On or 1 to enable.
1324 #endif
1325 
1332 #if !defined DEFAULT_HOMING_KEEP_STATUS_ON_RESET || defined __DOXYGEN__
1333 #define DEFAULT_HOMING_KEEP_STATUS_ON_RESET Off // Default disabled. Set to \ref On or 1 to enable.
1334 #endif
1336 
1342 #if !defined DEFAULT_HOMING_USE_LIMIT_SWITCHES || defined __DOXYGEN__
1343 #define DEFAULT_HOMING_USE_LIMIT_SWITCHES Off // Default disabled. Set to \ref On or 1 to enable.
1344 #endif
1346 
1352 #if !defined DEFAULT_HOMING_DIR_MASK || defined __DOXYGEN__
1353 #define DEFAULT_HOMING_DIR_MASK 0
1354 #endif
1356 
1360 #if !defined DEFAULT_HOMING_FEED_RATE || defined __DOXYGEN__
1361 #define DEFAULT_HOMING_FEED_RATE 25.0f // mm/min
1362 #endif
1364 
1368 #if !defined DEFAULT_HOMING_SEEK_RATE || defined __DOXYGEN__
1369 #define DEFAULT_HOMING_SEEK_RATE 500.0f // mm/min
1370 #endif
1372 
1376 #if !defined DEFAULT_HOMING_DEBOUNCE_DELAY || defined __DOXYGEN__
1377 #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
1378 #endif
1380 
1384 #if !defined DEFAULT_HOMING_PULLOFF || defined __DOXYGEN__
1385 #define DEFAULT_HOMING_PULLOFF 1.0f // mm
1386 #endif
1388 
1395 #if !defined DEFAULT_N_HOMING_LOCATE_CYCLE || defined __DOXYGEN__
1396 #define DEFAULT_N_HOMING_LOCATE_CYCLE 1 // Integer (1-127)
1397 #endif
1399 
1421 #if !defined DEFAULT_HOMING_CYCLE_0 || defined __DOXYGEN__
1422 #define DEFAULT_HOMING_CYCLE_0 (Z_AXIS_BIT) // REQUIRED: First move Z to clear workspace.
1423 #endif
1425 
1429 #if !defined DEFAULT_HOMING_CYCLE_1 || defined __DOXYGEN__
1430 #if COREXY
1431 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT) // OPTIONAL: Then move X.
1432 #else
1433 #define DEFAULT_HOMING_CYCLE_1 (X_AXIS_BIT|Y_AXIS_BIT) // OPTIONAL: Then move X,Y at the same time.
1434 #endif
1435 #endif
1437 
1441 #if !defined DEFAULT_HOMING_CYCLE_2 || defined __DOXYGEN__
1442 #if COREXY
1443 #define DEFAULT_HOMING_CYCLE_2 (Y_AXIS_BIT) // OPTIONAL: Then move Y.
1444 #else
1445 #define DEFAULT_HOMING_CYCLE_2 0 // OPTIONAL: Uncomment and add axes mask to enable
1446 #endif
1447 #endif
1449 
1453 #if (defined A_AXIS && !defined DEFAULT_HOMING_CYCLE_3) || defined __DOXYGEN__
1454 #define DEFAULT_HOMING_CYCLE_3 0 // OPTIONAL: Uncomment and add axes mask to enable
1455 #endif
1457 
1462 #if (defined B_AXIS && !defined DEFAULT_HOMING_CYCLE_4) || defined __DOXYGEN__
1463 #define DEFAULT_HOMING_CYCLE_4 0 // OPTIONAL: Uncomment and add axes mask to enable
1464 #endif
1466 
1470 #if (defined C_AXIS && !defined DEFAULT_HOMING_CYCLE_5) || defined __DOXYGEN__
1471 #define DEFAULT_HOMING_CYCLE_5 0 // OPTIONAL: Uncomment and add axes mask to enable
1472 #endif
1474 
1483 #if !defined DEFAULT_HOME_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1484 #define DEFAULT_HOME_SIGNALS_INVERT_MASK 0 // Set to -1 or AXES_BITMASK to invert for all axes
1485 #endif
1487 
1488 
1489 // Probing settings (Group_Probing)
1490 
1494 #if !defined DEFAULT_PROBE_SIGNAL_INVERT || defined __DOXYGEN__
1495 #define DEFAULT_PROBE_SIGNAL_INVERT Off
1496 #endif
1498 
1502 #if !defined DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP || defined __DOXYGEN__
1503 #define DEFAULT_PROBE_SIGNAL_DISABLE_PULLUP Off
1504 #endif
1506 
1515 #if !defined DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES || defined __DOXYGEN__
1516 #define DEFAULT_ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES Off
1517 #endif
1519 
1520 // Safety door/parking settings (Group_SafetyDoor)
1521 
1522 #ifdef DEFAULT_HOMING_ENABLE
1523 
1541 #if !defined DEFAULT_PARKING_ENABLE || defined __DOXYGEN__
1542 #define DEFAULT_PARKING_ENABLE Off // bit 0
1543 // Enables a special set of M-code commands that enables and disables the parking motion.
1544 // These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to disable.
1545 // The command is modal and will be set after a planner sync. Since it is g-code, it is
1546 // executed in sync with g-code commands. It is not a real-time command.
1547 // NOTE: PARKING_ENABLE is required. By default, M56 is active upon initialization. Use
1548 // DEACTIVATE_PARKING_UPON_INIT to set M56 P0 as the power-up default.
1549 #endif
1550 #if !defined DEFAULT_DEACTIVATE_PARKING_UPON_INIT || defined __DOXYGEN__
1551 #define DEFAULT_DEACTIVATE_PARKING_UPON_INIT Off // bit 1
1552 #endif
1553 #if !defined DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL || defined __DOXYGEN__
1554 #define DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL Off // bit 2
1555 #endif
1557 
1562 #if !defined DEFAULT_PARKING_AXIS || defined __DOXYGEN__
1563 #define DEFAULT_PARKING_AXIS Z_AXIS //
1564 #endif
1566 
1570 #if !defined DEFAULT_PARKING_PULLOUT_INCREMENT || defined __DOXYGEN__
1571 #define DEFAULT_PARKING_PULLOUT_INCREMENT 5.0f //
1572 #endif
1574 
1579 #if !defined DEFAULT_PARKING_PULLOUT_RATE || defined __DOXYGEN__
1580 #define DEFAULT_PARKING_PULLOUT_RATE 100.0f // mm/min.
1581 #endif
1583 
1588 #if !defined DEFAULT_PARKING_TARGET || defined __DOXYGEN__
1589 #define DEFAULT_PARKING_TARGET -5.0f // mm
1590 #endif
1592 
1597 #if !defined DEFAULT_PARKING_RATE || defined __DOXYGEN__
1598 #define DEFAULT_PARKING_RATE 500.0f // mm/min
1599 #endif
1601 
1605 
1610 #if !defined DEFAULT_DOOR_IGNORE_WHEN_IDLE || defined __DOXYGEN__
1611 #define DEFAULT_DOOR_IGNORE_WHEN_IDLE Off
1612 #endif
1617 #if !defined DEFAULT_DOOR_KEEP_COOLANT_ON || defined __DOXYGEN__
1618 #define DEFAULT_DOOR_KEEP_COOLANT_ON Off
1619 #endif
1621 
1627 #if !defined DEFAULT_SAFETY_DOOR_SPINDLE_DELAY || defined __DOXYGEN__
1628 #define DEFAULT_SAFETY_DOOR_SPINDLE_DELAY 4.0f // Float (seconds)
1629 #endif
1631 
1638 #if !defined DEFAULT_SAFETY_DOOR_COOLANT_DELAY || defined __DOXYGEN__
1639 #define DEFAULT_SAFETY_DOOR_COOLANT_DELAY 1.0f // Float (seconds)
1640 #endif
1642 
1643 #endif // DEFAULT_HOMING_ENABLE
1644 
1645 // Jogging settings (Group_Jogging)
1646 
1654 #if !defined DEFAULT_JOG_LIMIT_ENABLE || defined __DOXYGEN__
1655 #define DEFAULT_JOG_LIMIT_ENABLE Off
1656 #endif
1658 
1659 // Stepper settings (Group_Stepper)
1660 
1673 #if !defined DEFAULT_STEP_PULSE_MICROSECONDS || defined __DOXYGEN__
1674 #define DEFAULT_STEP_PULSE_MICROSECONDS 10.0f
1675 #endif
1677 
1686 #if !defined DEFAULT_STEPPER_IDLE_LOCK_TIME || defined __DOXYGEN__
1687 #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // milliseconds
1688 #endif
1690 
1696 #if !defined DEFAULT_STEP_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1697 #define DEFAULT_STEP_SIGNALS_INVERT_MASK 0
1698 #endif
1700 
1706 #if !defined DEFAULT_DIR_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1707 #define DEFAULT_DIR_SIGNALS_INVERT_MASK 0
1708 #endif
1710 
1723 #if !defined DEFAULT_ENABLE_SIGNALS_INVERT_MASK || defined __DOXYGEN__
1724 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
1725 #endif
1727 
1733 #if !defined DEFAULT_GANGED_DIRECTION_INVERT_MASK || defined __DOXYGEN__
1734 #define DEFAULT_GANGED_DIRECTION_INVERT_MASK 0
1735 #endif
1737 
1741 #if !defined DEFAULT_STEP_PULSE_DELAY || defined __DOXYGEN__
1742 #define DEFAULT_STEP_PULSE_DELAY 0.0f
1743 #endif
1745 
1752 #if !defined DEFAULT_STEPPER_DEENERGIZE_MASK || defined __DOXYGEN__
1753 #define DEFAULT_STEPPER_DEENERGIZE_MASK 0
1754 #endif
1756 
1763 #if !defined DEFAULT_AXIS_ROTATIONAL_MASK || defined __DOXYGEN__
1764 #define DEFAULT_AXIS_ROTATIONAL_MASK 0
1765 #endif
1767 
1772 #if !defined DEFAULT_AUTOREPORT_INTERVAL || defined __DOXYGEN__
1773 #define DEFAULT_AUTOREPORT_INTERVAL 0
1774 #endif
1776 
1781 #if !defined DEFAULT_TIMEZONE_OFFSET || defined __DOXYGEN__
1782 #define DEFAULT_TIMEZONE_OFFSET 0.0f
1783 #endif
1785 
1786 // Axis settings (Group_XAxis - Group_VAxis)
1787 
1792 #if !defined DEFAULT_X_STEPS_PER_MM || defined __DOXYGEN__
1793 #define DEFAULT_X_STEPS_PER_MM 250.0f
1794 #endif
1795 #if !defined DEFAULT_Y_STEPS_PER_MM || defined __DOXYGEN__
1796 #define DEFAULT_Y_STEPS_PER_MM 250.0f
1797 #endif
1798 #if !defined DEFAULT_Z_STEPS_PER_MM || defined __DOXYGEN__
1799 #define DEFAULT_Z_STEPS_PER_MM 250.0f
1800 #endif
1801 #if (defined A_AXIS && !defined DEFAULT_A_STEPS_PER_MM) || defined __DOXYGEN__
1802 #define DEFAULT_A_STEPS_PER_MM 250.0f
1803 #endif
1804 #if (defined B_AXIS && !defined DEFAULT_B_STEPS_PER_MM) || defined __DOXYGEN__
1805 #define DEFAULT_B_STEPS_PER_MM 250.0f
1806 #endif
1807 #if (defined C_AXIS && !defined DEFAULT_C_STEPS_PER_MM) || defined __DOXYGEN__
1808 #define DEFAULT_C_STEPS_PER_MM 250.0f
1809 #endif
1810 #if (defined U_AXIS && !defined DEFAULT_U_STEPS_PER_MM) || defined __DOXYGEN__
1811 #define DEFAULT_U_STEPS_PER_MM 250.0f
1812 #endif
1813 #if (defined V_AXIS && !defined DEFAULT_V_STEPS_PER_MM) || defined __DOXYGEN__
1814 #define DEFAULT_V_STEPS_PER_MM 250.0f
1815 #endif
1817 
1822 #if !defined DEFAULT_X_MAX_RATE || defined __DOXYGEN__
1823 #define DEFAULT_X_MAX_RATE 500.0f // mm/min
1824 #endif
1825 #if !defined DEFAULT_Y_MAX_RATE || defined __DOXYGEN__
1826 #define DEFAULT_Y_MAX_RATE 500.0f // mm/min
1827 #endif
1828 #if !defined DEFAULT_Z_MAX_RATE || defined __DOXYGEN__
1829 #define DEFAULT_Z_MAX_RATE 500.0f // mm/min
1830 #endif
1831 #if (defined A_AXIS && !defined DEFAULT_A_MAX_RATE) || defined __DOXYGEN__
1832 #define DEFAULT_A_MAX_RATE 500.0f // mm/min
1833 #endif
1834 #if (defined B_AXIS && !defined DEFAULT_B_MAX_RATE) || defined __DOXYGEN__
1835 #define DEFAULT_B_MAX_RATE 500.0f // mm/min
1836 #endif
1837 #if (defined C_AXIS && !defined DEFAULT_C_MAX_RATE) || defined __DOXYGEN__
1838 #define DEFAULT_C_MAX_RATE 500.0f // mm/min
1839 #endif
1840 #if (defined U_AXIS && !defined DEFAULT_U_MAX_RATE) || defined __DOXYGEN__
1841 #define DEFAULT_U_MAX_RATE 500.0f // mm/min
1842 #endif
1843 #if (defined V_AXIS && !defined DEFAULT_V_MAX_RATE) || defined __DOXYGEN__
1844 #define DEFAULT_V_MAX_RATE 500.0f // mm/min
1845 #endif
1847 
1851 #if !defined DEFAULT_X_ACCELERATION || defined __DOXYGEN__
1852 #define DEFAULT_X_ACCELERATION 10.0f // mm/sec^2
1853 #endif
1854 #if !defined DEFAULT_Y_ACCELERATION || defined __DOXYGEN__
1855 #define DEFAULT_Y_ACCELERATION 10.0f // mm/sec^2
1856 #endif
1857 #if !defined DEFAULT_Z_ACCELERATION || defined __DOXYGEN__
1858 #define DEFAULT_Z_ACCELERATION 10.0f // mm/sec^2
1859 #endif
1860 #if (defined A_AXIS && !defined DEFAULT_A_ACCELERATION) || defined __DOXYGEN__
1861 #define DEFAULT_A_ACCELERATION 10.0f // mm/sec^2
1862 #endif
1863 #if (defined B_AXIS && !defined DEFAULT_B_ACCELERATION) || defined __DOXYGEN__
1864 #define DEFAULT_B_ACCELERATION 10.0f // mm/sec^2
1865 #endif
1866 #if (defined C_AXIS && !defined DEFAULT_C_ACCELERATION) || defined __DOXYGEN__
1867 #define DEFAULT_C_ACCELERATION 10.0f // mm/sec^2
1868 #endif
1869 #if (defined U_AXIS && !defined DEFAULT_U_ACCELERATION) || defined __DOXYGEN__
1870 #define DEFAULT_U_ACCELERATION 10.0f // mm/sec^2
1871 #endif
1872 #if (defined V_AXIS && !defined DEFAULT_V_ACCELERATION) || defined __DOXYGEN__
1873 #define DEFAULT_V_ACCELERATION 10.0f // mm/sec^2
1874 #endif
1876 
1881 #if !defined DEFAULT_X_MAX_TRAVEL || defined __DOXYGEN__
1882 #define DEFAULT_X_MAX_TRAVEL 200.0f // mm
1883 #endif
1884 #if !defined DEFAULT_Y_MAX_TRAVEL || defined __DOXYGEN__
1885 #define DEFAULT_Y_MAX_TRAVEL 200.0f // mm
1886 #endif
1887 #if !defined DEFAULT_Z_MAX_TRAVEL || defined __DOXYGEN__
1888 #define DEFAULT_Z_MAX_TRAVEL 200.0f // mm
1889 #endif
1890 #if (defined A_AXIS && !defined DEFAULT_A_MAX_TRAVEL) || defined __DOXYGEN__
1891 #define DEFAULT_A_MAX_TRAVEL 200.0f // mm
1892 #endif
1893 #if (defined B_AXIS && !defined DEFAULT_B_MAX_TRAVEL) || defined __DOXYGEN__
1894 #define DEFAULT_B_MAX_TRAVEL 200.0f // mm
1895 #endif
1896 #if (defined C_AXIS && !defined DEFAULT_C_MAX_TRAVEL) || defined __DOXYGEN__
1897 #define DEFAULT_C_MAX_TRAVEL 200.0f // mm
1898 #endif
1899 #if (defined U_AXIS && !defined DEFAULT_U_MAX_TRAVEL) || defined __DOXYGEN__
1900 #define DEFAULT_U_MAX_TRAVEL 200.0f // mm
1901 #endif
1902 #if (defined V_AXIS && !defined DEFAULT_V_MAX_TRAVEL) || defined __DOXYGEN__
1903 #define DEFAULT_V_MAX_TRAVEL 200.0f // mm
1904 #endif
1906 
1911 #if !defined DEFAULT_X_CURRENT || defined __DOXYGEN__
1912 #define DEFAULT_X_CURRENT 500.0f // mA RMS
1913 #endif
1914 #if !defined DEFAULT_Y_CURRENT || defined __DOXYGEN__
1915 #define DEFAULT_Y_CURRENT 500.0f // mA RMS
1916 #endif
1917 #if !defined DEFAULT_Z_CURRENT || defined __DOXYGEN__
1918 #define DEFAULT_Z_CURRENT 500.0f // mA RMS
1919 #endif
1920 #if (defined A_AXIS && !defined DEFAULT_A_CURRENT) || defined __DOXYGEN__
1921 #define DEFAULT_A_CURRENT 500.0f // mA RMS
1922 #endif
1923 #if (defined B_AXIS && !defined DEFAULT_B_CURRENT) || defined __DOXYGEN__
1924 #define DEFAULT_B_CURRENT 500.0f // mA RMS
1925 #endif
1926 #if (defined C_AXIS && !defined DEFAULT_C_CURRENT) || defined __DOXYGEN__
1927 #define DEFAULT_C_CURRENT 500.0f // mA RMS
1928 #endif
1929 #if (defined U_AXIS && !defined DEFAULT_U_CURRENT) || defined __DOXYGEN__
1930 #define DEFAULT_U_CURRENT 500.0f // mA RMS
1931 #endif
1932 #if (defined V_AXIS && !defined DEFAULT_V_CURRENT) || defined __DOXYGEN__
1933 #define DEFAULT_V_CURRENT 500.0f // mA RMS
1934 #endif
1936 
1937 // Sanity checks
1938 
1939 // N_TOOLS may have been defined on the compiler command line.
1940 #if defined(N_TOOLS) && N_TOOLS == 0
1941 #undef N_TOOLS
1942 #endif
1943 
1944 #if defined(N_TOOLS) && N_TOOLS > 32
1945 #undef N_TOOLS
1946 #define N_TOOLS 32
1947 #endif
1948 
1949 #if N_SYS_SPINDLE > N_SPINDLE
1950 #undef N_SYS_SPINDLE
1951 #define N_SYS_SPINDLE N_SPINDLE
1952 #endif
1953 
1954 #if N_SYS_SPINDLE < 1
1955 #undef N_SYS_SPINDLE
1956 #define N_SYS_SPINDLE 1
1957 #endif
1958 
1959 #if N_SYS_SPINDLE > 8
1960 #undef N_SYS_SPINDLE
1961 #define N_SYS_SPINDLE 8
1962 #endif
1963 
1964 #if NGC_EXPRESSIONS_ENABLE && !NGC_PARAMETERS_ENABLE
1965 #undef NGC_PARAMETERS_ENABLE
1966 #define NGC_PARAMETERS_ENABLE On
1967 #endif
1968 
1969 #if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
1970  #error "WCO busy refresh is less than idle refresh."
1971 #endif
1972 #if (REPORT_OVERRIDE_REFRESH_BUSY_COUNT < REPORT_OVERRIDE_REFRESH_IDLE_COUNT)
1973  #error "Override busy refresh is less than idle refresh."
1974 #endif
1975 #if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
1976  #error "WCO refresh must be greater than one."
1977 #endif
1978 #if (REPORT_OVERRIDE_REFRESH_IDLE_COUNT < 1)
1979  #error "Override refresh must be greater than zero."
1980 #endif
1981 
1982 #if DEFAULT_LASER_MODE && DEFAULT_LATHE_MODE
1983 #error "Cannot enable laser and lathe mode at the same time!"
1984 #endif
1985 
1986 #if LATHE_UVW_OPTION && (N_AXIS > 6 || AXIS_REMAP_ABC2UVW)
1987 #warning "Cannot enable lathe UVW option when N_AXIS > 6 or ABC words are remapped!"
1988 #undef LATHE_UVW_OPTION
1989 #define LATHE_UVW_OPTION Off
1990 #endif
1991 
1992 #if DEFAULT_CONTROL_SIGNALS_INVERT_MASK < 0
1993 #undef DEFAULT_CONTROL_SIGNALS_INVERT_MASK
1994 #define DEFAULT_CONTROL_SIGNALS_INVERT_MASK SIGNALS_BITMASK
1995 #endif
1996 
1997 #if DEFAULT_LIMIT_SIGNALS_INVERT_MASK < 0
1998 #undef DEFAULT_LIMIT_SIGNALS_INVERT_MASK
1999 #define DEFAULT_LIMIT_SIGNALS_INVERT_MASK AXES_BITMASK
2000 #endif
2001 
2002 #if DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK < 0
2003 #undef DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK
2004 #define DEFAULT_LIMIT_SIGNALS_PULLUP_DISABLE_MASK AXES_BITMASK
2005 #endif
2006 
2007 #if DEFAULT_STEP_SIGNALS_INVERT_MASK < 0
2008 #undef DEFAULT_STEP_SIGNALS_INVERT_MASK
2009 #define DEFAULT_STEP_SIGNALS_INVERT_MASK AXES_BITMASK
2010 #endif
2011 
2012 #if DEFAULT_ENABLE_SIGNALS_INVERT_MASK < 0
2013 #undef DEFAULT_ENABLE_SIGNALS_INVERT_MASK
2014 #define DEFAULT_ENABLE_SIGNALS_INVERT_MASK AXES_BITMASK
2015 #endif
2016 
2017 #if DEFAULT_PARKING_ENABLE > 0
2018  #if DEFAULT_HOMING_FORCE_SET_ORIGIN > 0
2019  #error "DEFAULT_HOMING_FORCE_SET_ORIGIN is not supported with DEFAULT_PARKING_ENABLE at this time."
2020  #endif
2021 #endif
2022 
2023 #if DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL > 0
2024  #if DEFAULT_PARKING_ENABLE < 1
2025  #error "DEFAULT_ENABLE_PARKING_OVERRIDE_CONTROL must be enabled with DEFAULT_PARKING_ENABLE."
2026  #endif
2027 #endif
2028 
2083 #endif // _GRBL_CONFIG_H_