Ignore temperature readings of 0x7FF
This commit is contained in:
parent
5213a41174
commit
93bd0dfe76
@ -166,6 +166,10 @@ HAL_StatusTypeDef tmp144_recv_temps(TMP144Bus* bus) {
|
||||
size_t buf_offset = headerlen + 2 * i;
|
||||
uint16_t temp =
|
||||
(bus->rxbuf[buf_offset] >> 4) | (bus->rxbuf[buf_offset + 1] << 4);
|
||||
if (temp == 0x7FF) {
|
||||
// Extremely unlikely, probably the sensor is just broken
|
||||
temp = 0;
|
||||
}
|
||||
temperatures[temperatures_offset + i] = temp;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user