Browse Source

Temperature changes

Erik van der Zalm 13 years ago
parent
commit
d15f01e1b4
6 changed files with 107 additions and 87 deletions
  1. 12
    10
      Marlin/Configuration.h
  2. 1
    1
      Marlin/Marlin.h
  3. 2
    0
      Marlin/Marlin.pde
  4. 51
    35
      Marlin/temperature.cpp
  5. 2
    2
      Marlin/temperature.h
  6. 39
    39
      Marlin/thermistortables.h

+ 12
- 10
Marlin/Configuration.h View File

27
 #define THERMISTORHEATER_2 3
27
 #define THERMISTORHEATER_2 3
28
 #define THERMISTORBED 3
28
 #define THERMISTORBED 3
29
 
29
 
30
+//#define HEATER_0_USES_THERMISTOR
30
 //#define HEATER_1_USES_THERMISTOR
31
 //#define HEATER_1_USES_THERMISTOR
31
-//#define HEATER_2_USES_THERMISTOR
32
-#define HEATER_1_USES_AD595
33
-//#define HEATER_2_USES_AD595
32
+#define HEATER_0_USES_AD595
33
+//#define HEATER_1_USES_AD595
34
 
34
 
35
 // Select one of these only to define how the bed temp is read.
35
 // Select one of these only to define how the bed temp is read.
36
 //#define BED_USES_THERMISTOR
36
 //#define BED_USES_THERMISTOR
47
 // For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
47
 // For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
48
 
48
 
49
 // This determines the communication speed of the printer
49
 // This determines the communication speed of the printer
50
-//#define BAUDRATE 250000
51
-#define BAUDRATE 115200
50
+#define BAUDRATE 250000
51
+//#define BAUDRATE 115200
52
 //#define BAUDRATE 230400
52
 //#define BAUDRATE 230400
53
 
53
 
54
 // Comment out (using // at the start of the line) to disable SD support:
54
 // Comment out (using // at the start of the line) to disable SD support:
57
 #define LCD_WIDTH 16
57
 #define LCD_WIDTH 16
58
 #define LCD_HEIGHT 2
58
 #define LCD_HEIGHT 2
59
 
59
 
60
-//#define ULTIPANEL
60
+#define ULTIPANEL
61
 #ifdef ULTIPANEL
61
 #ifdef ULTIPANEL
62
  //#define NEWPANEL  //enable this if you have a click-encoder panel
62
  //#define NEWPANEL  //enable this if you have a click-encoder panel
63
  #define SDSUPPORT
63
  #define SDSUPPORT
157
 //#define TEMP_HYSTERESIS 5       // (C°) range of +/- temperatures considered "close" to the target one
157
 //#define TEMP_HYSTERESIS 5       // (C°) range of +/- temperatures considered "close" to the target one
158
 
158
 
159
 //// The minimal temperature defines the temperature below which the heater will not be enabled
159
 //// The minimal temperature defines the temperature below which the heater will not be enabled
160
-#define MINTEMP 5
161
-#define BED_MINTEMP 5
160
+#define HEATER_0_MINTEMP 5
161
+//#define HEATER_1_MINTEMP 5
162
+//#define BED_MINTEMP 5
162
 
163
 
163
 
164
 
164
 // When temperature exceeds max temp, your heater will be switched off.
165
 // When temperature exceeds max temp, your heater will be switched off.
165
 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
166
 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
166
 // You should use MINTEMP for thermistor short/failure protection.
167
 // You should use MINTEMP for thermistor short/failure protection.
167
-#define MAXTEMP 275
168
-#define BED_MAXTEMP 150
168
+#define HEATER_0_MAXTEMP 275
169
+//#define_HEATER_1_MAXTEMP 275
170
+//#define BED_MAXTEMP 150
169
 
171
 
170
 /// PID settings:
172
 /// PID settings:
171
 // Uncomment the following line to enable PID support.
173
 // Uncomment the following line to enable PID support.

+ 1
- 1
Marlin/Marlin.h View File

57
 
57
 
58
 void get_coordinates();
58
 void get_coordinates();
59
 void prepare_move();
59
 void prepare_move();
60
-void kill(byte debug);
60
+void kill();
61
 
