temp.c: print the right temperature.

Order of heater and temperature sensor can differ, so they can get
different numbers. When printing extruder temperatur, we want to
print the temperature of the sensor matching the extruder heater,
not that of the temp sensor with the same number as the extruder
heater. Same for the bed respectively.

This should partially solve issue #96.
This commit is contained in:
Markus Hitter 2015-05-23 17:58:22 +02:00
parent a96d4b4dc9
commit d9fb7cab96
1 changed files with 2 additions and 2 deletions

4
temp.c
View File

@ -387,11 +387,11 @@ void temp_print(temp_sensor_t index) {
if (index == TEMP_SENSOR_none) { // standard behaviour if (index == TEMP_SENSOR_none) { // standard behaviour
#ifdef HEATER_EXTRUDER #ifdef HEATER_EXTRUDER
sersendf_P(PSTR("T:")); sersendf_P(PSTR("T:"));
single_temp_print(HEATER_EXTRUDER); single_temp_print(TEMP_SENSOR_extruder);
#endif #endif
#ifdef HEATER_BED #ifdef HEATER_BED
sersendf_P(PSTR(" B:")); sersendf_P(PSTR(" B:"));
single_temp_print(HEATER_BED); single_temp_print(TEMP_SENSOR_bed);
#endif #endif
} }
else { else {