From f835537e88714691d8559f139a1b33c8c36177c3 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Mon, 4 Jul 2022 23:34:23 +0200 Subject: [PATCH] Exclude TempErrorSource::ambient for boards without a thermistor --- Firmware/temperature.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index b261c5f2..484ac588 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -460,7 +460,9 @@ enum class TempErrorSource : uint8_t { hotend, bed, +#ifdef AMBIENT_THERMISTOR ambient, +#endif }; // thermal error type (in order of decreasing priority!) @@ -1708,9 +1710,11 @@ void handle_temp_error() alert_automaton_bed.step(current_temperature_bed, BED_MINTEMP + TEMP_HYSTERESIS); } break; +#ifdef AMBIENT_THERMISTOR case TempErrorSource::ambient: ambient_min_temp_error(); break; +#endif } break; case TempErrorType::max: @@ -1721,9 +1725,11 @@ void handle_temp_error() case TempErrorSource::bed: bed_max_temp_error(); break; +#ifdef AMBIENT_THERMISTOR case TempErrorSource::ambient: ambient_max_temp_error(); break; +#endif } break; case TempErrorType::preheat: @@ -1735,9 +1741,11 @@ void handle_temp_error() ((TempErrorType)temp_error_state.type == TempErrorType::preheat), ((TempErrorSource)temp_error_state.source == TempErrorSource::bed)); break; +#ifdef AMBIENT_THERMISTOR case TempErrorSource::ambient: // not needed break; +#endif } break; #ifdef TEMP_MODEL