nicer intro animation
This commit is contained in:
parent
c58e2118b5
commit
5492c562c4
@ -368,12 +368,34 @@ int8_t show_intro( uint32_t now, uint32_t animation_start ) {
|
||||
get_color( &r, &g, &b, tmp_sequence[i] );
|
||||
led_set( i, r, g, b );
|
||||
}
|
||||
if( t_diff > 2400 ) {
|
||||
step = 3;
|
||||
}
|
||||
}
|
||||
|
||||
//led_set( index, r, g, b );
|
||||
|
||||
// overwite step by step with button colors
|
||||
if( !(t_diff % 100) && (step == 3) ) {
|
||||
for( int i=0; i<index; i++ ) {
|
||||
get_color( &r, &g, &b, colorScheme[0] );
|
||||
led_set( i, r, g, b );
|
||||
|
||||
if( (now - animation_start) > 2400 ) {
|
||||
get_color( &r, &g, &b, colorScheme[1] );
|
||||
led_set( i+6, r, g, b );
|
||||
}
|
||||
|
||||
if( t_diff > 3000 ) {
|
||||
step = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if( step == 4) {
|
||||
// blank top and bottom LED for symetry
|
||||
led_set( 0, 0, 0, 0 );
|
||||
led_set( 6, 0, 0, 0 );
|
||||
}
|
||||
|
||||
if( (now - animation_start) > 4000 ) {
|
||||
step = 0;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user