|
|
@ -157,6 +157,7 @@ mode_circus_combustus(void), |
|
|
|
mode_halloween(void), |
|
|
|
mode_halloween(void), |
|
|
|
mode_bicolor_chase(void), |
|
|
|
mode_bicolor_chase(void), |
|
|
|
mode_tricolor_chase(void), |
|
|
|
mode_tricolor_chase(void), |
|
|
|
|
|
|
|
mode_quadcolor_chase(void), |
|
|
|
mode_icu(void) |
|
|
|
mode_icu(void) |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
@ -219,6 +220,7 @@ void (*mMode[MODE_COUNT])(void) = |
|
|
|
mode_halloween, |
|
|
|
mode_halloween, |
|
|
|
mode_bicolor_chase, |
|
|
|
mode_bicolor_chase, |
|
|
|
mode_tricolor_chase, |
|
|
|
mode_tricolor_chase, |
|
|
|
|
|
|
|
mode_quadcolor_chase, |
|
|
|
mode_icu |
|
|
|
mode_icu |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -1948,6 +1950,48 @@ void mode_tricolor_chase(void) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Quadcolor chase function |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void quadcolor_chase(uint32_t color1, uint32_t color2, uint32_t color3, uint32_t color4) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
uint16_t index = Ws28b12b_Segments[mActualSegment].CounterModeStep % 8; |
|
|
|
|
|
|
|
uint16_t i; |
|
|
|
|
|
|
|
uint32_t color; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < SEGMENT_LENGTH; i++, index++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
index %= 8; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
color = color1; |
|
|
|
|
|
|
|
if(index < 2) color = color2; |
|
|
|
|
|
|
|
else if(index < 4) color = color3; |
|
|
|
|
|
|
|
else if(index < 6) color = color4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(IS_REVERSE) { |
|
|
|
|
|
|
|
ws2812_set_led_color_val(Ws28b12b_Segments[mActualSegment].IdStart + i, color); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
ws2812_set_led_color_val(Ws28b12b_Segments[mActualSegment].IdStop - i, color); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ws28b12b_Segments[mActualSegment].CounterModeStep++; |
|
|
|
|
|
|
|
Ws28b12b_Segments[mActualSegment].ModeDelay = Ws28b12b_Segments[mActualSegment].Speed; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Quadcolor chase mode |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void mode_quadcolor_chase(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return quadcolor_chase(Ws28b12b_Segments[mActualSegment].ModeColor[0], |
|
|
|
|
|
|
|
Ws28b12b_Segments[mActualSegment].ModeColor[1], |
|
|
|
|
|
|
|
Ws28b12b_Segments[mActualSegment].ModeColor[2], |
|
|
|
|
|
|
|
Ws28b12b_Segments[mActualSegment].ModeColor[3]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Alternating white/red/black pixels running. |
|
|
|
* Alternating white/red/black pixels running. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|