summaryrefslogtreecommitdiff
path: root/Sprinter/heater.cpp
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2012-02-05 14:35:38 -0800
committerkliment <kliment.yanev@gmail.com>2012-02-05 14:35:38 -0800
commit5a419804049810a118783c950ba7a2d78b16d026 (patch)
tree801945d7ee60850e55a674f3e45703b23d4ccd14 /Sprinter/heater.cpp
parent132f8c212e4c316559177e532df6b9a6c2205bf2 (diff)
parente74587a1b4fea9f90a54d3293bbd98a4d58a4913 (diff)
Merge pull request #133 from midopple/experimental
Experimental new Planner Code
Diffstat (limited to 'Sprinter/heater.cpp')
-rw-r--r--Sprinter/heater.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/Sprinter/heater.cpp b/Sprinter/heater.cpp
index 8739103..65f52e4 100644
--- a/Sprinter/heater.cpp
+++ b/Sprinter/heater.cpp
@@ -28,7 +28,9 @@
#include "pins.h"
#include "Sprinter.h"
-
+#ifdef CONTROLLERFAN_PIN
+ void controllerFan(void);
+#endif
// Manage heater variables. For a thermistor or AD595 thermocouple, raw values refer to the
// reading from the analog pin. For a MAX6675 thermocouple, the raw value is the temperature in 0.25
@@ -256,7 +258,18 @@ int read_max6675()
showString(PSTR(" "));
Serial.print(target_temp);
showString(PSTR(" "));
+ #ifdef PIDTEMP
Serial.println(heater_duty);
+ #else
+ #if (HEATER_0_PIN > -1)
+ if(READ(HEATER_0_PIN))
+ Serial.println(255);
+ else
+ Serial.println(0);
+ #else
+ Serial.println(0);
+ #endif
+ #endif
}
#if THERMISTORBED!=0
else
@@ -266,10 +279,14 @@ int read_max6675()
showString(PSTR(" "));
Serial.print(analog2tempBed(target_bed_raw));
showString(PSTR(" "));
- if(READ(HEATER_1_PIN))
- Serial.println(255);
- else
+ #if (HEATER_1_PIN > -1)
+ if(READ(HEATER_1_PIN))
+ Serial.println(255);
+ else
+ Serial.println(0);
+ #else
Serial.println(0);
+ #endif
}
#endif