mirror of https://github.com/Desuuuu/klipper.git
spi_temperature: Fix incorrect max31856 spi initialization
Writes to the max31856 chip use "burst mode", so only one address during the initialization sequence can be sent. This fixes erroneous "Cold Junction Fault" errors. Reported by @NBouquain. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
c6f870a655
commit
665ec5e987
|
@ -174,12 +174,10 @@ class MAX31856(SensorBase):
|
||||||
"16" : MAX31856_CR1_AVGSEL16
|
"16" : MAX31856_CR1_AVGSEL16
|
||||||
}
|
}
|
||||||
value |= config.getchoice('tc_averaging_count', averages, "1")
|
value |= config.getchoice('tc_averaging_count', averages, "1")
|
||||||
cmds.append(0x80 + MAX31856_CR1_REG)
|
|
||||||
cmds.append(value)
|
cmds.append(value)
|
||||||
|
|
||||||
value = (MAX31856_MASK_VOLTAGE_UNDER_OVER_FAULT |
|
value = (MAX31856_MASK_VOLTAGE_UNDER_OVER_FAULT |
|
||||||
MAX31856_MASK_THERMOCOUPLE_OPEN_FAULT)
|
MAX31856_MASK_THERMOCOUPLE_OPEN_FAULT)
|
||||||
cmds.append(0x80 + MAX31856_MASK_REG)
|
|
||||||
cmds.append(value)
|
cmds.append(value)
|
||||||
return cmds
|
return cmds
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue