Browse Source

Update Marlin_main.cpp

Wurstnase 10 years ago
parent
commit
a5342c942e
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      Marlin/Marlin_main.cpp

+ 6
- 6
Marlin/Marlin_main.cpp View File

5038
   if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
5038
   if ((millis() - lastMotorCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
5039
   {
5039
   {
5040
     lastMotorCheck = millis();
5040
     lastMotorCheck = millis();
5041
-
5042
-    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)
5041
+	
5042
+    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)
5043
     #if EXTRUDERS > 2
5043
     #if EXTRUDERS > 2
5044
-       || (!READ(E2_ENABLE_PIN) ^ !(E_ENABLE_ON))
5044
+       || (READ(E2_ENABLE_PIN) == (E_ENABLE_ON))
5045
     #endif
5045
     #endif
5046
     #if EXTRUDER > 1
5046
     #if EXTRUDER > 1
5047
       #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5047
       #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5048
-       || (!READ(X2_ENABLE_PIN) ^ !(X_ENABLE_ON))
5048
+       || (READ(X2_ENABLE_PIN) == (X_ENABLE_ON))
5049
       #endif
5049
       #endif
5050
-       || (!READ(E1_ENABLE_PIN) ^ !(E_ENABLE_ON))
5050
+       || (READ(E1_ENABLE_PIN) == (E_ENABLE_ON))
5051
     #endif
5051
     #endif
5052
-       || (!READ(E0_ENABLE_PIN) ^ !(E_ENABLE_ON))) //If any of the drivers are enabled...
5052
+       || (READ(E0_ENABLE_PIN) == (E_ENABLE_ON))) //If any of the drivers are enabled...
5053
     {
5053
     {
5054
       lastMotor = millis(); //... set time to NOW so the fan will turn on
5054
       lastMotor = millis(); //... set time to NOW so the fan will turn on
5055
     }
5055
     }

Loading…
Cancel
Save