Add:Emmc code in photo screen, which is needed to be test.
This commit is contained in:
		
							parent
							
								
									2fb1a5900a
								
							
						
					
					
						commit
						88938668ed
					
				| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
#include "ImageApp/ImageApp_Photo.h"
 | 
					#include "ImageApp/ImageApp_Photo.h"
 | 
				
			||||||
#include "UIFlowLVGL/UIFlowCommon/UIFlowCommon.h"
 | 
					#include "UIFlowLVGL/UIFlowCommon/UIFlowCommon.h"
 | 
				
			||||||
#include "comm/timer.h"
 | 
					#include "comm/timer.h"
 | 
				
			||||||
 | 
					#include "strg_def.h"
 | 
				
			||||||
#if (CALIBRATION_FUNC == ENABLE)
 | 
					#if (CALIBRATION_FUNC == ENABLE)
 | 
				
			||||||
#include "EngineerMode.h"
 | 
					#include "EngineerMode.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -668,6 +669,84 @@ static void update_gps_status(void)
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					enum STORAGE_TYPE
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						STORAGE_TYPE_EMMC = 0,
 | 
				
			||||||
 | 
						STORAGE_TYPE_SD_CARD,
 | 
				
			||||||
 | 
						STORAGE_TYPE_END
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					int get_storage_type(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return STORAGE_TYPE_SD_CARD;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					static void update_storage_sd_card(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (System_GetState(SYS_STATE_FS) == FS_INIT_OK)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
 | 
				
			||||||
 | 
							if (cardStatus != CARD_REMOVED)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (g_SysStrg_Chg)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									static int cnt = 0;
 | 
				
			||||||
 | 
									if(cnt++<3){
 | 
				
			||||||
 | 
										// lv_label_set_text(label_6_scr_uiflowphoto, "wait");
 | 
				
			||||||
 | 
									}else{
 | 
				
			||||||
 | 
										g_SysStrg_Chg = false;
 | 
				
			||||||
 | 
										cnt = 0;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								} else if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									// lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
 | 
				
			||||||
 | 
								} else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									set_warning_label_text(label_6_scr_uiflowphoto);
 | 
				
			||||||
 | 
									lv_label_set_text(label_6_scr_uiflowphoto, "SD FULL");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
								set_normal_label_text(label_6_scr_uiflowphoto);
 | 
				
			||||||
 | 
								UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
 | 
				
			||||||
 | 
								lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								set_warning_label_text(label_6_scr_uiflowphoto);
 | 
				
			||||||
 | 
								lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							set_warning_label_text(label_6_scr_uiflowphoto);
 | 
				
			||||||
 | 
							lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					static void update_sd_card_status(lv_obj_t* obj)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						lv_plugin_res_id res[] = {
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_DIS,
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_8GB,
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_16GB,
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_32GB,
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_64GB,
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_128GB,
 | 
				
			||||||
 | 
								LV_PLUGIN_IMG_ID_SF_SD_256GB
 | 
				
			||||||
 | 
						};	
 | 
				
			||||||
 | 
						int index = 5;
 | 
				
			||||||
 | 
						lv_plugin_img_set_src(obj, res[index]);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					static void update_storage_message(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (STORAGE_TYPE_EMMC == get_storage_type()) {
 | 
				
			||||||
 | 
							lv_plugin_img_set_src(image_8_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_EMMC);
 | 
				
			||||||
 | 
							update_sd_card_status(image_9_scr_uiflowphoto);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							update_sd_card_status(image_8_scr_uiflowphoto);
 | 
				
			||||||
 | 
							lv_plugin_img_set_src(image_9_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS);
 | 
				
			||||||
 | 
							update_storage_sd_card();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
static void update_camera_message(void)
 | 
					static void update_camera_message(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	UIMenuStoreInfo *puiPara = sf_ui_para_get();
 | 
						UIMenuStoreInfo *puiPara = sf_ui_para_get();
 | 
				
			||||||
| 
						 | 
					@ -719,58 +798,7 @@ static void update_camera_message(void)
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (System_GetState(SYS_STATE_FS) == FS_INIT_OK)
 | 
						update_storage_message();
 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
 | 
					 | 
				
			||||||
		if (cardStatus != CARD_REMOVED)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			if (g_SysStrg_Chg)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				static int cnt = 0;
 | 
					 | 
				
			||||||
				if(cnt++<3){
 | 
					 | 
				
			||||||
					// lv_label_set_text(label_6_scr_uiflowphoto, "wait");
 | 
					 | 
				
			||||||
				}else{
 | 
					 | 
				
			||||||
					g_SysStrg_Chg = false;
 | 
					 | 
				
			||||||
					cnt = 0;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			} else if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				// lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
 | 
					 | 
				
			||||||
			} else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				set_warning_label_text(label_6_scr_uiflowphoto);
 | 
					 | 
				
			||||||
				lv_label_set_text(label_6_scr_uiflowphoto, "SD FULL");
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			else
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
			//#NT#2023/11/21#Eric - begin 
 | 
					 | 
				
			||||||
			//#NT#Support IVOT_N12144_CO-148_1120_4
 | 
					 | 
				
			||||||
			// if(g_SysStrg_Chg){
 | 
					 | 
				
			||||||
			// 	static int cnt = 0;
 | 
					 | 
				
			||||||
			// 	if(cnt++<3){
 | 
					 | 
				
			||||||
			// 		lv_label_set_text(label_6_scr_uiflowphoto, "wait");
 | 
					 | 
				
			||||||
			// 	}else{
 | 
					 | 
				
			||||||
			// 		g_SysStrg_Chg = false;
 | 
					 | 
				
			||||||
			// 		cnt = 0;
 | 
					 | 
				
			||||||
			// 	}
 | 
					 | 
				
			||||||
			// }else{
 | 
					 | 
				
			||||||
			//#NT#2023/11/21#Eric - end
 | 
					 | 
				
			||||||
			set_normal_label_text(label_6_scr_uiflowphoto);
 | 
					 | 
				
			||||||
			UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
 | 
					 | 
				
			||||||
			lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
 | 
					 | 
				
			||||||
			}/////#NT#2023/11/21#Eric - continue
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			set_warning_label_text(label_6_scr_uiflowphoto);
 | 
					 | 
				
			||||||
			lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		set_warning_label_text(label_6_scr_uiflowphoto);
 | 
					 | 
				
			||||||
		lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern int is_menu_screen_luck(void);
 | 
					extern int is_menu_screen_luck(void);
 | 
				
			||||||
| 
						 | 
					@ -1387,6 +1415,7 @@ static void UIFlowPhoto_ScrOpen(lv_obj_t* obj)
 | 
				
			||||||
	lv_obj_set_hidden(label_line_scr_uiflowphoto, false);
 | 
						lv_obj_set_hidden(label_line_scr_uiflowphoto, false);
 | 
				
			||||||
	set_indev_keypad_group(obj);
 | 
						set_indev_keypad_group(obj);
 | 
				
			||||||
	update_fd_frame();
 | 
						update_fd_frame();
 | 
				
			||||||
 | 
						update_storage_message();
 | 
				
			||||||
	//#NT#2016/10/04#Lincy Lin -begin
 | 
						//#NT#2016/10/04#Lincy Lin -begin
 | 
				
			||||||
	//#NT#Support SD hot plug function
 | 
						//#NT#Support SD hot plug function
 | 
				
			||||||
//#if (SDHOTPLUG_FUNCTION == ENABLE)
 | 
					//#if (SDHOTPLUG_FUNCTION == ENABLE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user