Home
last modified time | relevance | path

Searched refs:calc_hum (Results 1 – 2 of 2) sorted by relevance

/Zephyr-latest/tests/drivers/i2c/i2c_bme688/src/
Dsensor.c80 int32_t calc_hum; in calculate_humidity() local
97 calc_hum = (((var3 + var6) >> 10) * ((int32_t)1000)) >> 12; in calculate_humidity()
98 if (calc_hum > 100000) { in calculate_humidity()
99 calc_hum = 100000; in calculate_humidity()
100 } else if (calc_hum < 0) { in calculate_humidity()
101 calc_hum = 0; in calculate_humidity()
104 return (uint32_t)calc_hum; in calculate_humidity()
/Zephyr-latest/drivers/sensor/bosch/bme680/
Dbme680.c121 int32_t temp_scaled, calc_hum; in bme680_calc_humidity() local
139 calc_hum = (((var3 + var6) >> 10) * ((int32_t)1000)) >> 12; in bme680_calc_humidity()
141 if (calc_hum > 100000) { /* Cap at 100%rH */ in bme680_calc_humidity()
142 calc_hum = 100000; in bme680_calc_humidity()
143 } else if (calc_hum < 0) { in bme680_calc_humidity()
144 calc_hum = 0; in bme680_calc_humidity()
147 data->calc_humidity = calc_hum; in bme680_calc_humidity()