mirror of https://github.com/arendst/Tasmota.git
v5.12.0e - Better fix MAX31850 higher temperatures
5.12.0e * Fix MAX31850 higher temperatures (#1269)
This commit is contained in:
parent
9a421ab6a2
commit
846f4d0178
|
@ -336,11 +336,7 @@ boolean Ds18x20Read(uint8_t sensor, float &t)
|
||||||
break;
|
break;
|
||||||
case MAX31850_CHIPID:
|
case MAX31850_CHIPID:
|
||||||
temp14 = (data[1] << 8) + (data[0] & 0xFC);
|
temp14 = (data[1] << 8) + (data[0] & 0xFC);
|
||||||
if (temp14 < 0) {
|
t = ConvertTemp(temp14 * 0.0625); // Divide by 16
|
||||||
temp14 = (~temp14) +1;
|
|
||||||
sign = -1;
|
|
||||||
}
|
|
||||||
t = ConvertTemp(sign * temp14 * 0.0625); // Divide by 16
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,11 +141,7 @@ boolean Ds18x20Read(uint8_t sensor, float &t)
|
||||||
break;
|
break;
|
||||||
case MAX31850_CHIPID:
|
case MAX31850_CHIPID:
|
||||||
temp14 = (data[1] << 8) + (data[0] & 0xFC);
|
temp14 = (data[1] << 8) + (data[0] & 0xFC);
|
||||||
if (temp14 < 0) {
|
t = ConvertTemp(temp14 * 0.0625); // Divide by 16
|
||||||
temp14 = (~temp14) +1;
|
|
||||||
sign = -1;
|
|
||||||
}
|
|
||||||
t = ConvertTemp(sign * temp14 * 0.0625); // Divide by 16
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue