From 2c13922c4602066704bb19ec388673ebd47756be Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 2 May 2017 20:18:31 -0500 Subject: [PATCH] Implement USE_CONTROLLER_FAN as a feature --- Marlin/Conditionals_post.h | 6 ++--- Marlin/Configuration_adv.h | 19 ++++++++----- Marlin/Marlin_main.cpp | 14 +++++----- Marlin/SanityCheck.h | 26 ++++++++++-------- .../Cartesio/Configuration_adv.h | 19 ++++++++----- .../Felix/Configuration_adv.h | 19 ++++++++----- .../FolgerTech-i3-2020/Configuration_adv.h | 19 ++++++++----- .../Hephestos/Configuration_adv.h | 19 ++++++++----- .../Hephestos_2/Configuration_adv.h | 19 ++++++++----- .../K8200/Configuration_adv.h | 19 ++++++++----- .../K8400/Configuration_adv.h | 19 ++++++++----- .../RigidBot/Configuration_adv.h | 19 ++++++++----- .../SCARA/Configuration_adv.h | 19 ++++++++----- .../TAZ4/Configuration_adv.h | 27 +++++++++---------- .../TinyBoy2/Configuration_adv.h | 19 ++++++++----- .../WITBOX/Configuration_adv.h | 19 ++++++++----- .../FLSUN/auto_calibrate/Configuration_adv.h | 19 ++++++++----- .../FLSUN/kossel_mini/Configuration_adv.h | 19 ++++++++----- .../delta/generic/Configuration_adv.h | 19 ++++++++----- .../delta/kossel_mini/Configuration_adv.h | 19 ++++++++----- .../delta/kossel_pro/Configuration_adv.h | 19 ++++++++----- .../delta/kossel_xl/Configuration_adv.h | 19 ++++++++----- .../gCreate_gMax1.5+/Configuration_adv.h | 19 ++++++++----- .../makibox/Configuration_adv.h | 19 ++++++++----- .../tvrrug/Round2/Configuration_adv.h | 19 ++++++++----- .../wt150/Configuration_adv.h | 19 ++++++++----- Marlin/pins.h | 6 ++--- Marlin/pinsDebug_list.h | 4 +-- Marlin/pins_AZTEEG_X3_PRO.h | 4 ++- Marlin/pins_MEGACONTROLLER.h | 4 ++- 30 files changed, 335 insertions(+), 174 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 978b6297b2..ce2a002b2b 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 8ec8409852..d3ee48a853 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 322b5a93cf..78c2550549 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -11473,7 +11473,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 @@ -11506,12 +11506,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) @@ -11927,7 +11927,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 @@ -12197,8 +12197,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 722d7f5869..610a86567e 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 0980413c65..f6f8c40204 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 8ddb5dde11..4a334780f2 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 7f803b2bd1..7867bddc7e 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 13af7304a1..ab322752b3 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 c123e45266..b8ab84e48d 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 ad96b02b9c..32c9114cac 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 a435d0663b..7ffc9e04b2 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 97aafb9dd4..f259c0e423 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 0ea0b21f8d..a7ad075e57 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 ce40edba63..23e2226ffb 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 54f76d3b5b..94e3579433 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 13af7304a1..ab322752b3 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 f7c38bdb15..6fbc87f5f4 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 8d68169100..ef78045870 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 3de925ef50..057f30d71c 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 3de925ef50..057f30d71c 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 5c0f51690c..1b0cb7c481 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 c33a3a052e..f705314f4f 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 1f157fa3ef..cf186a11ed 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 b84cb8a69b..9e1738a780 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 4ca3375ae5..76593f9542 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 af1059304e..cbad1319df 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 f223e0c52d..7458d8ceff 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 2fa23f62bf..758c332dc8 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 2d57a588d5..41df3be5b8 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 f15b231fc8..c81f3547b8 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