diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index fee89898a3..61377189a8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -547,7 +547,7 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_6 0 #define TEMP_SENSOR_7 0 -#define TEMP_SENSOR_BED 0 +#define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_COOLER 0 diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 70644ddf0d..343ebae1ff 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -688,8 +688,6 @@ #define TEMP_SENSOR_BED_IS_CUSTOM 1 #endif #else - #undef THERMAL_PROTECTION_BED - #undef THERMAL_PROTECTION_BED_PERIOD #undef BED_MINTEMP #undef BED_MAXTEMP #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index d137e1d9c1..5794a96b8b 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2240,8 +2240,11 @@ #if HOTENDS > 7 && HAS_ADC_TEST(7) #define HAS_TEMP_ADC_7 1 #endif -#if HAS_ADC_TEST(BED) - #define HAS_TEMP_ADC_BED 1 +#if TEMP_SENSOR_BED + #define HAS_HEATED_BED 1 + #if HAS_ADC_TEST(BED) + #define HAS_TEMP_ADC_BED 1 + #endif #endif #if HAS_ADC_TEST(PROBE) #define HAS_TEMP_ADC_PROBE 1 @@ -2262,7 +2265,7 @@ #define HAS_TEMP_ADC_REDUNDANT 1 #endif -#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || EITHER(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY)) +#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || HAS_TEMP_ADC_##N || TEMP_SENSOR_##N##_IS_DUMMY) #if HAS_HOTEND && HAS_TEMP(0) #define HAS_TEMP_HOTEND 1 #endif @@ -2331,10 +2334,12 @@ #if PIN_EXISTS(HEATER_BED) #define HAS_HEATER_BED 1 #endif +#if PIN_EXISTS(HEATER_CHAMBER) + #define HAS_HEATER_CHAMBER 1 +#endif // Shorthand for common combinations -#if HAS_TEMP_BED && HAS_HEATER_BED - #define HAS_HEATED_BED 1 +#if HAS_HEATED_BED #ifndef BED_OVERSHOOT #define BED_OVERSHOOT 10 #endif @@ -2361,7 +2366,7 @@ #define HAS_TEMP_SENSOR 1 #endif -#if HAS_TEMP_CHAMBER && PIN_EXISTS(HEATER_CHAMBER) +#if HAS_TEMP_CHAMBER && HAS_HEATER_CHAMBER #define HAS_HEATED_CHAMBER 1 #ifndef CHAMBER_OVERSHOOT #define CHAMBER_OVERSHOOT 10 @@ -2388,6 +2393,7 @@ // Thermal protection #if !HAS_HEATED_BED #undef THERMAL_PROTECTION_BED + #undef THERMAL_PROTECTION_BED_PERIOD #endif #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 #define WATCH_HOTENDS 1 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 78630051b6..89cf8c5198 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -127,6 +127,17 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #undef _ISMAX_1 #undef _ISSNS_1 +/** + * Heated Bed requirements + */ +#if HAS_HEATED_BED + #if !HAS_TEMP_BED + #error "The Heated Bed requires a TEMP_BED_PIN or Thermocouple." + #elif !HAS_HEATER_BED + #error "The Heated Bed requires HEATER_BED_PIN." + #endif +#endif + /** * Hephestos 2 Heated Bed Kit requirements */ diff --git a/buildroot/tests/DUE b/buildroot/tests/DUE index c43d30c76e..81e60c9623 100755 --- a/buildroot/tests/DUE +++ b/buildroot/tests/DUE @@ -47,6 +47,6 @@ exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, # Test SWITCHING_EXTRUDER # restore_configs -opt_set MOTHERBOARD BOARD_RAMPS4DUE_EEF LCD_LANGUAGE fi EXTRUDERS 2 NUM_SERVOS 1 +opt_set MOTHERBOARD BOARD_RAMPS4DUE_EEF LCD_LANGUAGE fi EXTRUDERS 2 TEMP_SENSOR_BED 0 NUM_SERVOS 1 opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER BEEP_ON_FEEDRATE_CHANGE POWER_LOSS_RECOVERY exec_test $1 $2 "RAMPS4DUE_EEF with SWITCHING_EXTRUDER, POWER_LOSS_RECOVERY" "$3" diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index 1490c9e4aa..46de664e43 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -90,7 +90,7 @@ exec_test $1 $2 "E Axis Only | DOGM MarlinUI" "$3" # restore_configs opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \ - NUM_RUNOUT_SENSORS E_STEPPERS REDUNDANT_PART_COOLING_FAN 1 \ + NUM_RUNOUT_SENSORS E_STEPPERS TEMP_SENSOR_BED 0 REDUNDANT_PART_COOLING_FAN 1 \ FIL_RUNOUT2_PIN 16 FIL_RUNOUT3_PIN 17 FIL_RUNOUT4_PIN 4 FIL_RUNOUT5_PIN 5 opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z \ diff --git a/buildroot/tests/rumba32 b/buildroot/tests/rumba32 index 833769d0b9..c3d7603e4e 100755 --- a/buildroot/tests/rumba32 +++ b/buildroot/tests/rumba32 @@ -13,7 +13,7 @@ opt_set MOTHERBOARD BOARD_RUMBA32_V1_0 SERIAL_PORT -1 \ opt_disable PIDTEMP opt_enable PIDTEMPBED FAN_SOFT_PWM opt_disable THERMAL_PROTECTION_BED -exec_test $1 $2 "RUMBA32 V1.0 with TMC2130, PID Bed, and bed thermal protection disabled" "$3" +exec_test $1 $2 "RUMBA32 V1.0 with TMC2130, PID Bed, no Bed Thermal Protection" "$3" # Build examples restore_configs