chiark / gitweb /
Add explicit #define for bogus temp override
authorPhil Hord <phord@phord.com>
Sun, 26 Feb 2012 23:46:34 +0000 (18:46 -0500)
committerPhil Hord <phil@phord.com>
Mon, 27 Feb 2012 01:26:16 +0000 (20:26 -0500)
The code to ignore the "bad thermistor reading failsafe"
suicide function depends on the existing of the PS_ON pin
feature.  But in some boards this shouldn't be the case
Fix this by adding an explicit definition to make our
intentions more clear and separable.

Marlin/pins.h
Marlin/temperature.cpp

index e950cbe6832987ace273d34005f19579a6666692..52aae6b7ed9906772927e94395d8482b2cc33542 100644 (file)
 #endif
 #define PS_ON_PIN 15
 
+// Gen 1.3 and earlier supplied thermistor power via PS_ON
+// Need to ignore the bad thermistor readings on those units
+#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
 //our pin for debugging.
 #define DEBUG_PIN 0
 
index 6efbbd1d94b4f26145da8f3b76aaf46eead8a05f..069674be907bb2800ab1a1bca6958c148bc9a88e 100644 (file)
@@ -851,7 +851,7 @@ ISR(TIMER0_COMPB_vect)
     for(unsigned char e = 0; e < EXTRUDERS; e++) {
        if(current_raw[e] >= maxttemp[e]) {
           target_raw[e] = 0;
-          #if (PS_ON != -1)
+          #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
           {
             max_temp_error(e);
             kill();;
@@ -860,7 +860,7 @@ ISR(TIMER0_COMPB_vect)
        }
        if(current_raw[e] <= minttemp[e]) {
           target_raw[e] = 0;
-          #if (PS_ON != -1)
+          #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
           {
             min_temp_error(e);
             kill();