From 32e38fee7474d56a3e4d47bd949351d3c99c4af8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Aug 2018 01:49:30 -0500 Subject: [PATCH] Update Controller Fan for Y2,Z2 --- Marlin/src/feature/controllerfan.cpp | 30 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp index e1d6fc5ef..b98bb80a0 100644 --- a/Marlin/src/feature/controllerfan.cpp +++ b/Marlin/src/feature/controllerfan.cpp @@ -35,26 +35,34 @@ void controllerfan_update() { const millis_t ms = millis(); if (ELAPSED(ms, nextMotorCheck)) { nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s + + // If any of the drivers or the bed are enabled... if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON #if HAS_HEATED_BED || thermalManager.soft_pwm_amount_bed > 0 #endif - || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled... + #if HAS_X2_ENABLE + || X2_ENABLE_READ == X_ENABLE_ON + #endif + #if HAS_Y2_ENABLE + || Y2_ENABLE_READ == Y_ENABLE_ON + #endif + #if HAS_Z2_ENABLE + || Z2_ENABLE_READ == Z_ENABLE_ON + #endif + || E0_ENABLE_READ == E_ENABLE_ON #if E_STEPPERS > 1 || E1_ENABLE_READ == E_ENABLE_ON - #if HAS_X2_ENABLE - || X2_ENABLE_READ == X_ENABLE_ON - #endif #if E_STEPPERS > 2 - || E2_ENABLE_READ == E_ENABLE_ON + || E2_ENABLE_READ == E_ENABLE_ON #if E_STEPPERS > 3 - || E3_ENABLE_READ == E_ENABLE_ON + || E3_ENABLE_READ == E_ENABLE_ON #if E_STEPPERS > 4 - || E4_ENABLE_READ == E_ENABLE_ON - #endif // E_STEPPERS > 4 - #endif // E_STEPPERS > 3 - #endif // E_STEPPERS > 2 - #endif // E_STEPPERS > 1 + || E4_ENABLE_READ == E_ENABLE_ON + #endif + #endif + #endif + #endif ) { lastMotorOn = ms; //... set time to NOW so the fan will turn on }