/* * Show charging animation version 0 * */ void fill_animation_battery_ver_0(unsigned int capacity, void *fill_addr, void * dec_logo_addr, void * logo_addr, LCM_SCREEN_T phical_screen) { unsigned int capacity_grids = 0; if (capacity > 100) capacity = 100; capacity_grids = (capacity * (ANIM_V0_REGIONS)) / 100; LOG_ANIM("[show_animation_common: %s %d]capacity =%d, capacity_grids = %d\n",__FUNCTION__,__LINE__, capacity, capacity_grids); //show_logo(1); fill_animation_logo(ANIM_V0_BACKGROUND_INDEX, fill_addr, dec_logo_addr, logo_addr,phical_screen); // Fill Occupied Color //RECT_REGION_T bar_rect = {BAR_LEFT, BAR_TOP, BAR_RIGHT, BAR_BOTTOM}; RECT_REGION_T rect_bar = {bar_rect.left + 1, bar_rect.top + 1, bar_rect.right, bar_rect.bottom}; // RECT_REGION_T rect_bar = {BAR_LEFT + 1, BAR_TOP + 1,BAR_RIGHT, BAR_BOTTOM}; fill_animation_prog_bar(rect_bar, (unsigned int)(BAR_OCCUPIED_COLOR), 0, capacity_grids, fill_addr, phical_screen); fill_animation_prog_bar(rect_bar, (unsigned int)(BAR_EMPTY_COLOR), capacity_grids, ANIM_V0_REGIONS - capacity_grids, fill_addr, phical_screen); }
/* * Show lod charging animation * */ void fill_animation_battery_old(unsigned int capacity, void *fill_addr, void * dec_logo_addr, void * logo_addr, LCM_SCREEN_T phical_screen) { int capacity_grids = 0; if (capacity > 100) capacity = 100; capacity_grids = (capacity * (ANIM_V0_REGIONS)) / 100; if (version0_charging_index < capacity_grids * 2) version0_charging_index = capacity_grids * 2; if (capacity < 100){ version0_charging_index > 7? version0_charging_index = capacity_grids * 2 : version0_charging_index++; } else { version0_charging_index = ANIM_V0_REGIONS * 2; } fill_animation_logo(ANIM_V0_BACKGROUND_INDEX, fill_addr, dec_logo_addr, logo_addr,phical_screen); RECT_REGION_T rect_bar = {bar_rect.left + 1, bar_rect.top + 1, bar_rect.right, bar_rect.bottom}; fill_animation_prog_bar(rect_bar, (unsigned int)(BAR_OCCUPIED_COLOR), 0, version0_charging_index/2, fill_addr, phical_screen); fill_animation_prog_bar(rect_bar, (unsigned int)(BAR_EMPTY_COLOR), version0_charging_index/2, ANIM_V0_REGIONS - version0_charging_index/2, fill_addr, phical_screen); }