Browse Source

Merge pull request #1575 from Wurstnase/fix-controllerFan

Fix controller fan
Scott Lahteine 10 years ago
parent
commit
624f23f550
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      Marlin/Marlin_main.cpp

+ 6
- 6
Marlin/Marlin_main.cpp View File

5080
   if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
5080
   if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
5081
   {
5081
   {
5082
     lastMotorCheck = millis();
5082
     lastMotorCheck = millis();
5083
-
5084
-    if(!READ(X_ENABLE_PIN) || !READ(Y_ENABLE_PIN) || !READ(Z_ENABLE_PIN) || (soft_pwm_bed > 0)
5083
+	
5084
+    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)
5085
     #if EXTRUDERS > 2
5085
     #if EXTRUDERS > 2
5086
-       || !READ(E2_ENABLE_PIN)
5086
+       || (READ(E2_ENABLE_PIN) == (E_ENABLE_ON))
5087
     #endif
5087
     #endif
5088
     #if EXTRUDER > 1
5088
     #if EXTRUDER > 1
5089
       #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5089
       #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5090
-       || !READ(X2_ENABLE_PIN)
5090
+       || (READ(X2_ENABLE_PIN) == (X_ENABLE_ON))
5091
       #endif
5091
       #endif
5092
-       || !READ(E1_ENABLE_PIN)
5092
+       || (READ(E1_ENABLE_PIN) == (E_ENABLE_ON))
5093
     #endif
5093
     #endif
5094
-       || !READ(E0_ENABLE_PIN)) //If any of the drivers are enabled...
5094
+       || (READ(E0_ENABLE_PIN) == (E_ENABLE_ON))) //If any of the drivers are enabled...
5095
     {
5095
     {
5096
       lastMotor = millis(); //... set time to NOW so the fan will turn on
5096
       lastMotor = millis(); //... set time to NOW so the fan will turn on
5097
     }
5097
     }

Loading…
Cancel
Save