|
@@ -1172,31 +1172,25 @@ enum TempState {
|
1172
|
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
|
1176
|
static unsigned long raw_temp_bed_value = 0;
|
1183
|
1177
|
|
1184
|
1178
|
static void set_current_temp_raw() {
|
1185
|
|
- #ifndef HEATER_0_USES_MAX6675
|
|
1179
|
+ #if HAS_TEMP_0 && !defined(HEATER_0_USES_MAX6675)
|
1186
|
1180
|
current_temperature_raw[0] = raw_temp_value[0];
|
1187
|
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
|
1186
|
current_temperature_raw[1] = raw_temp_value[1];
|
1190
|
|
- #if EXTRUDERS > 2
|
|
1187
|
+ #if HAS_TEMP_2
|
1191
|
1188
|
current_temperature_raw[2] = raw_temp_value[2];
|
1192
|
|
- #if EXTRUDERS > 3
|
|
1189
|
+ #if HAS_TEMP_3
|
1193
|
1190
|
current_temperature_raw[3] = raw_temp_value[3];
|
1194
|
1191
|
#endif
|
1195
|
1192
|
#endif
|
1196
|
1193
|
#endif
|
1197
|
|
- #ifdef TEMP_SENSOR_1_AS_REDUNDANT
|
1198
|
|
- redundant_temperature_raw = raw_temp_value[1];
|
1199
|
|
- #endif
|
1200
|
1194
|
current_temperature_bed_raw = raw_temp_bed_value;
|
1201
|
1195
|
temp_meas_ready = true;
|
1202
|
1196
|
}
|
|
@@ -1517,7 +1511,7 @@ ISR(TIMER0_COMPB_vect) {
|
1517
|
1511
|
#endif
|
1518
|
1512
|
|
1519
|
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
|
1515
|
raw_temp_bed_value = 0;
|
1522
|
1516
|
|
1523
|
1517
|
#ifndef HEATER_0_USES_MAX6675
|