1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

🔧 Config-related preparations

This commit is contained in:
Scott Lahteine 2024-08-11 16:26:04 -05:00
parent 0790a9d5df
commit 89b0143b09
14 changed files with 371 additions and 85 deletions

View File

@ -70,6 +70,8 @@
#undef FILAMENT_RUNOUT_SENSOR #undef FILAMENT_RUNOUT_SENSOR
#undef FILAMENT_RUNOUT_DISTANCE_MM #undef FILAMENT_RUNOUT_DISTANCE_MM
#undef DISABLE_OTHER_EXTRUDERS #undef DISABLE_OTHER_EXTRUDERS
#undef THERMAL_PROTECTION_HYSTERESIS
#undef THERMAL_PROTECTION_PERIOD
#endif #endif
#define E_OPTARG(N) OPTARG(HAS_MULTI_EXTRUDER, N) #define E_OPTARG(N) OPTARG(HAS_MULTI_EXTRUDER, N)
@ -201,6 +203,10 @@
#undef HOTEND_OFFSET_Z #undef HOTEND_OFFSET_Z
#endif #endif
//
// Remove irrelevant Configuration.h settings
//
// Clean up E-stepper-based settings... // Clean up E-stepper-based settings...
#if E_STEPPERS <= 7 #if E_STEPPERS <= 7
#undef INVERT_E7_DIR #undef INVERT_E7_DIR
@ -235,6 +241,72 @@
#endif #endif
#endif #endif
// Clean up unused temperature sensors and sub-options
#if !TEMP_SENSOR_0
#undef TEMP_SENSOR_0
#endif
#if !TEMP_SENSOR_1
#undef TEMP_SENSOR_1
#endif
#if !TEMP_SENSOR_2
#undef TEMP_SENSOR_2
#endif
#if !TEMP_SENSOR_3
#undef TEMP_SENSOR_3
#endif
#if !TEMP_SENSOR_4
#undef TEMP_SENSOR_4
#endif
#if !TEMP_SENSOR_5
#undef TEMP_SENSOR_5
#endif
#if !TEMP_SENSOR_6
#undef TEMP_SENSOR_6
#endif
#if !TEMP_SENSOR_7
#undef TEMP_SENSOR_7
#endif
#if TEMP_SENSOR_BED
#define HAS_HEATED_BED 1
#else
#undef TEMP_SENSOR_BED
#undef THERMAL_PROTECTION_BED_HYSTERESIS
#undef THERMAL_PROTECTION_BED_PERIOD
#undef MAX_BED_POWER
#endif
#if !TEMP_SENSOR_CHAMBER
#undef TEMP_SENSOR_CHAMBER
#undef THERMAL_PROTECTION_CHAMBER_HYSTERESIS
#undef THERMAL_PROTECTION_CHAMBER_PERIOD
#undef CHAMBER_AUTO_FAN_PIN
#undef CHAMBER_AUTO_FAN_SPEED
#undef CHAMBER_AUTO_FAN_TEMPERATURE
#undef MAX_CHAMBER_POWER
#endif
#if !TEMP_SENSOR_COOLER
#undef TEMP_SENSOR_COOLER
#undef COOLER_AUTO_FAN_PIN
#undef COOLER_AUTO_FAN_SPEED
#undef COOLER_AUTO_FAN_TEMPERATURE
#endif
#if !TEMP_SENSOR_PROBE
#undef TEMP_SENSOR_PROBE
#endif
#if !TEMP_SENSOR_REDUNDANT
#undef TEMP_SENSOR_REDUNDANT
#endif
#if !TEMP_SENSOR_BOARD
#undef TEMP_SENSOR_BOARD
#endif
#if !TEMP_SENSOR_SOC
#undef TEMP_SENSOR_SOC
#endif
#if !SOFT_PWM_SCALE
#undef SOFT_PWM_SCALE
#endif
/** /**
* Number of Linear Axes (e.g., XYZIJKUVW) * Number of Linear Axes (e.g., XYZIJKUVW)
* All the logical axes except for the tool (E) axis * All the logical axes except for the tool (E) axis
@ -296,12 +368,20 @@
#endif #endif
#endif #endif
#if HAS_Z_AXIS
#ifdef Z4_DRIVER_TYPE
#define NUM_Z_STEPPERS 4
#elif defined(Z3_DRIVER_TYPE)
#define NUM_Z_STEPPERS 3
#elif defined(Z2_DRIVER_TYPE)
#define NUM_Z_STEPPERS 2
#else
#define NUM_Z_STEPPERS 1
#endif
#endif
#if !HAS_X_AXIS #if !HAS_X_AXIS
#undef AVOID_OBSTACLES #undef AVOID_OBSTACLES
#undef ENDSTOPPULLUP_XMIN
#undef ENDSTOPPULLUP_XMAX
#undef X_MIN_ENDSTOP_HIT_STATE
#undef X_MAX_ENDSTOP_HIT_STATE
#undef X2_DRIVER_TYPE #undef X2_DRIVER_TYPE
#undef X_ENABLE_ON #undef X_ENABLE_ON
#undef DISABLE_X #undef DISABLE_X
@ -312,14 +392,12 @@
#undef MANUAL_X_HOME_POS #undef MANUAL_X_HOME_POS
#undef MIN_SOFTWARE_ENDSTOPS #undef MIN_SOFTWARE_ENDSTOPS
#undef MAX_SOFTWARE_ENDSTOPS #undef MAX_SOFTWARE_ENDSTOPS
#undef MIN_SOFTWARE_ENDSTOP_X
#undef MAX_SOFTWARE_ENDSTOP_X
#endif #endif
#if !HAS_Y_AXIS #if !HAS_Y_AXIS
#undef AVOID_OBSTACLES #undef AVOID_OBSTACLES
#undef ENDSTOPPULLUP_YMIN
#undef ENDSTOPPULLUP_YMAX
#undef Y_MIN_ENDSTOP_HIT_STATE
#undef Y_MAX_ENDSTOP_HIT_STATE
#undef Y2_DRIVER_TYPE #undef Y2_DRIVER_TYPE
#undef Y_ENABLE_ON #undef Y_ENABLE_ON
#undef DISABLE_Y #undef DISABLE_Y
@ -332,21 +410,7 @@
#undef MAX_SOFTWARE_ENDSTOP_Y #undef MAX_SOFTWARE_ENDSTOP_Y
#endif #endif
#if HAS_Z_AXIS #if !HAS_Z_AXIS
#ifdef Z4_DRIVER_TYPE
#define NUM_Z_STEPPERS 4
#elif defined(Z3_DRIVER_TYPE)
#define NUM_Z_STEPPERS 3
#elif defined(Z2_DRIVER_TYPE)
#define NUM_Z_STEPPERS 2
#else
#define NUM_Z_STEPPERS 1
#endif
#else
#undef ENDSTOPPULLUP_ZMIN
#undef ENDSTOPPULLUP_ZMAX
#undef Z_MIN_ENDSTOP_HIT_STATE
#undef Z_MAX_ENDSTOP_HIT_STATE
#undef Z2_DRIVER_TYPE #undef Z2_DRIVER_TYPE
#undef Z3_DRIVER_TYPE #undef Z3_DRIVER_TYPE
#undef Z4_DRIVER_TYPE #undef Z4_DRIVER_TYPE
@ -363,10 +427,6 @@
#endif #endif
#if !HAS_I_AXIS #if !HAS_I_AXIS
#undef ENDSTOPPULLUP_IMIN
#undef ENDSTOPPULLUP_IMAX
#undef I_MIN_ENDSTOP_HIT_STATE
#undef I_MAX_ENDSTOP_HIT_STATE
#undef I_ENABLE_ON #undef I_ENABLE_ON
#undef DISABLE_I #undef DISABLE_I
#undef INVERT_I_DIR #undef INVERT_I_DIR
@ -379,10 +439,6 @@
#endif #endif
#if !HAS_J_AXIS #if !HAS_J_AXIS
#undef ENDSTOPPULLUP_JMIN
#undef ENDSTOPPULLUP_JMAX
#undef J_MIN_ENDSTOP_HIT_STATE
#undef J_MAX_ENDSTOP_HIT_STATE
#undef J_ENABLE_ON #undef J_ENABLE_ON
#undef DISABLE_J #undef DISABLE_J
#undef INVERT_J_DIR #undef INVERT_J_DIR
@ -395,10 +451,6 @@
#endif #endif
#if !HAS_K_AXIS #if !HAS_K_AXIS
#undef ENDSTOPPULLUP_KMIN
#undef ENDSTOPPULLUP_KMAX
#undef K_MIN_ENDSTOP_HIT_STATE
#undef K_MAX_ENDSTOP_HIT_STATE
#undef K_ENABLE_ON #undef K_ENABLE_ON
#undef DISABLE_K #undef DISABLE_K
#undef INVERT_K_DIR #undef INVERT_K_DIR
@ -411,10 +463,6 @@
#endif #endif
#if !HAS_U_AXIS #if !HAS_U_AXIS
#undef ENDSTOPPULLUP_UMIN
#undef ENDSTOPPULLUP_UMAX
#undef U_MIN_ENDSTOP_HIT_STATE
#undef U_MAX_ENDSTOP_HIT_STATE
#undef U_ENABLE_ON #undef U_ENABLE_ON
#undef DISABLE_U #undef DISABLE_U
#undef INVERT_U_DIR #undef INVERT_U_DIR
@ -427,10 +475,6 @@
#endif #endif
#if !HAS_V_AXIS #if !HAS_V_AXIS
#undef ENDSTOPPULLUP_VMIN
#undef ENDSTOPPULLUP_VMAX
#undef V_MIN_ENDSTOP_HIT_STATE
#undef V_MAX_ENDSTOP_HIT_STATE
#undef V_ENABLE_ON #undef V_ENABLE_ON
#undef DISABLE_V #undef DISABLE_V
#undef INVERT_V_DIR #undef INVERT_V_DIR
@ -443,10 +487,6 @@
#endif #endif
#if !HAS_W_AXIS #if !HAS_W_AXIS
#undef ENDSTOPPULLUP_WMIN
#undef ENDSTOPPULLUP_WMAX
#undef W_MIN_ENDSTOP_HIT_STATE
#undef W_MAX_ENDSTOP_HIT_STATE
#undef W_ENABLE_ON #undef W_ENABLE_ON
#undef DISABLE_W #undef DISABLE_W
#undef INVERT_W_DIR #undef INVERT_W_DIR
@ -1151,6 +1191,19 @@
#endif #endif
#endif #endif
/**
* Unused LCD options
*/
#if NONE(HAS_MARLINUI_HD44780, IS_DWIN_MARLINUI, IS_TFTGLCD_PANEL) && !MB(SIMULATED)
#undef DISPLAY_CHARSET_HD44780
#endif
#if !HAS_MARLINUI_HD44780
#undef LCD_INFO_SCREEN_STYLE
#endif
#if NONE(HAS_MARLINUI_U8GLIB, HAS_TFT_LVGL_UI)
#undef LCD_LANGUAGE
#endif
/** /**
* Disable unused SINGLENOZZLE sub-options * Disable unused SINGLENOZZLE sub-options
*/ */
@ -1585,6 +1638,14 @@
#define PROBE_SELECTED 1 #define PROBE_SELECTED 1
#endif #endif
#if !HAS_MESH
#undef MESH_INSET
#endif
#if DISABLED(ENABLE_LEVELING_FADE_HEIGHT)
#undef DEFAULT_LEVELING_FADE_HEIGHT
#endif
#ifdef GRID_MAX_POINTS_X #ifdef GRID_MAX_POINTS_X
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)) #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
#define GRID_LOOP(A,B) for (uint8_t A = 0; A < GRID_MAX_POINTS_X; ++A) for (uint8_t B = 0; B < GRID_MAX_POINTS_Y; ++B) #define GRID_LOOP(A,B) for (uint8_t A = 0; A < GRID_MAX_POINTS_X; ++A) for (uint8_t B = 0; B < GRID_MAX_POINTS_Y; ++B)

