From 953abcc75cb2f805fe28fd2ec4b51f1c4267f27d Mon Sep 17 00:00:00 2001 From: prozessorkern Date: Sat, 20 Mar 2021 19:49:57 +0100 Subject: [PATCH] added crazy colorful mode --- firmware/main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/firmware/main.c b/firmware/main.c index c31ea20..9c1a859 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -12,6 +12,7 @@ enum ring_modes { RING_MODE_WHITE, RING_MODE_ARC, RING_MODE_QUARTER, + RING_MODE_IN_FARBE_UND_BUNT, RING_MODE_MAX }; @@ -104,6 +105,25 @@ int main(void) } } break; + case RING_MODE_IN_FARBE_UND_BUNT: + for(int i = 0; i < RING_MAX_LED; i ++) { + switch ((led_val + (i / 3)) % 3) + { + case 0: + led_calc_val[i] = 0x00FF0000UL; + break; + case 1: + led_calc_val[i] = 0xFF000000UL; + break; + case 2: + led_calc_val[i] = 0x0000FF00UL; + break; + + default: + break; + } + } + break; default: for(int i = 0; i < RING_MAX_LED; i ++) { led_calc_val[i] = 0x00000000UL;