How to get proper lux readings from VD6283
I'm working on a mass market application involving VD6283.
I run the VD6283 app_lux_cct, and control the sensor using a serial terminal on the PC.
The 6 channels are properly displayed along with the lux and cct.
However, when I increase or decrease the gain using the keyboard, the displayed lux changes a lot. The displayed value changes about the same factor as the gain. That is not expected since the amount of light is constant. (I do expect that the signal/noise ratio gets worse if the gain is set too low, and clipping occurs when gain is too high.)
Looking into app_lux_cct.c I noted something odd with the global variable current_gain . This variable is not updated when changing gain. However it is used when calculating the lux reading.
In summary, my question is how to get proper lux readings even when changing the gain.
Thanks a lot in advance for looking into this.
