Make brightness depend ~linearly on photocurrent
This commit is contained in:
parent
fe246bfa6d
commit
8c3a471aba
|
@ -1 +1 @@
|
|||
277
|
||||
280
|
||||
|
|
|
@ -66,7 +66,7 @@ void LightSensor_Poll(void)
|
|||
{
|
||||
unsigned int measurement = LightSensor_Measurement;
|
||||
LightSensor_NewMeasurement = false;
|
||||
float brightness = 1.0f - measurement / 65535.0f;
|
||||
float brightness = 65535.0f / measurement;
|
||||
LightSensor_AbsoluteBrightness = LIGHTSENSOR_LAMBDA * LightSensor_AbsoluteBrightness
|
||||
+ (1.0f - LIGHTSENSOR_LAMBDA) * brightness;
|
||||
|
||||
|
|
Loading…
Reference in a new issue