[1.1.x] Temperature reading fix (#10775)

#10774 counterpart
This commit is contained in:
Giuliano 2018-05-19 22:38:41 +02:00 committed by Scott Lahteine
parent 85dfde4c09
commit b360bb9ff9

View File

@ -958,30 +958,40 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
return TEMP_AD595(raw);
#elif ENABLED(HEATER_0_USES_AD8495)
return TEMP_AD8495(raw);
#else
break;
#endif
case 1:
#if ENABLED(HEATER_1_USES_AD595)
return TEMP_AD595(raw);
#elif ENABLED(HEATER_1_USES_AD8495)
return TEMP_AD8495(raw);
#else
break;
#endif
case 2:
#if ENABLED(HEATER_2_USES_AD595)
return TEMP_AD595(raw);
#elif ENABLED(HEATER_2_USES_AD8495)
return TEMP_AD8495(raw);
#else
break;
#endif
case 3:
#if ENABLED(HEATER_3_USES_AD595)
return TEMP_AD595(raw);
#elif ENABLED(HEATER_3_USES_AD8495)
return TEMP_AD8495(raw);
#else
break;
#endif
case 4:
#if ENABLED(HEATER_4_USES_AD595)
return TEMP_AD595(raw);
#elif ENABLED(HEATER_4_USES_AD8495)
return TEMP_AD8495(raw);
#else
break;
#endif
default: break;
}