61
 
62
 //void check_axes_activity();
62
 //void check_axes_activity();
63
 //void plan_init();
63
 //void plan_init();

+ 2
- 0
Marlin/Marlin.pde View File

54
 //-------------------
54
 //-------------------
55
 // G0  -> G1
55
 // G0  -> G1
56
 // G1  - Coordinated Movement X Y Z E
56
 // G1  - Coordinated Movement X Y Z E
57
+// G2  - CW ARC
58
+// G3  - CCW ARC
57
 // G4  - Dwell S<seconds> or P<milliseconds>
59
 // G4  - Dwell S<seconds> or P<milliseconds>
58
 // G28 - Home all Axis
60
 // G28 - Home all Axis
59
 // G90 - Use Absolute Coordinates
61
 // G90 - Use Absolute Coordinates

+ 51
- 35
Marlin/temperature.cpp View File

68
   float Kc=DEFAULT_Kc;
68
   float Kc=DEFAULT_Kc;
69
 #endif //PIDTEMP
69
 #endif //PIDTEMP
70
 
70
 
71
-#ifdef MINTEMP
72
-int minttemp = temp2analog(MINTEMP);
71
+#ifdef HEATER_0_MINTEMP
72
+int minttemp_0 = temp2analog(HEATER_0_MINTEMP);
73
 #endif //MINTEMP
73
 #endif //MINTEMP
74
-#ifdef MAXTEMP
75
-int maxttemp = temp2analog(MAXTEMP);
74
+#ifdef HEATER_0_MAXTEMP
75
+int maxttemp_0 = temp2analog(HEATER_0_MAXTEMP);
76
+#endif //MAXTEMP
77
+
78
+#ifdef HEATER_1_MINTEMP
79
+int minttemp_1 = temp2analog(HEATER_1_MINTEMP);
80
+#endif //MINTEMP
81
+#ifdef HEATER_1_MAXTEMP
82
+int maxttemp_1 = temp2analog(HEATER_1_MAXTEMP);
76
 #endif //MAXTEMP
83
 #endif //MAXTEMP
77
 
84
 
78
 #ifdef BED_MINTEMP
85
 #ifdef BED_MINTEMP
173
 // For a thermistor, it uses the RepRap thermistor temp table.
180
 // For a thermistor, it uses the RepRap thermistor temp table.
174
 // This is needed because PID in hydra firmware hovers around a given analog value, not a temp value.
181
 // This is needed because PID in hydra firmware hovers around a given analog value, not a temp value.
175
 // This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware.
182
 // This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware.
176
-float temp2analog(int celsius) {
177
-  #ifdef HEATER_USES_THERMISTOR_1
183
+int temp2analog(int celsius) {
184
+  #ifdef HEATER_0_USES_THERMISTOR
178
     int raw = 0;
185
     int raw = 0;
179
     byte i;
186
     byte i;
180
     
187
     
181
-    for (i=1; i<NUMTEMPS_HEATER_1; i++)
188
+    for (i=1; i<NUMTEMPS_HEATER_0; i++)
182
     {
189
     {
183
-      if (temptable_1[i][1] < celsius)
190
+      if (heater_0_temptable[i][1] < celsius)
184
       {
191
       {
185
-        raw = temptable_1[i-1][0] + 
186
-          (celsius - temptable_1[i-1][1]) * 
187
-          (temptable_1[i][0] - temptable_1[i-1][0]) /
188
-          (temptable_1[i][1] - temptable_1[i-1][1]);
189
-      
192
+        raw = heater_0_temptable[i-1][0] + 
193
+          (celsius - heater_0_temptable[i-1][1]) * 
194
+          (heater_0_temptable[i][0] - heater_0_temptable[i-1][0]) /
195
+          (heater_0_temptable[i][1] - heater_0_temptable[i-1][1]);  
190
         break;
196
         break;
191
       }
197
       }
192
     }
198
     }
193
 
199
 
194
     // Overflow: Set to last value in the table
200
     // Overflow: Set to last value in the table
195
-    if (i == NUMTEMPS_1) raw = temptable_1[i-1][0];
201
+    if (i == NUMTEMPS_0) raw = heater_0_temptable[i-1][0];
196
 
202
 
197
     return (1023 * OVERSAMPLENR) - raw;
203
     return (1023 * OVERSAMPLENR) - raw;
198
-  #elif defined HEATER_1_USES_AD595
204
+  #elif defined HEATER_0_USES_AD595
199
     return celsius * (1024.0 / (5.0 * 100.0) ) * OVERSAMPLENR;
205
     return celsius * (1024.0 / (5.0 * 100.0) ) * OVERSAMPLENR;
200
   #endif
206
   #endif
201
 }
207
 }
