diff --git a/build-number.txt b/build-number.txt index 9524ef4..5e4a522 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -424 +425 diff --git a/src/animation.c b/src/animation.c index 7b075f1..c90af11 100644 --- a/src/animation.c +++ b/src/animation.c @@ -69,8 +69,10 @@ void Animation_Poll(void) static unsigned int bottom = 0; static unsigned int top = 0; - bottom += ANIMATION_STEPS / ANIMATION_DURATION_BOTTOM; - top += ANIMATION_STEPS / ANIMATION_DURATION_TOP; + bottom += ANIMATION_STEPS / ANIMATION_CYCLE_TIME_BOTTOM + / ANIMATION_REFRESH_RATE; + top += ANIMATION_STEPS / ANIMATION_CYCLE_TIME_TOP + / ANIMATION_REFRESH_RATE; bottom %= 2 * ANIMATION_STEPS; top %= 2 * ANIMATION_STEPS; diff --git a/src/animation.h b/src/animation.h index eecdd54..28ddc25 100644 --- a/src/animation.h +++ b/src/animation.h @@ -8,10 +8,12 @@ #define ANIMATION_REFRESH_RATE 10 -#define ANIMATION_DURATION_BOTTOM \ - 6048000 - -#define ANIMATION_DURATION_TOP 6652800 +// Cycle time of the animation for the bottom end of the gradient (in seconds) +#define ANIMATION_CYCLE_TIME_BOTTOM \ + (6 * 24 * 60 * 60) +// Cycle time of the animation for the top end of the gradient (in seconds) +#define ANIMATION_CYCLE_TIME_TOP \ + (8 * 24 * 60 * 60) extern const unsigned int Animation_LEDOrder[LED_COUNT];