nicer intro animation

This commit is contained in:
daniel steuer 2014-03-17 02:09:30 +01:00
parent c58e2118b5
commit 5492c562c4

View File

@ -368,12 +368,34 @@ int8_t show_intro( uint32_t now, uint32_t animation_start ) {
get_color( &r, &g, &b, tmp_sequence[i] ); get_color( &r, &g, &b, tmp_sequence[i] );
led_set( i, r, g, b ); 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; step = 0;
return 1; return 1;
} }