204
 // For a thermistor, it uses the RepRap thermistor temp table.
210
 // For a thermistor, it uses the RepRap thermistor temp table.
205
 // This is needed because PID in hydra firmware hovers around a given analog value, not a temp value.
211
 // This is needed because PID in hydra firmware hovers around a given analog value, not a temp value.
206
 // This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware.
212
 // This function is derived from inversing the logic from a portion of getTemperature() in FiveD RepRap firmware.
207
-float temp2analogBed(int celsius) {
213
+int temp2analogBed(int celsius) {
208
   #ifdef BED_USES_THERMISTOR
214
   #ifdef BED_USES_THERMISTOR
209
 
215
 
210
     int raw = 0;
216
     int raw = 0;
235
 // Derived from RepRap FiveD extruder::getTemperature()
241
 // Derived from RepRap FiveD extruder::getTemperature()
236
 // For hot end temperature measurement.
242
 // For hot end temperature measurement.
237
 float analog2temp(int raw) {
243
 float analog2temp(int raw) {
238
-  #ifdef HEATER_1_USES_THERMISTOR
239
-    int celsius = 0;
244
+  #ifdef HEATER_0_USES_THERMISTOR
245
+    float celsius = 0;
240
     byte i;  
246
     byte i;  
241
     raw = (1023 * OVERSAMPLENR) - raw;
247
     raw = (1023 * OVERSAMPLENR) - raw;
242
-    for (i=1; i<NUMTEMPS_HEATER_1; i++)
248
+    for (i=1; i<NUMTEMPS_HEATER_0; i++)
243
     {
249
     {
244
-      if (temptable_1[i][0] > raw)
250
+      if (heater_0_temptable[i][0] > raw)
245
       {
251
       {
246
-        celsius  = temptable_1[i-1][1] + 
247
-          (raw - temptable_1[i-1][0]) * 
248
-          (temptable_1[i][1] - temptable_1[i-1][1]) /
249
-          (temptable_1[i][0] - temptable_1[i-1][0]);
252
+        celsius  = heater_0_temptable[i-1][1] + 
253
+          (raw - heater_0_temptable[i-1][0]) * 
254
+          (float)(heater_0_temptable[i][1] - heater_0_temptable[i-1][1]) /
255
+          (float)(heater_0_temptable[i][0] - heater_0_temptable[i-1][0]);
250
 
256
 
251
         break;
257
         break;
252
       }
258
       }
253
     }
259
     }
254
 
260
 
255
     // Overflow: Set to last value in the table
261
     // Overflow: Set to last value in the table
256
-    if (i == NUMTEMPS_HEATER_1) celsius = temptable_1[i-1][1];
262
+    if (i == NUMTEMPS_HEATER_0) celsius = heater_0_temptable[i-1][1];
257
 
263
 
258
     return celsius;
264
     return celsius;
259
-  #elif defined HEATER_1_USES_AD595
265
+  #elif defined HEATER_0_USES_AD595
260
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
266
     return raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR;
261
   #endif
267
   #endif
262
 }
268
 }
403
     
409
     
404
   if(temp_count >= 16) // 6 ms * 16 = 96ms.
410
   if(temp_count >= 16) // 6 ms * 16 = 96ms.
405
   {
411
   {
406
-    #ifdef HEATER_1_USES_AD595
412
+    #ifdef HEATER_0_USES_AD595
407
       current_raw[0] = raw_temp_0_value;
413
       current_raw[0] = raw_temp_0_value;
408
     #else
414
     #else
409
       current_raw[0] = 16383 - raw_temp_0_value;
415
       current_raw[0] = 16383 - raw_temp_0_value;
410
     #endif
416
     #endif
411
     
417
     
412
-    #ifdef HEATER_2_USES_AD595
418
+    #ifdef HEATER_1_USES_AD595
413
       current_raw[2] = raw_temp_2_value;
419
       current_raw[2] = raw_temp_2_value;
414
     #else
420
     #else
415
       current_raw[2] = 16383 - raw_temp_2_value;
421
       current_raw[2] = 16383 - raw_temp_2_value;
426
     raw_temp_0_value = 0;
432
     raw_temp_0_value = 0;
427
     raw_temp_1_value = 0;
433
     raw_temp_1_value = 0;
428
     raw_temp_2_value = 0;
434
     raw_temp_2_value = 0;
429
-#ifdef MAXTEMP
435
+#ifdef HEATER_0_MAXTEMP
430
   #if (HEATER_0_PIN > -1)
436
   #if (HEATER_0_PIN > -1)
431
-    if(current_raw[0] >= maxttemp) {
437
+    if(current_raw[0] >= maxttemp_0) {
432
       target_raw[0] = 0;
438
       target_raw[0] = 0;
433
       analogWrite(HEATER_0_PIN, 0);
439
       analogWrite(HEATER_0_PIN, 0);
434
       Serial.println("!! Temperature extruder 0 switched off. MAXTEMP triggered !!");
440
       Serial.println("!! Temperature extruder 0 switched off. MAXTEMP triggered !!");
441
+      kill();
435
     }
442
     }
436
   #endif
443
   #endif
437
-  #if (HEATER_2_PIN > -1)
438
-    if(current_raw[2] >= maxttemp) {
444
+#endif
445
+#ifdef HEATER_1_MAXTEMP
446
+  #if (HEATER_1_PIN > -1)
447
+    if(current_raw[2] >= maxttemp_1) {
439
       target_raw[2] = 0;
448
       target_raw[2] = 0;
440
       analogWrite(HEATER_2_PIN, 0);
449
       analogWrite(HEATER_2_PIN, 0);
441
       Serial.println("!! Temperature extruder 1 switched off. MAXTEMP triggered !!");
450
       Serial.println("!! Temperature extruder 1 switched off. MAXTEMP triggered !!");
451
+      kill()
442
     }
452
     }
443
   #endif
453
   #endif
444
 #endif //MAXTEMP
454
 #endif //MAXTEMP
445
-#ifdef MINTEMP
455
+#ifdef HEATER_0_MINTEMP
446
   #if (HEATER_0_PIN > -1)
456
   #if (HEATER_0_PIN > -1)
447
-    if(current_raw[0] <= minttemp) {
457
+    if(current_raw[0] <= minttemp_0) {
448
       target_raw[0] = 0;
458
       target_raw[0] = 0;
449
       analogWrite(HEATER_0_PIN, 0);
459
       analogWrite(HEATER_0_PIN, 0);
450
       Serial.println("!! Temperature extruder 0 switched off. MINTEMP triggered !!");
460
       Serial.println("!! Temperature extruder 0 switched off. MINTEMP triggered !!");
461
+      kill();
451
     }
462
     }
452
   #endif
463
   #endif
464
+#endif
465
+#ifdef HEATER_1_MINTEMP
453
   #if (HEATER_2_PIN > -1)
466
   #if (HEATER_2_PIN > -1)
454
-    if(current_raw[2] <= minttemp) {
467
+    if(current_raw[2] <= minttemp_1) {
455
       target_raw[2] = 0;
468
       target_raw[2] = 0;
456
       analogWrite(HEATER_2_PIN, 0);
469
       analogWrite(HEATER_2_PIN, 0);
457
       Serial.println("!! Temperature extruder 1 switched off. MINTEMP triggered !!");
470
       Serial.println("!! Temperature extruder 1 switched off. MINTEMP triggered !!");
471
+      kill();
458
     }
472
     }
459
   #endif
473
   #endif
460
 #endif //MAXTEMP
474
 #endif //MAXTEMP
464
       target_raw[1] = 0;
478
       target_raw[1] = 0;
465
       WRITE(HEATER_1_PIN, 0);
479
       WRITE(HEATER_1_PIN, 0);
466
       Serial.println("!! Temperatur heated bed switched off. MINTEMP triggered !!");
480
       Serial.println("!! Temperatur heated bed switched off. MINTEMP triggered !!");
481
+      kill();
467
     }
482
     }
468
   #endif
483
   #endif
469
 #endif
484
 #endif
473
       target_raw[1] = 0;
488
       target_raw[1] = 0;
474
       WRITE(HEATER_1_PIN, 0);
489
       WRITE(HEATER_1_PIN, 0);
475
       Serial.println("!! Temperature heated bed switched off. MAXTEMP triggered !!");
490
       Serial.println("!! Temperature heated bed switched off. MAXTEMP triggered !!");
491
+      kill();
476
     }
492
     }
