Guest User

Marlin Fan patch

a guest
Mar 21st, 2012
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.01 KB | None | 0 0
  1. diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp
  2. index c06c073..2b37da8 100644
  3. --- a/Marlin/planner.cpp
  4. +++ b/Marlin/planner.cpp
  5. @@ -438,7 +438,10 @@ void check_axes_activity() {
  6.    }
  7.    else {
  8.      #if FAN_PIN > -1
  9. -      if (FanSpeed != 0) analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
  10. +    if (FanSpeed != 0){
  11. +      WRITE(FAN_PIN, HIGH);
  12. +      analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
  13. +    }
  14.      #endif
  15.    }
  16.    if((DISABLE_X) && (x_active == 0)) disable_x();
  17. @@ -446,7 +449,10 @@ void check_axes_activity() {
  18.    if((DISABLE_Z) && (z_active == 0)) disable_z();
  19.    if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
  20.    #if FAN_PIN > -1
  21. -    if((FanSpeed == 0) && (fan_speed ==0)) analogWrite(FAN_PIN, 0);
  22. +  if((FanSpeed == 0) && (fan_speed ==0)){
  23. +    WRITE(FAN_PIN, LOW);
  24. +    analogWrite(FAN_PIN, 0);
  25. +  }
  26.    #endif
  27.    if (FanSpeed != 0 && tail_fan_speed !=0) {
  28.      analogWrite(FAN_PIN,tail_fan_speed);
Advertisement
Add Comment
Please, Sign In to add comment