From 66288464faf1dea592cdea360bcbb830ef017058 Mon Sep 17 00:00:00 2001 From: condac Date: Sun, 4 Sep 2011 11:49:14 +0300 Subject: New and improved On and Off for FAN_PIN --- Sprinter/Sprinter.pde | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Sprinter/Sprinter.pde') diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index 364393e..857d652 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -808,16 +808,14 @@ inline void process_commands() WRITE(FAN_PIN, HIGH); analogWrite(FAN_PIN, constrain(code_value(),0,255) ); } - else + else { WRITE(FAN_PIN, HIGH); + analogWrite(FAN_PIN, 255 ); + } break; case 107: //M107 Fan Off - if (code_seen('S')){ analogWrite(FAN_PIN, 0); - } - else { - WRITE(FAN_PIN, LOW); - } + WRITE(FAN_PIN, LOW); break; #endif #if (PS_ON_PIN > -1) -- cgit v1.2.1