477
   #endif
493
   #endif
478
 #endif
494
 #endif

+ 2
- 2
Marlin/temperature.h View File

27
 void manage_heater();
27
 void manage_heater();
28
 //int temp2analogu(int celsius, const short table[][2], int numtemps);
28
 //int temp2analogu(int celsius, const short table[][2], int numtemps);
29
 //float analog2tempu(int raw, const short table[][2], int numtemps);
29
 //float analog2tempu(int raw, const short table[][2], int numtemps);
30
-float temp2analog(int celsius);
31
-float temp2analogBed(int celsius);
30
+int temp2analog(int celsius);
31
+int temp2analogBed(int celsius);
32
 float analog2temp(int raw);
32
 float analog2temp(int raw);
33
 float analog2tempBed(int raw);
33
 float analog2tempBed(int raw);
34
 
34
 

+ 39
- 39
Marlin/thermistortables.h View File

3
 
3
 
4
 #define OVERSAMPLENR 16
4
 #define OVERSAMPLENR 16
5
 
5
 
6
-#if (THERMISTORHEATER_1 == 1) || (THERMISTORHEATER_2 == 1) || (THERMISTORBED == 1) //100k bed thermistor
6
+#if (THERMISTORHEATER_0 == 1) || (THERMISTORHEATER_1 == 1) || (THERMISTORBED == 1) //100k bed thermistor
7
 
