DavidvtWout 8ef0f7d7e3
spi_temperature: Limit maximum temperature in MAX31865.calc_adc() to melting point of platinum (#6320)
Limit the maximum temperature in MAX31865.calc_adc() to the melting
point of platinum. Above this temperature the Callendar-Van Dusem
formula does not make sense. The default value for max_temp is
99999999.9 and at this temperature the result of this formula is
negative. This sets max_sample_value to 0 which causes the mcu
to shutdown.

Set max adc value to (1<<15)-1 .  This is needed because the max value of the adc register
of the MAX31865 is 0b1111 1111 1111 1110 which represents
32767 and not 32768.

Signed-off-by: David van 't Wout <github@yoctobyte.nl>
2023-09-10 18:51:14 -04:00
..
2023-03-01 20:43:53 -05:00
2023-06-21 21:17:17 -04:00
2022-07-28 20:43:19 -04:00
2022-09-03 12:23:55 -04:00
2023-08-01 20:32:03 -04:00
2022-05-13 13:53:17 -04:00
2022-04-18 11:07:05 -04:00
2022-06-30 13:56:35 -04:00
2023-03-20 10:58:25 -04:00
2023-06-16 16:38:42 -04:00
2023-06-16 16:38:42 -04:00
2023-03-20 10:58:25 -04:00
2023-06-16 16:38:42 -04:00
2023-03-20 10:58:25 -04:00
2023-08-01 20:32:03 -04:00