From 72d680b915dc1aa1c25c6fd24cdfec19e5b989c8 Mon Sep 17 00:00:00 2001 From: GadgetAngel Date: Tue, 10 Nov 2020 20:43:16 -0500 Subject: [PATCH] fix HAS_MULTIP_6675 null condition & compiler warning In temperature.h if HAS_MULTI_6675 does not have a 1 after it. HAS_MULTI_6675 is defined as NUL In temperature.cpp when Thermocouple is open the max6675_temp value is meant to have a TMAX * 4 so I added the pair of parentheses so the compiler would stop throwing a waring message about the statement being a binary statement. --- Marlin/src/module/temperature.cpp | 2 +- Marlin/src/module/temperature.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 5aed1f428b..c9ec99c741 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2328,7 +2328,7 @@ void Temperature::disable_all_heaters() { #endif // Thermocouple open - max6675_temp = 4 * MAX6675_SEL(HEATER_0_MAX6675_TMAX, HEATER_1_MAX6675_TMAX); + max6675_temp = 4 * (MAX6675_SEL(HEATER_0_MAX6675_TMAX, HEATER_1_MAX6675_TMAX)); } else max6675_temp >>= MAX6675_DISCARD_BITS; diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 4090b845d3..edaa1c5384 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -811,7 +811,7 @@ class Temperature { #if HAS_MAX6675 #define COUNT_6675 1 + BOTH(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) #if COUNT_6675 > 1 - #define HAS_MULTI_6675 + #define HAS_MULTI_6675 1 #define READ_MAX6675(N) read_max6675(N) #else #define READ_MAX6675(N) read_max6675()