From a5342c942e7b4cb85255a1728ebb3fdfeea10116 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Sat, 7 Mar 2015 16:47:53 +0100 Subject: [PATCH] Update Marlin_main.cpp --- Marlin/Marlin_main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index bcfb9a22dc..7a7e633a42 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5038,18 +5038,18 @@ void controllerFan() if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms { lastMotorCheck = millis(); - - if((!READ(X_ENABLE_PIN) ^ !(X_ENABLE_ON)) || (!READ(Y_ENABLE_PIN) ^ !(Y_ENABLE_ON)) || (!READ(Z_ENABLE_PIN) ^ !(Z_ENABLE_ON)) || (soft_pwm_bed > 0) + + if((READ(X_ENABLE_PIN) == (X_ENABLE_ON)) || (READ(Y_ENABLE_PIN) == (Y_ENABLE_ON)) || (READ(Z_ENABLE_PIN) == (Z_ENABLE_ON)) || (soft_pwm_bed > 0) #if EXTRUDERS > 2 - || (!READ(E2_ENABLE_PIN) ^ !(E_ENABLE_ON)) + || (READ(E2_ENABLE_PIN) == (E_ENABLE_ON)) #endif #if EXTRUDER > 1 #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1 - || (!READ(X2_ENABLE_PIN) ^ !(X_ENABLE_ON)) + || (READ(X2_ENABLE_PIN) == (X_ENABLE_ON)) #endif - || (!READ(E1_ENABLE_PIN) ^ !(E_ENABLE_ON)) + || (READ(E1_ENABLE_PIN) == (E_ENABLE_ON)) #endif - || (!READ(E0_ENABLE_PIN) ^ !(E_ENABLE_ON))) //If any of the drivers are enabled... + || (READ(E0_ENABLE_PIN) == (E_ENABLE_ON))) //If any of the drivers are enabled... { lastMotor = millis(); //... set time to NOW so the fan will turn on }