Skip to content

Commit

Permalink
assert requirements instead
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 28, 2023
1 parent a7b0b0a commit d60eb85
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 21 deletions.
18 changes: 18 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,24 @@
#define MAX31865_CALIBRATION_OHMS_2 430
#endif

#if HAS_E_TEMP_SENSOR
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif

#if TEMP_SENSOR_BED
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif

#if TEMP_SENSOR_CHAMBER
#define TEMP_CHAMBER_RESIDENCY_TIME 10 // (seconds) Time to wait for chamber to "settle" in M191
#define TEMP_CHAMBER_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif

/**
* Redundant Temperature Sensor (TEMP_SENSOR_REDUNDANT)
*
Expand Down
20 changes: 0 additions & 20 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@
*/
//#define HEPHESTOS2_HEATED_BED_KIT
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
#undef TEMP_SENSOR_BED
#define TEMP_SENSOR_BED 70
#define HEATER_BED_INVERTING true
#endif

Expand All @@ -219,25 +217,7 @@
#endif
#endif

//
// Temperature hysteresis options
//
#if HAS_E_TEMP_SENSOR
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif

#if TEMP_SENSOR_BED
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif

#if TEMP_SENSOR_CHAMBER
#define TEMP_CHAMBER_RESIDENCY_TIME 10 // (seconds) Time to wait for chamber to "settle" in M191
#define TEMP_CHAMBER_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
//#define HEATER_CHAMBER_PIN P2_04 // Required heater on/off pin (example: SKR 1.4 Turbo HE1 plug)
//#define HEATER_CHAMBER_INVERTING false
//#define FAN1_PIN -1 // Remove the fan signal on pin P2_04 (example: SKR 1.4 Turbo HE1 plug)
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 @@ -736,6 +736,17 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#undef _ISMAX_1
#undef _ISSNS_1

/**
* Hephestos 2 Heated Bed Kit requirements
*/
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
#if TEMP_SENSOR_BED != 70
#error "HEPHESTOS2_HEATED_BED_KIT requires TEMP_SENSOR_BED 70."
#elif DISABLED(HEATER_BED_INVERTING)
#error "HEPHESTOS2_HEATED_BED_KIT requires HEATER_BED_INVERTING."
#endif
#endif

/**
* Probe temp compensation requirements
*/
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@
#include "pins_RAMPS_13.h" // ... RAMPS

//
// Used by the Hephestos 2 heated bed upgrade kit
// Hephestos 2 heated bed upgrade kit uses pin 8
//
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
#undef HEATER_BED_PIN
#define HEATER_BED_PIN 8
#define HEATER_BED_INVERTING true
#endif

0 comments on commit d60eb85

Please sign in to comment.