Skip to content

Commit cac203d

Browse files
thinkyheadLCh-77
authored andcommitted
🩹 Fix MAX31865 approximations
Followup to MarlinFirmware#24407
1 parent 82a111d commit cac203d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Marlin/src/libs/MAX31865.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ float MAX31865::temperature(float rtd_res) {
489489
temp = RTD_C[0];
490490
temp += rpoly * RTD_C[1];
491491
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]; }
495495
}
496496

497497
return temp;

0 commit comments

Comments
 (0)