diff --git a/build-number.txt b/build-number.txt index 77afe23..31cf34b 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -509 +513 diff --git a/src/light_sensor.h b/src/light_sensor.h index da9f234..cd56d74 100644 --- a/src/light_sensor.h +++ b/src/light_sensor.h @@ -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