desktop_animation.c 837 B

1234567891011121314151617181920212223242526
  1. #include "desktop_animation.h"
  2. static const Icon* idle_scenes[] = {&A_Wink_128x64, &A_WatchingTV_128x64};
  3. const Icon* desktop_get_icon() {
  4. uint8_t new = 0;
  5. #if 0
  6. // checking dolphin state here to choose appropriate animation
  7. Dolphin* dolphin = furi_record_open("dolphin");
  8. DolphinStats stats = dolphin_stats(dolphin);
  9. float timediff = fabs(difftime(stats.timestamp, dolphin_state_timestamp()));
  10. FURI_LOG_I("desktop-animation", "background change");
  11. FURI_LOG_I("desktop-animation", "icounter: %d", stats.icounter);
  12. FURI_LOG_I("desktop-animation", "butthurt: %d", stats.butthurt);
  13. FURI_LOG_I("desktop-animation", "time since deeed: %.0f", timediff);
  14. #endif
  15. if((random() % 100) > 50) { // temp rnd selection
  16. new = random() % COUNT_OF(idle_scenes);
  17. }
  18. return idle_scenes[new];
  19. }