Browse Source

Merge branch 'Development' into fixup_leveling

Latest upstream commits
Scott Lahteine 10 years ago
parent
commit
3fd7790a15
1 changed files with 9 additions and 15 deletions
  1. 9
    15
      Marlin/temperature.cpp

+ 9
- 15
Marlin/temperature.cpp View File

1172
   StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
1172
   StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
1173
 };
1173
 };
1174
 
1174
 
1175
-#ifdef TEMP_SENSOR_1_AS_REDUNDANT
1176
-  #define TEMP_SENSOR_COUNT 2
1177
-#else
1178
-  #define TEMP_SENSOR_COUNT EXTRUDERS
1179
-#endif
1180
-
1181
-static unsigned long raw_temp_value[TEMP_SENSOR_COUNT] = { 0 };
1175
+static unsigned long raw_temp_value[4] = { 0 };
1182
 static unsigned long raw_temp_bed_value = 0;
1176
 static unsigned long raw_temp_bed_value = 0;
1183
 
1177
 
1184
 static void set_current_temp_raw() {
1178
 static void set_current_temp_raw() {
1185
-  #ifndef HEATER_0_USES_MAX6675
1179
+  #if HAS_TEMP_0 && !defined(HEATER_0_USES_MAX6675)
1186
     current_temperature_raw[0] = raw_temp_value[0];
1180
     current_temperature_raw[0] = raw_temp_value[0];
1187
   #endif
1181
   #endif
1188
-  #if EXTRUDERS > 1
1182
+  #if HAS_TEMP_1
1183
+    #ifdef TEMP_SENSOR_1_AS_REDUNDANT
1184
+      redundant_temperature_raw =
1185
+    #endif
1189
     current_temperature_raw[1] = raw_temp_value[1];
1186
     current_temperature_raw[1] = raw_temp_value[1];
1190
-    #if EXTRUDERS > 2
1187
+    #if HAS_TEMP_2
1191
       current_temperature_raw[2] = raw_temp_value[2];
1188
       current_temperature_raw[2] = raw_temp_value[2];
1192
-      #if EXTRUDERS > 3
1189
+      #if HAS_TEMP_3
1193
         current_temperature_raw[3] = raw_temp_value[3];
1190
         current_temperature_raw[3] = raw_temp_value[3];
1194
       #endif
1191
       #endif
1195
     #endif
1192
     #endif
1196
   #endif
1193
   #endif
1197
-  #ifdef TEMP_SENSOR_1_AS_REDUNDANT
1198
-    redundant_temperature_raw = raw_temp_value[1];
1199
-  #endif
1200
   current_temperature_bed_raw = raw_temp_bed_value;
1194
   current_temperature_bed_raw = raw_temp_bed_value;
1201
   temp_meas_ready = true;
1195
   temp_meas_ready = true;
1202
 }
1196
 }
1517
     #endif
1511
     #endif
1518
 
1512
 
1519
     temp_count = 0;
1513
     temp_count = 0;
1520
-    for (int i = 0; i < TEMP_SENSOR_COUNT; i++) raw_temp_value[i] = 0;
1514
+    for (int i = 0; i < 4; i++) raw_temp_value[i] = 0;
1521
     raw_temp_bed_value = 0;
1515
     raw_temp_bed_value = 0;
1522
 
1516
 
1523
     #ifndef HEATER_0_USES_MAX6675
1517
     #ifndef HEATER_0_USES_MAX6675

Loading…
Cancel
Save