7
 
8
 #define NUMTEMPS_1 61
8
 #define NUMTEMPS_1 61
9
 const short temptable_1[NUMTEMPS_1][2] = {
9
 const short temptable_1[NUMTEMPS_1][2] = {
70
 {	1008*OVERSAMPLENR	,	0	} //safety
70
 {	1008*OVERSAMPLENR	,	0	} //safety
71
 };
71
 };
72
 #endif
72
 #endif
73
-#if (THERMISTORHEATER_1 == 2) || (THERMISTORHEATER_2 == 2) || (THERMISTORBED == 2) //200k bed thermistor
73
+#if (THERMISTORHEATER_0 == 2) || (THERMISTORHEATER_1 == 2) || (THERMISTORBED == 2) //200k bed thermistor
74
 #define NUMTEMPS_2 21
74
 #define NUMTEMPS_2 21
75
 const short temptable_2[NUMTEMPS_2][2] = {
75
 const short temptable_2[NUMTEMPS_2][2] = {
76
    {1*OVERSAMPLENR, 848},
76
    {1*OVERSAMPLENR, 848},
97
 };
97
 };
98
 
98
 
99
 #endif
99
 #endif
100
-#if (THERMISTORHEATER_1 == 3) || (THERMISTORHEATER_2 == 3) || (THERMISTORBED == 3) //mendel-parts
100
+#if (THERMISTORHEATER_0 == 3) || (THERMISTORHEATER_1 == 3) || (THERMISTORBED == 3) //mendel-parts
101
 #define NUMTEMPS_3 28
101
 #define NUMTEMPS_3 28
102
 const short temptable_3[NUMTEMPS_3][2] = {
102
 const short temptable_3[NUMTEMPS_3][2] = {
103
 		{1*OVERSAMPLENR,864},
103
 		{1*OVERSAMPLENR,864},
131
 	};
131
 	};
132
 
132
 
133
 #endif
133
 #endif
