v5.12.0e - Better fix MAX31850 higher temperatures

5.12.0e
* Fix MAX31850 higher temperatures (#1269)
This commit is contained in:
Theo Arends 2018-03-12 11:04:38 +01:00
parent 9a421ab6a2
commit 846f4d0178
2 changed files with 3 additions and 11 deletions

View File

@ -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;
} }
} }

View File

@ -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;
} }
} }