From e1d9046efc6a3e8f2b90ef29cd7b45dd318e1fa3 Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Sat, 19 May 2018 22:39:36 +0200 Subject: [PATCH] [2.0.x] Temperature reading fix (#10774) --- Marlin/src/module/temperature.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 4cbcf791d..ad944476e 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -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; }