fix: inverse indexing the animation

fix: ignore extra digits
This commit is contained in:
2023-04-12 20:15:25 +02:00
parent 12a55275a5
commit 77916a2593

6
main.c
View File

@@ -66,12 +66,12 @@ int main() {
while (1) while (1)
{ {
set_DCRAM(0, blank, DISPLAY_DIGITS); set_DCRAM(0, blank, DISPLAY_DIGITS);
for (int i = 0; i < DISPLAY_DIGITS; ++i) for (int i = 0; i < DISPLAY_DIGITS - 4; ++i)
{ {
if (i % 2 == 0) if (i % 2 == 0)
set_DCRAM(0, even_frame, i); set_DCRAM(DISPLAY_DIGITS - i, even_frame, i);
else else
set_DCRAM(0, odd_frame, i); set_DCRAM(DISPLAY_DIGITS - i, odd_frame, i);
_delay_ms(250); _delay_ms(250);
} }
} }