Fix dimming overflow

This commit is contained in:
fruchti 2020-09-21 10:36:50 +02:00
parent 6d1481fb95
commit 3a6c0a6391
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
509
513

View file

@ -10,7 +10,7 @@
// Resolution of the brightness output
#define LIGHTSENSOR_BITS 12
#define LIGHTSENSOR_MAX (1 << LIGHTSENSOR_BITS)
#define LIGHTSENSOR_MAX ((1 << LIGHTSENSOR_BITS) - 1)
// 'Forgetting factor' of the rolling brightness average
#define LIGHTSENSOR_LAMBDA_BITS 2