Browse Source

Add explicit #define for bogus temp override

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.
Phil Hord 13 years ago
parent
commit
740f0c7690
2 changed files with 5 additions and 2 deletions
  1. 3
    0
      Marlin/pins.h
  2. 2
    2
      Marlin/temperature.cpp

+ 3
- 0
Marlin/pins.h View File

111
 #endif
111
 #endif
112
 #define PS_ON_PIN 15
112
 #define PS_ON_PIN 15
113
 
113
 
114
+// Gen 1.3 and earlier supplied thermistor power via PS_ON
115
+// Need to ignore the bad thermistor readings on those units
116
+#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
114
 //our pin for debugging.
117
 //our pin for debugging.
115
 #define DEBUG_PIN 0
118
 #define DEBUG_PIN 0
116
 
119
 

+ 2
- 2
Marlin/temperature.cpp View File

851
     for(unsigned char e = 0; e < EXTRUDERS; e++) {
851
     for(unsigned char e = 0; e < EXTRUDERS; e++) {
852
        if(current_raw[e] >= maxttemp[e]) {
852
        if(current_raw[e] >= maxttemp[e]) {
853
           target_raw[e] = 0;
853
           target_raw[e] = 0;
854
-          #if (PS_ON != -1)
854
+          #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
855
           {
855
           {
856
             max_temp_error(e);
856
             max_temp_error(e);
857
             kill();;
857
             kill();;
860
        }
860
        }
861
        if(current_raw[e] <= minttemp[e]) {
861
        if(current_raw[e] <= minttemp[e]) {
862
           target_raw[e] = 0;
862
           target_raw[e] = 0;
863
-          #if (PS_ON != -1)
863
+          #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
864
           {
864
           {
865
             min_temp_error(e);
865
             min_temp_error(e);
866
             kill();
866
             kill();

Loading…
Cancel
Save