View File

@ -83,6 +83,9 @@
// Convenience override for a BLTouch alone // Convenience override for a BLTouch alone
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
#ifndef BLTOUCH_DELAY
#define BLTOUCH_DELAY 500
#endif
#ifdef BLTOUCH_HS_MODE #ifdef BLTOUCH_HS_MODE
#define HAS_BLTOUCH_HS_MODE 1 #define HAS_BLTOUCH_HS_MODE 1
#endif #endif
@ -622,6 +625,10 @@
#define HAS_MAX31865 1 #define HAS_MAX31865 1
#endif #endif
#if !HAS_MAX_TC
#undef THERMOCOUPLE_MAX_ERRORS
#endif
#if TEMP_SENSOR_3 == -4 #if TEMP_SENSOR_3 == -4
#define TEMP_SENSOR_3_IS_AD8495 1 #define TEMP_SENSOR_3_IS_AD8495 1
#elif TEMP_SENSOR_3 == -3 #elif TEMP_SENSOR_3 == -3
@ -819,6 +826,15 @@
#endif #endif
#endif #endif
#if !ANY_THERMISTOR_IS(-1)
#undef TEMP_SENSOR_AD595_GAIN
#undef TEMP_SENSOR_AD595_OFFSET
#endif
#if !ANY_THERMISTOR_IS(-4)
#undef TEMP_SENSOR_AD8495_GAIN
#undef TEMP_SENSOR_AD8495_OFFSET
#endif
#if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND || HAS_PRUSA_MMU2 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1) #if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND || HAS_PRUSA_MMU2 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1)
#define HAS_TOOLCHANGE 1 #define HAS_TOOLCHANGE 1
#endif #endif
@ -869,6 +885,10 @@
#define HAS_PRINT_PROGRESS 1 #define HAS_PRINT_PROGRESS 1
#endif #endif
#if !ALL(HAS_MARLINUI_MENU, HAS_MEDIA)
#undef SD_MENU_CONFIRM_START
#endif
#if DISABLED(SET_PROGRESS_MANUALLY) #if DISABLED(SET_PROGRESS_MANUALLY)
#undef SET_REMAINING_TIME #undef SET_REMAINING_TIME
#undef SET_INTERACTION_TIME #undef SET_INTERACTION_TIME

