diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 978b6297b25a50a4b75c339fc395b3748ee9f035..ce2a002b2b9f48d84abcfaac0b65f0a587a1be10 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -558,9 +558,9 @@ // Other fans #define HAS_FAN0 (PIN_EXISTS(FAN)) - #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN) - #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN) - #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN)) + #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLER_FAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN) + #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLER_FAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN) + #define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN)) // Servos #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8ec8409852a37150c2e18a3d57b692fa6766d1d7..d3ee48a853cd8f921f191e710eb0292859183909 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index dce01b1e3059d5d78936a728b1abb7d658cd5ffe..6515d677d9b1ce7b7a4010ae51573b1d8f918061 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -11471,7 +11471,7 @@ void prepare_move_to_destination() { #endif // BEZIER_CURVE_SUPPORT -#if HAS_CONTROLLERFAN +#if USE_CONTROLLER_FAN void controllerFan() { static millis_t lastMotorOn = 0, // Last time a motor was turned on @@ -11504,12 +11504,12 @@ void prepare_move_to_destination() { uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED; // allows digital or PWM fan output to be used (see M42 handling) - WRITE(CONTROLLERFAN_PIN, speed); - analogWrite(CONTROLLERFAN_PIN, speed); + WRITE(CONTROLLER_FAN_PIN, speed); + analogWrite(CONTROLLER_FAN_PIN, speed); } } -#endif // HAS_CONTROLLERFAN +#endif // USE_CONTROLLER_FAN #if ENABLED(MORGAN_SCARA) @@ -11925,7 +11925,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { } #endif - #if HAS_CONTROLLERFAN + #if USE_CONTROLLER_FAN controllerFan(); // Check if fan should be turned on to cool stepper drivers down #endif @@ -12195,8 +12195,8 @@ void setup() { endstops.enable_z_probe(false); #endif - #if HAS_CONTROLLERFAN - SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan + #if USE_CONTROLLER_FAN + SET_OUTPUT(CONTROLLER_FAN_PIN); //Set pin used for driver cooling fan #endif #if HAS_STEPPER_RESET diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 722d7f58694667a3e15b335fa93ddb22fbfe151a..610a86567e8d6c537d41d06dafa818948506aa6d 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -174,6 +174,8 @@ #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration." #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN) #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)." +#elif defined(CONTROLLERFAN_PIN) + #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h." #endif /** @@ -765,19 +767,21 @@ static_assert(1 >= 0 #endif #endif -#if HAS_FAN0 && CONTROLLERFAN_PIN == FAN_PIN - #error "You cannot set CONTROLLERFAN_PIN equal to FAN_PIN." +#if HAS_FAN0 && CONTROLLER_FAN_PIN == FAN_PIN + #error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN." #endif -#if HAS_CONTROLLERFAN - #if E0_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #elif E1_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #elif E2_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #elif E3_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." +#if USE_CONTROLLER_FAN + #if !HAS_CONTROLLER_FAN + #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h." + #elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN + #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN." + #elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN + #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN." + #elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN + #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN." + #elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN + #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN." #endif #endif diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 0980413c651b8fa741d6f74767044a39e14e11c2..f6f8c40204e6b1a431a9aa46d81d9814fffd69b8 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 3.0 #define TEMP_SENSOR_AD595_GAIN 2.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 8ddb5dde115df19183324db50775f63a77206f3c..4a334780f240d472f0a10a1683221a1e9e2bcb91 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h index 7f803b2bd1f4794c78c966d1655928c708162206..7867bddc7ea899e50232e4b4431727aa53ef98ab 100644 --- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 13af7304a15b6a51b469735a429f97617ad475d9..ab322752b39f4fe7d87cae284584bf6c95b9151c 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index c123e45266ac290e5f625f942084426dcd985a1a..b8ab84e48d49791248fa616b0e27b253a1907d3f 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index ad96b02b9cbc7d16b0a016cc1d959bda9b8aa4ad..32c9114cac1479fda7fbb790439e05a43592cc05 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -187,12 +187,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index a435d0663ba70f90761d5bd43431997c7fa91e5b..7ffc9e04b2b1d25f090ff3cb904f282d1222fd37 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN 2 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + #define CONTROLLER_FAN_PIN 2 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 97aafb9dd4e932aadf45d012489c5103abaa9554..f259c0e423b72ad7af7c77e707e57797f7e89c97 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN 4 // RigidBot: Fans/Water Pump to cool the hotend cool side. -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + #define CONTROLLER_FAN_PIN 4 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 0ea0b21f8dd1cc75291c7547568192ba32b063d3..a7ad075e579ec08ed0b54bf7d14ac1c6dc65c42e 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index ce40edba63cf8bc68586500d23b2b98320a3a814..23e2226ffb18e77d9671695e7a7a54d225107c96 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -174,20 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again - -/********************************************************** - Fan Pins - Fan_0 8 - Extruder 0 fan - Fan_1 6 - Extruder 1 fan - Fan_2 2 - Case fan -***********************************************************/ - -#define CONTROLLERFAN_PIN 2 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 130 // 255 == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + #define CONTROLLER_FAN_PIN 2 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 130 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 54f76d3b5b2853aeead51d24b03c94620a77f4df..94e35794332eee12e2cfea7c994cf366b268217b 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 13af7304a15b6a51b469735a429f97617ad475d9..ab322752b39f4fe7d87cae284584bf6c95b9151c 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index f7c38bdb15031896c633c770d94f8a4074810dce..6fbc87f5f4b3c3b0c686435a46a42e3a8c030daf 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 8d681691001472dfa17af235d20c45e9d0d89750..ef78045870363ba14ac72043c26b790471341e8e 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 3de925ef505ac546aa1b580abe0e325d677a3457..057f30d71cc4d229502a90ff8852c8eb67dc2631 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 3de925ef505ac546aa1b580abe0e325d677a3457..057f30d71cc4d229502a90ff8852c8eb67dc2631 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 5c0f51690c87cb37b812388780b3e151212b8c6c..1b0cb7c4815bfa76883befcb55f2337f4091d5cd 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -179,12 +179,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index c33a3a052e9a86909648132aec73abb85831e75c..f705314f4fec2860ae7dd6efb4e7ef457ad1de1b 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h index 1f157fa3efdad8ef5f27cb4f7dd13f82307c9a9a..cf186a11ed9fde8389e5ec272ddeed055b6d6ba9 100644 --- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index b84cb8a69bbf562896bb609fee0785fc9170a033..9e1738a7808afc63d932972958d451d0083680ec 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 4ca3375ae5237f1cda609d3d63e114eef7166507..76593f9542c34ec5410b16e1dc05ea4edf806b83 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN 23 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + #define CONTROLLER_FAN_PIN 23 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index af1059304ebab13c7bdb7c1a202042caf83bcecc..cbad1319dfce869b7eec3bf9f347411da8d5d00c 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -174,12 +174,19 @@ #define TEMP_SENSOR_AD595_OFFSET 0.0 #define TEMP_SENSOR_AD595_GAIN 1.0 -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif // When first starting the main fan, run it at full speed for the // given number of milliseconds. This gets the fan spinning reliably diff --git a/Marlin/pins.h b/Marlin/pins.h index f223e0c52d62ff04742c75253f63270d297fd3f4..7458d8ceff720944db720d5883313e02ed300145 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -219,8 +219,8 @@ #ifndef FAN2_PIN #define FAN2_PIN -1 #endif -#ifndef CONTROLLERFAN_PIN - #define CONTROLLERFAN_PIN -1 +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN -1 #endif #ifndef HEATER_0_PIN @@ -507,7 +507,7 @@ X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \ Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \ Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \ - PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLERFAN_PIN, \ + PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLER_FAN_PIN, \ _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS BED_PINS \ _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS \ _X2_PINS _Y2_PINS _Z2_PINS \ diff --git a/Marlin/pinsDebug_list.h b/Marlin/pinsDebug_list.h index 2fa23f62bf13e9b31f6be4e726d6d8a023c28a9a..758c332dc84fc4f45a29d769c917ffee911ec114 100644 --- a/Marlin/pinsDebug_list.h +++ b/Marlin/pinsDebug_list.h @@ -95,8 +95,8 @@ #if PIN_EXISTS(CASE_LIGHT) REPORT_NAME_DIGITAL(CASE_LIGHT_PIN, __LINE__ ) #endif -#if PIN_EXISTS(CONTROLLERFAN) - REPORT_NAME_DIGITAL(CONTROLLERFAN_PIN, __LINE__ ) +#if PIN_EXISTS(CONTROLLER_FAN) + REPORT_NAME_DIGITAL(CONTROLLER_FAN_PIN, __LINE__ ) #endif #if PIN_EXISTS(CUTOFF_RESET) REPORT_NAME_DIGITAL(CUTOFF_RESET_PIN, __LINE__ ) diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h index 2d57a588d57dee11159f2cfb90647e4619196251..41df3be5b8c1a4394b3b356c46ff4590d2e5f9f6 100644 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ b/Marlin/pins_AZTEEG_X3_PRO.h @@ -107,7 +107,9 @@ #undef FAN_PIN #define FAN_PIN 6 // Part Cooling System -#define CONTROLLERFAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable) +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable) +#endif // Fans/Water Pump to cool the hotend cool side. #define ORIG_E0_AUTO_FAN_PIN 5 diff --git a/Marlin/pins_MEGACONTROLLER.h b/Marlin/pins_MEGACONTROLLER.h index f15b231fc8c73d128d98b2fd759882175da1991a..c81f3547b8e2d05740b0fc0c21bd7770605ce62a 100644 --- a/Marlin/pins_MEGACONTROLLER.h +++ b/Marlin/pins_MEGACONTROLLER.h @@ -116,7 +116,9 @@ #define FAN1_PIN 35 #define FAN2_PIN 36 -#define CONTROLLERFAN_PIN FAN2_PIN +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN FAN2_PIN +#endif #define FAN_SOFT_PWM