From ef3d30c44f5fbc310053fb8d39c2565fc3926a8c Mon Sep 17 00:00:00 2001 From: Reinhard Date: Wed, 11 Jan 2023 11:50:16 +0100 Subject: [PATCH] Update xsns_47_max31865.ino (#17661) MAX31865 - make use of the already defined element 'ErrorCode' to transport the MAX31865 Fault Status Register to the JSON element 'Error' --- tasmota/tasmota_xsns_sensor/xsns_47_max31865.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/tasmota/tasmota_xsns_sensor/xsns_47_max31865.ino b/tasmota/tasmota_xsns_sensor/xsns_47_max31865.ino index 6388f311c..38d387eb0 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_47_max31865.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_47_max31865.ino @@ -346,6 +346,7 @@ void MAX31865_GetResult(void) { uint16_t rtd; rtd = max31865[i].readRTD(); + MAX31865_Result[i].ErrorCode = max31865[i].readFault(); MAX31865_Result[i].Rtd = rtd; MAX31865_Result[i].PtdResistance = max31865[i].rtd_to_resistance(rtd, RefRes[i]); MAX31865_Result[i].PtdTemp = ConvertTemp(max31865[i].rtd_to_temperature(rtd, PtdRes[i], RefRes[i]) + PtdBias[i]);