View File

@ -387,8 +387,10 @@
#undef Z_SAFE_HOMING #undef Z_SAFE_HOMING
#endif #endif
#ifndef MESH_INSET #ifdef MESH_INSET
#define MESH_INSET 0 #define _MESH_INSET (MESH_INSET)
#else
#define _MESH_INSET 0
#endif #endif
/** /**
@ -397,7 +399,7 @@
#if ENABLED(Z_SAFE_HOMING) #if ENABLED(Z_SAFE_HOMING)
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
// Home close to center so grid points have z heights very close to 0 // Home close to center so grid points have z heights very close to 0
#define _SAFE_POINT(A) (((GRID_MAX_POINTS_##A) / 2) * (A##_BED_SIZE - 2 * (MESH_INSET)) / (GRID_MAX_POINTS_##A - 1) + MESH_INSET) #define _SAFE_POINT(A) (((GRID_MAX_POINTS_##A) / 2) * (A##_BED_SIZE - 2 * _MESH_INSET) / (GRID_MAX_POINTS_##A - 1) + _MESH_INSET)
#else #else
#define _SAFE_POINT(A) A##_CENTER #define _SAFE_POINT(A) A##_CENTER
#endif #endif
@ -428,13 +430,6 @@
#define MAX_AUTORETRACT 99 #define MAX_AUTORETRACT 99
#endif #endif
/**
* Provide a DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT in case NO_VOLUMETRICS is enabled
*/
#ifndef DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT
#define DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT 0.00
#endif
/** /**
* LCD Contrast for Graphical Displays * LCD Contrast for Graphical Displays
*/ */
@ -2350,6 +2345,138 @@
#endif #endif
#endif #endif
#if !USE_X_MIN
#undef ENDSTOPPULLUP_XMIN
#undef ENDSTOPPULLDOWN_XMIN
#endif
#if !USE_X_MAX
#undef ENDSTOPPULLUP_XMAX
#undef ENDSTOPPULLDOWN_XMAX
#endif
#if !USE_Y_MIN
#undef ENDSTOPPULLUP_YMIN
#undef ENDSTOPPULLDOWN_YMIN
#endif
#if !USE_Y_MAX
#undef ENDSTOPPULLUP_YMAX
#undef ENDSTOPPULLDOWN_YMAX
#endif
#if !USE_Z_MIN
#undef ENDSTOPPULLUP_ZMIN
#undef ENDSTOPPULLDOWN_ZMIN
#endif
#if !USE_Z_MAX
#undef ENDSTOPPULLUP_ZMAX
#undef ENDSTOPPULLDOWN_ZMAX
#endif
#if !USE_I_MIN
#undef ENDSTOPPULLUP_IMIN
#undef ENDSTOPPULLDOWN_IMIN
#endif
#if !USE_I_MAX
#undef ENDSTOPPULLUP_IMAX
#undef ENDSTOPPULLDOWN_IMAX
#endif
#if !USE_J_MIN
#undef ENDSTOPPULLUP_JMIN
#undef ENDSTOPPULLDOWN_JMIN
#endif
#if !USE_J_MAX
#undef ENDSTOPPULLUP_JMAX
#undef ENDSTOPPULLDOWN_JMAX
#endif
#if !USE_K_MIN
#undef ENDSTOPPULLUP_KMIN
#undef ENDSTOPPULLDOWN_KMIN
#endif
#if !USE_K_MAX
#undef ENDSTOPPULLUP_KMAX
#undef ENDSTOPPULLDOWN_KMAX
#endif
#if !USE_U_MIN
#undef ENDSTOPPULLUP_UMIN
#undef ENDSTOPPULLDOWN_UMIN
#endif
#if !USE_U_MAX
#undef ENDSTOPPULLUP_UMAX
#undef ENDSTOPPULLDOWN_UMAX
#endif
#if !USE_V_MIN
#undef ENDSTOPPULLUP_VMIN
#undef ENDSTOPPULLDOWN_VMIN
#endif
#if !USE_V_MAX
#undef ENDSTOPPULLUP_VMAX
#undef ENDSTOPPULLDOWN_VMAX
#endif
#if !USE_W_MIN
#undef ENDSTOPPULLUP_WMIN
#undef ENDSTOPPULLDOWN_WMIN
#endif
#if !USE_W_MAX
#undef ENDSTOPPULLUP_WMAX
#undef ENDSTOPPULLDOWN_WMAX
#endif
#define PCAT(P) P##_PIN
#define NEED_HIT_STATE(P) (USE_##P || (PIN_EXISTS(P##_PIN) && ((defined(X2_STOP_PIN) && X2_STOP_PIN == PCAT(P)) || (defined(Y2_STOP_PIN) && Y2_STOP_PIN == PCAT(P)) || (defined(Z2_STOP_PIN) && Z2_STOP_PIN == PCAT(P)) || (defined(Z3_STOP_PIN) && Z3_STOP_PIN == PCAT(P)) || (defined(Z4_STOP_PIN) && Z4_STOP_PIN == PCAT(P)))))
#if !NEED_HIT_STATE(X_MIN)
#undef X_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(X_MAX)
#undef X_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(Y_MIN)
#undef Y_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(Y_MAX)
#undef Y_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(Z_MIN)
#undef Z_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(Z_MAX)
#undef Z_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(I_MIN)
#undef I_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(I_MAX)
#undef I_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(J_MIN)
#undef J_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(J_MAX)
#undef J_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(K_MIN)
#undef K_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(K_MAX)
#undef K_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(U_MIN)
#undef U_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(U_MAX)
#undef U_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(V_MIN)
#undef V_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(V_MAX)
#undef V_MAX_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(W_MIN)
#undef W_MIN_ENDSTOP_HIT_STATE
#endif
#if !NEED_HIT_STATE(W_MAX)
#undef W_MAX_ENDSTOP_HIT_STATE
#endif
#undef NEED_HIT_STATE
#undef PCAT
// //
// ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface) // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
// //
@ -2573,8 +2700,10 @@
#if HAS_TEMP_COOLER && PIN_EXISTS(COOLER_AUTO_FAN) #if HAS_TEMP_COOLER && PIN_EXISTS(COOLER_AUTO_FAN)
#define HAS_AUTO_COOLER_FAN 1 #define HAS_AUTO_COOLER_FAN 1
#endif #endif
#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7)
#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN, HAS_AUTO_COOLER_FAN) #define HAS_E_AUTO_FAN 1
#endif
#if ANY(HAS_E_AUTO_FAN, HAS_AUTO_CHAMBER_FAN, HAS_AUTO_COOLER_FAN)
#define HAS_AUTO_FAN 1 #define HAS_AUTO_FAN 1
#define _FANOVERLAP(I,T) (T##_AUTO_FAN_PIN == E##I##_AUTO_FAN_PIN) #define _FANOVERLAP(I,T) (T##_AUTO_FAN_PIN == E##I##_AUTO_FAN_PIN)
#if HAS_AUTO_CHAMBER_FAN #if HAS_AUTO_CHAMBER_FAN
@ -2632,6 +2761,19 @@
#define HAS_AUTO_REPORTING 1 #define HAS_AUTO_REPORTING 1
#endif #endif
#if !HAS_AUTO_CHAMBER_FAN
#undef CHAMBER_AUTO_FAN_SPEED
#undef CHAMBER_AUTO_FAN_TEMPERATURE
#endif
#if !HAS_AUTO_COOLER_FAN
#undef COOLER_AUTO_FAN_SPEED
#undef COOLER_AUTO_FAN_TEMPERATURE
#endif
#if !HAS_E_AUTO_FAN
#undef EXTRUDER_AUTO_FAN_SPEED
#undef EXTRUDER_AUTO_FAN_TEMPERATURE
#endif
#if !HAS_AUTO_CHAMBER_FAN || AUTO_CHAMBER_IS_E #if !HAS_AUTO_CHAMBER_FAN || AUTO_CHAMBER_IS_E
#undef AUTO_POWER_CHAMBER_FAN #undef AUTO_POWER_CHAMBER_FAN
#endif #endif
@ -2750,6 +2892,10 @@
#if PIN_EXISTS(FANMUX0) #if PIN_EXISTS(FANMUX0)
#define HAS_FANMUX 1 // Part Cooling fan multipliexer #define HAS_FANMUX 1 // Part Cooling fan multipliexer
#else
#undef FANMUX0_PIN
#undef FANMUX1_PIN
#undef FANMUX2_PIN
#endif #endif
/** /**
@ -2855,6 +3001,8 @@
#endif #endif
#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_U_MS_PINS, HAS_V_MS_PINS, HAS_W_MS_PINS, HAS_SOME_E_MS_PINS) #if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_U_MS_PINS, HAS_V_MS_PINS, HAS_W_MS_PINS, HAS_SOME_E_MS_PINS)
#define HAS_MICROSTEPS 1 #define HAS_MICROSTEPS 1
#else
#undef MICROSTEP_MODES
#endif #endif
/** /**
@ -3149,10 +3297,6 @@
#endif #endif
#endif #endif
#ifndef DEFAULT_LEVELING_FADE_HEIGHT
#define DEFAULT_LEVELING_FADE_HEIGHT 0.0
#endif
#if ENABLED(SEGMENT_LEVELED_MOVES) && !defined(LEVELED_SEGMENT_LENGTH) #if ENABLED(SEGMENT_LEVELED_MOVES) && !defined(LEVELED_SEGMENT_LENGTH)
#define LEVELED_SEGMENT_LENGTH 5 #define LEVELED_SEGMENT_LENGTH 5
#endif #endif
@ -3165,16 +3309,16 @@
// Probing points may be verified at compile time within the radius // Probing points may be verified at compile time within the radius
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(PRINTABLE_RADIUS),"bad probe point!") // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(PRINTABLE_RADIUS),"bad probe point!")
// so that may be added to SanityCheck.h in the future. // so that may be added to SanityCheck.h in the future.
#define _MESH_MIN_X (X_MIN_BED + (MESH_INSET)) #define _MESH_MIN_X (X_MIN_BED + _MESH_INSET)
#define _MESH_MIN_Y (Y_MIN_BED + (MESH_INSET)) #define _MESH_MIN_Y (Y_MIN_BED + _MESH_INSET)
#define _MESH_MAX_X (X_MAX_BED - (MESH_INSET)) #define _MESH_MAX_X (X_MAX_BED - _MESH_INSET)
#define _MESH_MAX_Y (Y_MAX_BED - (MESH_INSET)) #define _MESH_MAX_Y (Y_MAX_BED - _MESH_INSET)
#else #else
// Boundaries for Cartesian probing based on set limits // Boundaries for Cartesian probing based on set limits
#define _MESH_MIN_X (_MAX(X_MIN_BED + (MESH_INSET), X_MIN_POS)) // UBL is careful not to probe off the bed. It doesn't #define _MESH_MIN_X (_MAX(X_MIN_BED + _MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It doesn't
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + (MESH_INSET), Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions. #define _MESH_MIN_Y (_MAX(Y_MIN_BED + _MESH_INSET, Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions.
#define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS)) #define _MESH_MAX_X (_MIN(X_MAX_BED - _MESH_INSET, X_MAX_POS))
#define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS)) #define _MESH_MAX_Y (_MIN(Y_MAX_BED - _MESH_INSET, Y_MAX_POS))
#endif #endif
// These may be overridden in Configuration.h if a smaller area is desired // These may be overridden in Configuration.h if a smaller area is desired

View File

@ -1622,6 +1622,9 @@ void RTS::handleData() {
float meshVal = float(recdat.data[0] - (recdat.data[0] >= 32768 ? 65536 : 0)) / 1000; float meshVal = float(recdat.data[0] - (recdat.data[0] >= 32768 ? 65536 : 0)) / 1000;
#ifndef Z_PROBE_LOW_POINT
#define Z_PROBE_LOW_POINT -2
#endif
LIMIT(meshVal, Z_PROBE_LOW_POINT, Z_CLEARANCE_BETWEEN_PROBES); LIMIT(meshVal, Z_PROBE_LOW_POINT, Z_CLEARANCE_BETWEEN_PROBES);
xy_uint8_t point = { xPnt, yPnt }; xy_uint8_t point = { xPnt, yPnt };
setMeshPoint(point, meshVal); setMeshPoint(point, meshVal);

View File

@ -816,7 +816,7 @@ void MarlinUI::init() {
// Add a manual move to the queue? // Add a manual move to the queue?
if (axis == NO_AXIS_ENUM || PENDING(millis(), start_time) || planner.is_full()) return; if (axis == NO_AXIS_ENUM || PENDING(millis(), start_time) || planner.is_full()) return;
const feedRate_t fr_mm_s = (axis < LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; const feedRate_t fr_mm_s = (axis < LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : PLANNER_XY_FEEDRATE_MM_S;
/** /**
* For a rotational axis apply the "inch" to "mm" conversion factor. This mimics behaviour of the G-code G1 * For a rotational axis apply the "inch" to "mm" conversion factor. This mimics behaviour of the G-code G1

View File

@ -571,7 +571,7 @@ void do_blocking_move_to(NUM_AXIS_ARGS_(const_float_t) const_feedRate_t fr_mm_s/
if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", NUM_AXIS_ARGS()); if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", NUM_AXIS_ARGS());
#endif #endif
const feedRate_t xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S); const feedRate_t xy_feedrate = fr_mm_s ?: feedRate_t(PLANNER_XY_FEEDRATE_MM_S);
#if HAS_Z_AXIS #if HAS_Z_AXIS
const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS); const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS);
@ -1492,7 +1492,7 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool
if (planner.buffer_line(raised, fr_zfast)) { if (planner.buffer_line(raised, fr_zfast)) {
// 2. Move to the current native XY and raised Z. Presumably this is a null move. // 2. Move to the current native XY and raised Z. Presumably this is a null move.
xyze_pos_t curpos = current_position; curpos.z = raised_parked_position.z; xyze_pos_t curpos = current_position; curpos.z = raised_parked_position.z;
if (planner.buffer_line(curpos, PLANNER_XY_FEEDRATE())) { if (planner.buffer_line(curpos, PLANNER_XY_FEEDRATE_MM_S)) {
// 3. Lower Z back down // 3. Lower Z back down
line_to_current_position(fr_zfast); line_to_current_position(fr_zfast);
} }

View File

@ -68,7 +68,7 @@ extern xyz_pos_t cartes;
#elif defined(XY_PROBE_FEEDRATE) #elif defined(XY_PROBE_FEEDRATE)
#define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_FEEDRATE) #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_FEEDRATE)
#else #else
#define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE() #define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE_MM_S
#endif #endif
#if HAS_BED_PROBE #if HAS_BED_PROBE

View File

@ -1114,7 +1114,13 @@ class Planner {
#endif // HAS_JUNCTION_DEVIATION #endif // HAS_JUNCTION_DEVIATION
}; };
#define PLANNER_XY_FEEDRATE() _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) #if HAS_Y_AXIS
#define PLANNER_XY_FEEDRATE_MM_S _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS])
#elif HAS_X_AXIS
#define PLANNER_XY_FEEDRATE_MM_S planner.settings.max_feedrate_mm_s[X_AXIS]
#else
#define PLANNER_XY_FEEDRATE_MM_S 60.0f
#endif
#define ANY_AXIS_MOVES(BLOCK) \ #define ANY_AXIS_MOVES(BLOCK) \
(false NUM_AXIS_GANG( \ (false NUM_AXIS_GANG( \

View File

@ -349,8 +349,10 @@ public:
#endif #endif
private: private:
static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s); #if HAS_BED_PROBE
static float run_z_probe(const bool sanity_check=true, const_float_t z_min_point=Z_PROBE_LOW_POINT, const_float_t z_clearance=Z_TWEEN_SAFE_CLEARANCE); static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s);
static float run_z_probe(const bool sanity_check=true, const_float_t z_min_point=Z_PROBE_LOW_POINT, const_float_t z_clearance=Z_TWEEN_SAFE_CLEARANCE);
#endif
}; };
extern Probe probe; extern Probe probe;

View File

@ -931,7 +931,10 @@ void MarlinSettings::postprocess() {
// Global Leveling // Global Leveling
// //
{ {
const float zfh = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.z_fade_height, (DEFAULT_LEVELING_FADE_HEIGHT)); #ifndef DEFAULT_LEVELING_FADE_HEIGHT
#define DEFAULT_LEVELING_FADE_HEIGHT 0
#endif
const float zfh = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.z_fade_height, DEFAULT_LEVELING_FADE_HEIGHT);
EEPROM_WRITE(zfh); EEPROM_WRITE(zfh);
} }
@ -1320,7 +1323,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
EEPROM_WRITE(planner.volumetric_extruder_limit); EEPROM_WRITE(planner.volumetric_extruder_limit);
#else #else
dummyf = DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT; dummyf = 0.0;
for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummyf); for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummyf);
#endif #endif
@ -1330,7 +1333,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(volumetric_enabled); EEPROM_WRITE(volumetric_enabled);
dummyf = DEFAULT_NOMINAL_FILAMENT_DIA; dummyf = DEFAULT_NOMINAL_FILAMENT_DIA;
for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummyf); for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummyf);
dummyf = DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT; dummyf = 0.0;
for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummyf); for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummyf);
#endif #endif
@ -3311,7 +3314,7 @@ void MarlinSettings::reset() {
// //
// Global Leveling // Global Leveling
// //
TERN_(ENABLE_LEVELING_FADE_HEIGHT, new_z_fade_height = (DEFAULT_LEVELING_FADE_HEIGHT)); TERN_(ENABLE_LEVELING_FADE_HEIGHT, new_z_fade_height = DEFAULT_LEVELING_FADE_HEIGHT);
TERN_(HAS_LEVELING, reset_bed_level()); TERN_(HAS_LEVELING, reset_bed_level());
// //

View File

@ -70,6 +70,52 @@
#include "../feature/spindle_laser.h" #include "../feature/spindle_laser.h"
#endif #endif
#ifndef TEMP_SENSOR_0
#define TEMP_SENSOR_0 0
#endif
#ifndef TEMP_SENSOR_1
#define TEMP_SENSOR_1 0
#endif
#ifndef TEMP_SENSOR_2
#define TEMP_SENSOR_2 0
#endif
#ifndef TEMP_SENSOR_3
#define TEMP_SENSOR_3 0
#endif
#ifndef TEMP_SENSOR_4
#define TEMP_SENSOR_4 0
#endif
#ifndef TEMP_SENSOR_5
#define TEMP_SENSOR_5 0
#endif
#ifndef TEMP_SENSOR_6
#define TEMP_SENSOR_6 0
#endif
#ifndef TEMP_SENSOR_7
#define TEMP_SENSOR_7 0
#endif
#ifndef TEMP_SENSOR_BED
#define TEMP_SENSOR_BED 0
#endif
#ifndef TEMP_SENSOR_BOARD
#define TEMP_SENSOR_BOARD 0
#endif
#ifndef TEMP_SENSOR_CHAMBER
#define TEMP_SENSOR_CHAMBER 0
#endif
#ifndef TEMP_SENSOR_COOLER
#define TEMP_SENSOR_COOLER 0
#endif
#ifndef TEMP_SENSOR_PROBE
#define TEMP_SENSOR_PROBE 0
#endif
#ifndef TEMP_SENSOR_REDUNDANT
#define TEMP_SENSOR_REDUNDANT 0
#endif
#ifndef TEMP_SENSOR_SOC
#define TEMP_SENSOR_SOC 0
#endif
// MAX TC related macros // MAX TC related macros
#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) #define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n)))

View File

@ -13,6 +13,7 @@ opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB \
GRID_MAX_POINTS_X 16 \ GRID_MAX_POINTS_X 16 \
E0_AUTO_FAN_PIN 8 FANMUX0_PIN 53 EXTRUDER_AUTO_FAN_SPEED 100 \ E0_AUTO_FAN_PIN 8 FANMUX0_PIN 53 EXTRUDER_AUTO_FAN_SPEED 100 \
TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 6 HEATER_CHAMBER_PIN 45 \ TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 6 HEATER_CHAMBER_PIN 45 \
BACKLASH_MEASUREMENT_FEEDRATE 600 \
TRAMMING_POINT_XY '{{20,20},{20,20},{20,20},{20,20},{20,20}}' TRAMMING_POINT_NAME_5 '"Point 5"' TRAMMING_POINT_XY '{{20,20},{20,20},{20,20},{20,20},{20,20}}' TRAMMING_POINT_NAME_5 '"Point 5"'
opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \ opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \
FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \ FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \

View File

@ -14,8 +14,8 @@ opt_set MOTHERBOARD BOARD_RAMBO \
EXTRUDERS 2 TEMP_SENSOR_0 -2 TEMP_SENSOR_1 1 TEMP_SENSOR_BED 2 \ EXTRUDERS 2 TEMP_SENSOR_0 -2 TEMP_SENSOR_1 1 TEMP_SENSOR_BED 2 \
TEMP_SENSOR_PROBE 1 TEMP_PROBE_PIN 12 \ TEMP_SENSOR_PROBE 1 TEMP_PROBE_PIN 12 \
TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 3 HEATER_CHAMBER_PIN 45 \ TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 3 HEATER_CHAMBER_PIN 45 \
GRID_MAX_POINTS_X 16 AUTO_POWER_E_TEMP 80 \ GRID_MAX_POINTS_X 16 BACKLASH_MEASUREMENT_FEEDRATE 600 \
FANMUX0_PIN 53 FIL_MOTION1_PIN 45 AUTO_POWER_E_TEMP 80 FANMUX0_PIN 53 FIL_MOTION1_PIN 45
opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \
FIX_MOUNTED_PROBE CODEPENDENT_XY_HOMING PIDTEMPBED PTC_PROBE PTC_BED \ FIX_MOUNTED_PROBE CODEPENDENT_XY_HOMING PIDTEMPBED PTC_PROBE PTC_BED \

View File

@ -98,7 +98,7 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXY" "$3"
# Enable COREXZ # Enable COREXZ
# #
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_TEENSY35_36 opt_set MOTHERBOARD BOARD_TEENSY35_36 BACKLASH_MEASUREMENT_FEEDRATE 600
opt_enable COREXZ BACKLASH_COMPENSATION BACKLASH_GCODE CORE_BACKLASH opt_enable COREXZ BACKLASH_COMPENSATION BACKLASH_GCODE CORE_BACKLASH
exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3" exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3"