diff --git a/drivers/sensor/maxim/max31865/max31865.c b/drivers/sensor/maxim/max31865/max31865.c index f9cf6f0e7df..e42992acf74 100644 --- a/drivers/sensor/maxim/max31865/max31865.c +++ b/drivers/sensor/maxim/max31865/max31865.c @@ -99,9 +99,9 @@ static double calculate_temperature(double resistance, double resistance_0) } resistance /= resistance_0; resistance *= 100.0; - temperature = A[0] + A[1] * resistance + A[2] * pow(resistance, 2) - - A[3] * pow(resistance, 3) - A[4] * pow(resistance, 4) + - A[5] * pow(resistance, 5); + temperature = RTD_C[0] + RTD_C[1] * resistance + RTD_C[2] * pow(resistance, 2) - + RTD_C[3] * pow(resistance, 3) - RTD_C[4] * pow(resistance, 4) + + RTD_C[5] * pow(resistance, 5); return temperature; } diff --git a/drivers/sensor/maxim/max31865/max31865.h b/drivers/sensor/maxim/max31865/max31865.h index 1b8681bf9f8..d5279533cb1 100644 --- a/drivers/sensor/maxim/max31865/max31865.h +++ b/drivers/sensor/maxim/max31865/max31865.h @@ -71,7 +71,7 @@ LOG_MODULE_REGISTER(MAX31865, CONFIG_SENSOR_LOG_LEVEL); * For under zero, taken from * https://www.analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf */ -static const float A[6] = {-242.02, 2.2228, 2.5859e-3, 4.8260e-6, 2.8183e-8, 1.5243e-10}; +static const double RTD_C[6] = {-242.02, 2.2228, 2.5859e-3, 4.8260e-6, 2.8183e-8, 1.5243e-10}; struct max31865_data { double temperature;