added crazy colorful mode

This commit is contained in:
Stefan Strobel 2021-03-20 19:49:57 +01:00
parent 61783e77c5
commit 953abcc75c

View File

@ -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;