/* -------------------------------------------------------------------------- */ static void loop(void) { static u8 new_face; static u8 old_face; struct animation *a; new_face = position(); //Abfage aktueller Lage if (old_face != new_face) { display_clear(); animation_clear();//Reset of LED's switch (new_face) {//Select actuell Arrow-animation. case FACE_A: a = animations_a; break; case FACE_B: a = animations_b; break; case FACE_C: a = animations_c; break; case FACE_D: a = animations_d; break; case FACE_E: a = animations_e; break; case FACE_F: a = animations_f; break; default:break; // a = NULL; /* SHOULD NOT BE REACHED */ } animation_init(a);//Einlesen der Animation } old_face = new_face; //Backup-Aktuelle Lage animation_step(); _delay_ms(100); //delay }
void animation_test_deff (void) { U8 n; animation_begin (AN_MONO+AN_CLEAN); animation_set_speed (TIME_66MS); animation_add_static (animation_test1); animation_add_static (animation_test2); animation_add_static (animation_test3); for (n=0; n < 100; n++) animation_step (); animation_end (); deff_exit (); }