diff --git a/src/stc15_dusk.c b/src/stc15_dusk.c index 0d3cb5a..a7b70d2 100644 --- a/src/stc15_dusk.c +++ b/src/stc15_dusk.c @@ -1,5 +1,7 @@ #include "stc15_dusk.h" +#define STC15_LIGHT_THRESHOLD 219 + unsigned char dusk_value = 0; void nop_wait() { @@ -25,6 +27,6 @@ void stc15_update_light_state() { } unsigned char stc15_is_low_light() { - return dusk_value > 219; + return dusk_value > STC15_LIGHT_THRESHOLD; } diff --git a/src/stc15_dusk.h b/src/stc15_dusk.h index 7499d2e..648bc4d 100644 --- a/src/stc15_dusk.h +++ b/src/stc15_dusk.h @@ -15,7 +15,6 @@ void stc15_dusk_init(); -/* should be called periodically */ void stc15_update_light_state(); unsigned char stc15_is_low_light();