diff options
author | DavidvtWout <github@yoctobyte.nl> | 2023-09-11 00:51:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-10 18:51:14 -0400 |
commit | 8ef0f7d7e3d3b2ac7bc1e80ed3295ceca6bba4e7 (patch) | |
tree | 4d741cf7286f914f7477bd08b42e629b3b249119 /klippy/mcu.py | |
parent | 2acfa282942c13c725af6a2cb3ea314edf53406f (diff) | |
download | kutter-8ef0f7d7e3d3b2ac7bc1e80ed3295ceca6bba4e7.tar.gz kutter-8ef0f7d7e3d3b2ac7bc1e80ed3295ceca6bba4e7.tar.xz kutter-8ef0f7d7e3d3b2ac7bc1e80ed3295ceca6bba4e7.zip |
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>
Diffstat (limited to 'klippy/mcu.py')
0 files changed, 0 insertions, 0 deletions