Skip to content

Commit

Permalink
🔧 Default has Heated Bed (MarlinFirmware#25895)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
2 people authored and Andy-Big committed Jul 15, 2023
1 parent cf6759d commit 67afff5
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2243,8 +2243,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
Expand All @@ -2265,7 +2268,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
Expand Down Expand Up @@ -2334,10 +2337,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
Expand All @@ -2364,7 +2369,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
Expand All @@ -2391,6 +2396,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
Expand Down
11 changes: 11 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion buildroot/tests/DUE
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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"
2 changes: 1 addition & 1 deletion buildroot/tests/mega2560
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion buildroot/tests/rumba32
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 67afff5

Please sign in to comment.