diff options
author | midopple <mdoppler@gmx.at> | 2012-02-02 18:49:35 +0100 |
---|---|---|
committer | midopple <mdoppler@gmx.at> | 2012-02-02 18:49:35 +0100 |
commit | 0953453911833e1129ff240901d95821a05b8378 (patch) | |
tree | 62f67806d6e2dc3ab9a342f3139b507e83586fe6 | |
parent | 07a63e7eb1d8d344df53bb85f38df7db8adec6ad (diff) |
Without the PID control for Hotend the tempmonitor use the wrong variable
-rw-r--r-- | Sprinter/heater.cpp | 25 |
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 |