mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
[2.0.x] Temperature reading fix (#10774)
This commit is contained in:
parent
9b64fdbc3a
commit
e1d9046efc
@ -977,30 +977,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user