134
-#if (THERMISTORHEATER_1 == 4) || (THERMISTORHEATER_2 == 4) || (THERMISTORBED == 4) //10k thermistor
134
+#if (THERMISTORHEATER_0 == 4) || (THERMISTORHEATER_1 == 4) || (THERMISTORBED == 4) //10k thermistor
135
 
135
 
136
 #define NUMTEMPS_4 20
136
 #define NUMTEMPS_4 20
137
 short temptable_4[NUMTEMPS_4][2] = {
137
 short temptable_4[NUMTEMPS_4][2] = {
158
 };
158
 };
159
 #endif
159
 #endif
160
 
160
 
161
-#if (THERMISTORHEATER_1 == 5) || (THERMISTORHEATER_2 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
161
+#if (THERMISTORHEATER_0 == 5) || (THERMISTORHEATER_1 == 5) || (THERMISTORBED == 5) //100k ParCan thermistor (104GT-2)
162
 
162
 
163
 #define NUMTEMPS_5 61
163
 #define NUMTEMPS_5 61
164
 const short temptable_5[NUMTEMPS_5][2] = {
164
 const short temptable_5[NUMTEMPS_5][2] = {
226
 };
226
 };
227
 #endif
227
 #endif
228
 
228
 
229
-#if (THERMISTORHEATER_1 == 6) || (THERMISTORHEATER_2 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
229
+#if (THERMISTORHEATER_0 == 6) || (THERMISTORHEATER_1 == 6) || (THERMISTORBED == 6) // 100k Epcos thermistor
230
 #define NUMTEMPS_6 36
230
 #define NUMTEMPS_6 36
231
 const short temptable_6[NUMTEMPS_6][2] = {
231
 const short temptable_6[NUMTEMPS_6][2] = {
232
    {28*OVERSAMPLENR, 250},
232
    {28*OVERSAMPLENR, 250},
268
 };
268
 };
269
 #endif
269
 #endif
270
 
270
 
271
-#if (THERMISTORHEATER_1 == 7) || (THERMISTORHEATER_2 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
271
+#if (THERMISTORHEATER_0 == 7) || (THERMISTORHEATER_1 == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
272
 #define NUMTEMPS_7 54
272
 #define NUMTEMPS_7 54
