From 750a8dbe7fedcbbe1a651cb0bc24fe0b5753eaf1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 22 Jul 2022 12:38:00 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MAX31865=20approximations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #24407 --- Marlin/src/libs/MAX31865.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp index 0d709b1b0b..3fe0694644 100644 --- a/Marlin/src/libs/MAX31865.cpp +++ b/Marlin/src/libs/MAX31865.cpp @@ -489,9 +489,9 @@ float MAX31865::temperature(float rtd_res) { temp = RTD_C[0]; temp += rpoly * RTD_C[1]; rpoly *= rtd_res; temp += rpoly * RTD_C[2]; - if (MAX31865_APPROX >= 3) rpoly *= rtd_res; temp += rpoly * RTD_C[3]; - if (MAX31865_APPROX >= 4) rpoly *= rtd_res; temp += rpoly * RTD_C[4]; - if (MAX31865_APPROX >= 5) rpoly *= rtd_res; temp += rpoly * RTD_C[5]; + if (MAX31865_APPROX >= 3) { rpoly *= rtd_res; temp += rpoly * RTD_C[3]; } + if (MAX31865_APPROX >= 4) { rpoly *= rtd_res; temp += rpoly * RTD_C[4]; } + if (MAX31865_APPROX >= 5) { rpoly *= rtd_res; temp += rpoly * RTD_C[5]; } } return temp;