Add HAS_FAN and others

This commit is contained in:
Scott Lahteine
2020-04-27 04:41:18 -05:00
parent 3d45a4bd23
commit 8b3c7dda75
35 changed files with 85 additions and 90 deletions

View File

@ -408,6 +408,8 @@
*/
#if EXTRUDERS == 0
#undef EXTRUDERS
#define EXTRUDERS 0
#undef DISTINCT_E_FACTORS
#undef SINGLENOZZLE
#undef SWITCHING_EXTRUDER

View File

@ -1707,6 +1707,7 @@
// Shorthand for common combinations
#if HAS_TEMP_BED && HAS_HEATER_BED
#define HAS_HEATED_BED 1
#define BED_MAX_TARGET (BED_MAXTEMP - 10)
#endif
#if HAS_HEATED_BED || HAS_TEMP_CHAMBER
#define BED_OR_CHAMBER 1
@ -2084,6 +2085,7 @@
#endif
#if FAN_COUNT > 0
#define HAS_FAN 1
#define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ FAN_INVERTING)
#endif

View File

@ -262,7 +262,7 @@
#error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
#elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
#error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
#elif defined(PID_FAN_SCALING) && FAN_COUNT <= 0
#elif defined(PID_FAN_SCALING) && !HAS_FAN
#error "PID_FAN_SCALING needs at least one fan enabled."
#elif defined(min_software_endstops) || defined(max_software_endstops)
#error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."