Browse Source

🩹 Fix MAX31865 approximations

Followup to #24407
Scott Lahteine 2 years ago
parent
commit
c2972899ca
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/src/libs/MAX31865.cpp

+ 3
- 3
Marlin/src/libs/MAX31865.cpp View File

@@ -489,9 +489,9 @@ float MAX31865::temperature(float rtd_res) {
489 489
     temp = RTD_C[0];
490 490
     temp += rpoly * RTD_C[1];
491 491
     rpoly *= rtd_res; temp += rpoly * RTD_C[2];
492
-    if (MAX31865_APPROX >= 3) rpoly *= rtd_res; temp += rpoly * RTD_C[3];
493
-    if (MAX31865_APPROX >= 4) rpoly *= rtd_res; temp += rpoly * RTD_C[4];
494
-    if (MAX31865_APPROX >= 5) rpoly *= rtd_res; temp += rpoly * RTD_C[5];
492
+    if (MAX31865_APPROX >= 3) { rpoly *= rtd_res; temp += rpoly * RTD_C[3]; }
493
+    if (MAX31865_APPROX >= 4) { rpoly *= rtd_res; temp += rpoly * RTD_C[4]; }
494
+    if (MAX31865_APPROX >= 5) { rpoly *= rtd_res; temp += rpoly * RTD_C[5]; }
495 495
   }
496 496
 
497 497
   return temp;

Loading…
Cancel
Save