ktingey / AirU

AirU is a low-cost device that collects essential air quality data in a high-density network.
0 stars 0 forks source link

HDC1080 Overflow #5

Closed ktingey closed 7 years ago

ktingey commented 7 years ago

Change the HDC1080 conversion to account for overflow around 42*C. The code below should work:

int16_t res = ((regval[0] << 8) | regval[1]) >> 2; return (int_t)(((uint32_t)20625 * res + (uint32_t)1024) >> 11) - (int32_t)40000;

ktingey commented 7 years ago

resolved