Searched refs:calc_hum (Results 1 – 2 of 2) sorted by relevance
80 int32_t calc_hum; in calculate_humidity() local97 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()
121 int32_t temp_scaled, calc_hum; in bme680_calc_humidity() local139 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()