Fix so the FAN works, added fan pin as output and fixed fan off case statement
This commit is contained in:
parent
6308360ef8
commit
731907b880
1 changed files with 10 additions and 2 deletions
|
|
@ -293,6 +293,11 @@ void setup()
|
||||||
SET_OUTPUT(HEATER_1_PIN);
|
SET_OUTPUT(HEATER_1_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//Initialize Fan Pin
|
||||||
|
#if (FAN_PIN > -1)
|
||||||
|
SET_OUTPUT(FAN_PIN);
|
||||||
|
#endif
|
||||||
|
|
||||||
//Initialize Step Pins
|
//Initialize Step Pins
|
||||||
#if (X_STEP_PIN > -1)
|
#if (X_STEP_PIN > -1)
|
||||||
SET_OUTPUT(X_STEP_PIN);
|
SET_OUTPUT(X_STEP_PIN);
|
||||||
|
|
@ -807,9 +812,12 @@ inline void process_commands()
|
||||||
WRITE(FAN_PIN, HIGH);
|
WRITE(FAN_PIN, HIGH);
|
||||||
break;
|
break;
|
||||||
case 107: //M107 Fan Off
|
case 107: //M107 Fan Off
|
||||||
analogWrite(FAN_PIN, 0);
|
if (code_seen('S')){
|
||||||
|
analogWrite(FAN_PIN, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
WRITE(FAN_PIN, LOW);
|
WRITE(FAN_PIN, LOW);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if (PS_ON_PIN > -1)
|
#if (PS_ON_PIN > -1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue