pub fn calculate_raw_threshold_value(
) -> u16
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.