Procházet zdrojové kódy

Merge pull request #83 from phord/tempfix

Add explicit #define for bogus temp override
ErikZalm před 13 roky
rodič
revize
1ebe7d1ab6
3 změnil soubory, kde provedl 22 přidání a 5 odebrání
  1. 1
    0
      Marlin/Configuration.h
  2. 19
    3
      Marlin/pins.h
  3. 2
    2
      Marlin/temperature.cpp

+ 1
- 0
Marlin/Configuration.h Zobrazit soubor

@@ -19,6 +19,7 @@
19 19
 // Gen7 custom (Alfons3 Version) = 10 "https://github.com/Alfons3/Generation_7_Electronics"
20 20
 // Gen7 v1.1, v1.2 = 11
21 21
 // Gen7 v1.3 = 12
22
+// Gen7 v1.4 = 13
22 23
 // MEGA/RAMPS up to 1.2 = 3
23 24
 // RAMPS 1.3 = 33 (Power outputs: Extruder, Bed, Fan)
24 25
 // RAMPS 1.3 = 34 (Power outputs: Extruder0, Extruder1, Bed)

+ 19
- 3
Marlin/pins.h Zobrazit soubor

@@ -45,13 +45,19 @@
45 45
 #endif /* 99 */
46 46
 
47 47
 /****************************************************************************************
48
-* Gen7 v1.1, v1.2, v1.3 pin assignment
48
+* Gen7 v1.1, v1.2, v1.3, v1.4 pin assignment
49 49
 *
50 50
 ****************************************************************************************/
51 51
 
52
+
53
+#if MOTHERBOARD == 13
54
+#define MOTHERBOARD 11
55
+#define GEN7_VERSION 14 // v1.4
56
+#endif
57
+
52 58
 #if MOTHERBOARD == 12
53 59
 #define MOTHERBOARD 11
54
-#define GEN7_V_1_3
60
+#define GEN7_VERSION 13 // v1.3
55 61
 #endif
56 62
 
57 63
 #if MOTHERBOARD == 11
@@ -62,6 +68,10 @@
62 68
 
63 69
 #endif
64 70
 
71
+#ifndef GEN7_VERSION
72
+#define GEN7_VERSION 12 // v1.x
73
+#endif
74
+
65 75
 //x axis pins
66 76
 #define X_STEP_PIN 19
67 77
 #define X_DIR_PIN 18
@@ -103,7 +113,7 @@
103 113
 #define SDSS -1 // SCL pin of I2C header
104 114
 #define LED_PIN -1
105 115
 
106
-#ifdef GEN7_V_1_3
116
+#if (GEN7_VERSION >= 13)
107 117
 // Gen7 v1.3 removed the fan pin
108 118
 #define FAN_PIN -1
109 119
 #else
@@ -111,6 +121,12 @@
111 121
 #endif
112 122
 #define PS_ON_PIN 15
113 123
 
124
+#if (GEN7_VERSION < 14)
125
+// Gen 1.3 and earlier supplied thermistor power via PS_ON
126
+// Need to ignore the bad thermistor readings on those units
127
+#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
128
+#endif
129
+
114 130
 //our pin for debugging.
115 131
 #define DEBUG_PIN 0
116 132
 

+ 2
- 2
Marlin/temperature.cpp Zobrazit soubor

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

Loading…
Zrušit
Uložit