Function veml7700::calculate_raw_threshold_value [−][src]
pub fn calculate_raw_threshold_value(
it: IntegrationTime,
gain: Gain,
lux: f32
) -> u16
Expand description
Calculate raw value for threshold applying compensation if necessary.
For values higher than 1000 lx and 1/4 or 1/8 gain, the inverse of the compensation formula is applied. This involves quite some math so it may be interesting to calculate the threshold values ahead of time.