273
 const short temptable_7[NUMTEMPS_7][2] = {
273
 const short temptable_7[NUMTEMPS_7][2] = {
274
    {46*OVERSAMPLENR, 270},
274
    {46*OVERSAMPLENR, 270},
330
 
330
 
331
 
331
 
332
 
332
 
333
+#if THERMISTORHEATER_0 == 1
334
+#define NUMTEMPS_HEATER_0 NUMTEMPS_1
335
+#define heater_0_temptable temptable_1
336
+#elif THERMISTORHEATER_0 == 2
337
+#define NUMTEMPS_HEATER_0 NUMTEMPS_2
338
+#define heater_0_temptable temptable_2
339
+#elif THERMISTORHEATER_0 == 3
340
+#define NUMTEMPS_HEATER_0 NUMTEMPS_3
341
+#define heater_0_temptable temptable_3
342
+#elif THERMISTORHEATER_0 == 4
343
+#define NUMTEMPS_HEATER_0 NUMTEMPS_4
344
+#define heater_0_temptable temptable_4
345
+#elif THERMISTORHEATER_0 == 5
346
+#define NUMTEMPS_HEATER_0 NUMTEMPS_5
347
+#define heater_0_temptable temptable_5
348
+#elif THERMISTORHEATER_0 == 6
349
+#define NUMTEMPS_HEATER_0 NUMTEMPS_6
350
+#define heater_0_temptable temptable_6
351
+#elif THERMISTORHEATER_0 == 7
352
+#define NUMTEMPS_HEATER_0 NUMTEMPS_7
353
+#define heater_0_temptable temptable_7
354
+#elif defined HEATER_0_USES_THERMISTOR
355
+#error No heater 0 thermistor table specified
356
+#endif
357
+
333
 #if THERMISTORHEATER_1 == 1
358
 #if THERMISTORHEATER_1 == 1
334
 #define NUMTEMPS_HEATER_1 NUMTEMPS_1
359
 #define NUMTEMPS_HEATER_1 NUMTEMPS_1
335
-#define temptable_1 temptable_1
360
+#define heater_1_temptable temptable_1
336
 #elif THERMISTORHEATER_1 == 2
361
 #elif THERMISTORHEATER_1 == 2
337
 #define NUMTEMPS_HEATER_1 NUMTEMPS_2
362
 #define NUMTEMPS_HEATER_1 NUMTEMPS_2
338
-#define temptable_1 temptable_2
363
+#define heater_1_temptable temptable_2
339
 #elif THERMISTORHEATER_1 == 3
364
 #elif THERMISTORHEATER_1 == 3
340
 #define NUMTEMPS_HEATER_1 NUMTEMPS_3
365
 #define NUMTEMPS_HEATER_1 NUMTEMPS_3
341
-#define temptable_1 temptable_3
366
+#define heater_1_temptable temptable_3
342
 #elif THERMISTORHEATER_1 == 4
367
 #elif THERMISTORHEATER_1 == 4
343
 #define NUMTEMPS_HEATER_1 NUMTEMPS_4
368
 #define NUMTEMPS_HEATER_1 NUMTEMPS_4
344
-#define temptable_1 temptable_4
369
+#define heater_1_temptable temptable_4
345
 #elif THERMISTORHEATER_1 == 5
370
 #elif THERMISTORHEATER_1 == 5
346
 #define NUMTEMPS_HEATER_1 NUMTEMPS_5
371
 #define NUMTEMPS_HEATER_1 NUMTEMPS_5
347
-#define temptable_1 temptable_5
372
+#define heater_1_temptable temptable_5
348
 #elif THERMISTORHEATER_1 == 6
373
 #elif THERMISTORHEATER_1 == 6
349
 #define NUMTEMPS_HEATER_1 NUMTEMPS_6
374
 #define NUMTEMPS_HEATER_1 NUMTEMPS_6
350
-#define temptable_1 temptable_6
375
+#define heater_1_temptable temptable_6
351
 #elif THERMISTORHEATER_1 == 7
376
 #elif THERMISTORHEATER_1 == 7
352
 #define NUMTEMPS_HEATER_1 NUMTEMPS_7
377
 #define NUMTEMPS_HEATER_1 NUMTEMPS_7
353
-#define temptable_1 temptable_7
378
+#define heater_1_temptable temptable_7
354
 #elif defined HEATER_1_USES_THERMISTOR
379
 #elif defined HEATER_1_USES_THERMISTOR
355
 #error No heater 1 thermistor table specified
380
 #error No heater 1 thermistor table specified
356
 #endif
381
 #endif
357
 
382
 
358
-#if THERMISTORHEATER_2 == 1
359
-#define NUMTEMPS_HEATER_2 NUMTEMPS_1
360
-#define temptable_2 temptable_1
361
-#elif THERMISTORHEATER_2 == 2
362
-#define NUMTEMPS_HEATER_2 NUMTEMPS_2
363
-#define temptable_2 temptable_2
364
-#elif THERMISTORHEATER_2 == 3
365
-#define NUMTEMPS_HEATER_2 NUMTEMPS_3
366
-#define temptable_2 temptable_3
367
-#elif THERMISTORHEATER_2 == 4
368
-#define NUMTEMPS_HEATER_2 NUMTEMPS_4
369
-#define temptable_2 temptable_4
370
-#elif THERMISTORHEATER_2 == 5
371
-#define NUMTEMPS_HEATER_2 NUMTEMPS_5
372
-#define temptable_2 temptable_5
373
-#elif THERMISTORHEATER_2 == 6
374
-#define NUMTEMPS_HEATER_2 NUMTEMPS_6
375
-#define temptable_2 temptable_6
376
-#elif THERMISTORHEATER_2 == 7
377
-#define NUMTEMPS_HEATER22 NUMTEMPS_7
378
-#define temptable_2 temptable_7
379
-#elif defined HEATER_2_USES_THERMISTOR
380
-#error No heater 2 thermistor table specified
381
-#endif
382
-
383
 
383
 
384
 #if THERMISTORBED == 1
384
 #if THERMISTORBED == 1
385
 #define BNUMTEMPS NUMTEMPS_1
385
 #define BNUMTEMPS NUMTEMPS_1

Loading…
Cancel
Save