Tune light sensor parameters

This commit is contained in:
fruchti 2020-07-16 16:14:43 +02:00
parent 8c3a471aba
commit 8c3bc4222c
2 changed files with 4 additions and 4 deletions

View file

@ -1 +1 @@
280
287

View file

@ -6,14 +6,14 @@
#include "pinning.h"
// ADC polling interval in milliseconds
#define LIGHTSENSOR_INTERVAL 10
#define LIGHTSENSOR_INTERVAL 250
// 'Forgetting factor' of the rolling brightness average
#define LIGHTSENSOR_LAMBDA 0.95f
#define LIGHTSENSOR_LAMBDA 0.9f
// Bounds for converting absolute to relative brightness: Consider everything
// near the minimum or maximum 0.0 or 1.0, respectively
#define LIGHTSENSOR_LOW_BOUND 0.1f
#define LIGHTSENSOR_LOW_BOUND 0.005f
#define LIGHTSENSOR_HIGH_BOUND 0.9f
extern float LightSensor_RelativeBrightness;