emmc错误提示语, 确认框弹出取消多次add style

This commit is contained in:
xiehongyan 2024-01-12 19:28:45 +08:00
parent f00e46bffd
commit fd4c82f623
16 changed files with 182 additions and 20 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
#用于gitlab-ci.yml编译使用
#make app_clean
make app_clean
echo "Start compile."
export ROOT_PATH=$PWD
@ -9,7 +9,7 @@ export ROOT_PATH=$PWD
cd rtos
source build/envsetup.sh
lunch rtos cfg_565_HUNTING_EVB_LINUX_4G_S550 gcc-6.5-newlib-2.4-2019.11-arm-ca9-eabihf
#make clean
make clean
make all > /dev/null
cp output/application.bin ../
cp output/rtos-main.bin ../
@ -18,7 +18,7 @@ cp output/rtos-main.bin ../
cd $ROOT_PATH
source build/envsetup.sh
lunch Linux cfg_565_HUNTING_EVB_LINUX_4G_S550 arm-ca9-linux-uclibcgnueabihf-8.4.01
#make clean
make clean
make all > /dev/null
cd $ROOT_PATH

View File

@ -1151,6 +1151,10 @@ static void PBView_DrawThumbView(UINT32 i, HD_VIDEO_FRAME *pVdoSrc, HD_VIDEO_FRA
#if PLAY_FULL_DISP // image crop for full display
void PBView_DrawErrorView(void)
{
extern void PBView_DrawNoFile(void);
PBView_DrawNoFile();
return;
HD_RESULT ret = HD_OK;
PBVIEW_HD_COM_BUF hd_view_buf = {0};
HD_VIDEOOUT_SYSCAPS video_out_syscaps;
@ -1229,6 +1233,11 @@ void PBView_DrawErrorView(void)
#else
void PBView_DrawErrorView(void)
{
extern void PBView_DrawNoFile(void);
PBView_DrawNoFile();
return;
HD_RESULT ret = HD_OK;
PBVIEW_HD_COM_BUF hd_view_buf = {0};
HD_VIDEOOUT_SYSCAPS video_out_syscaps;

View File

@ -292,6 +292,8 @@ INT32 PlayExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
}
PB_SetParam(PBPRMID_DEC_VIDEO_CALLBACK, (UINT32)PBDecVideoCB);
PB_SetParam(PBPRMID_ONDRAW_CALLBACK, (UINT32)PBView_OnDrawCB);
PB_SetParam(PBPRMID_EXIF_MODEL_NAME, (UINT32)EXIF_MODEL_NAME);
#if 0 /* decrypt */
UINT8 key[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};

View File

@ -1241,6 +1241,67 @@
}
],
"widget": "Image"
},
{
"align": "Center",
"class": "lv_label",
"click": false,
"drag": false,
"event callback": "",
"font type": "Font_Type4",
"geometry": {
"height": 19,
"width": 8,
"x": 46,
"y": 171
},
"hidden": false,
"locked": false,
"long mode": "Expand",
"name": "label_7",
"recolor": false,
"string id": "None",
"styles": [
{
"Text": {
"text_color": "0xe71111",
"text_font": "ARIALUNI 16 1bpp",
"text_sel_bg_color": "0x00b495",
"text_sel_color": "0x3c3c3c"
},
"part": 0,
"state": 0
},
{
"part": 0,
"state": 1
},
{
"part": 0,
"state": 2
},
{
"part": 0,
"state": 3
},
{
"part": 0,
"state": 4
},
{
"Text": {
"text_color": "0x008000"
},
"part": 0,
"state": 5
},
{
"part": 0,
"state": 6
}
],
"text": " ",
"widget": "Label"
}
],
"class": "lv_cont",

View File

@ -199,7 +199,7 @@
"SF-UI-Text-Medium 18 1bpp",
"SF-UI-Text-Bold 20 1bpp",
"SF-UI-Text-Medium 12 1bpp",
"montserrat 16 4bpp"
"ARIALUNI 16 1bpp"
],
[
"montserrat 16 4bpp",

View File

@ -595,7 +595,7 @@ lv_plugin_res_id lv_plugin_language_font_table_EN[] = {
LV_PLUGIN_FONT_ID_SF_UI_TEXT_MEDIUM_18_1BPP,
LV_PLUGIN_FONT_ID_SF_UI_TEXT_BOLD_20_1BPP,
LV_PLUGIN_FONT_ID_SF_UI_TEXT_MEDIUM_12_1BPP,
LV_PLUGIN_FONT_ID_LV_FONT_MONTSERRAT_16,
LV_PLUGIN_FONT_ID_ARIALUNI_16_1BPP,
};
lv_plugin_res_id lv_plugin_language_font_table_FR[] = {

View File

@ -18,6 +18,7 @@ static lv_obj_t* wait_moment_scr = NULL;
static lv_group_t* gp = NULL;
static lv_obj_t* msgbox = NULL;
#define MAX_MSGBOX_BTN_TEXT_LEN 16
static int first_init_style = 1;
static const char* btn_map[3] = {NULL, NULL, ""};
@ -207,8 +208,9 @@ void UIFlowMenuCommonConfirmAPI_Open(uint32_t itemID)
return;
}
if(1)
if(first_init_style)
{
first_init_style = 0;
init_style();
lv_obj_add_style(message_box_1_scr_uiflowmenucommonconfirm, 65, &gMsgBoxBtnStyle);
}

View File

@ -32,6 +32,7 @@ lv_obj_t* image_8_scr_uiflowphoto;
lv_obj_t* label_tips_scr_uiflowphoto;
lv_obj_t* label_tips2_scr_uiflowphoto;
lv_obj_t* image_9_scr_uiflowphoto;
lv_obj_t* label_7_scr_uiflowphoto;
lv_obj_t* image_iso_scr_uiflowphoto;
lv_obj_t* image_ev_scr_uiflowphoto;
lv_obj_t* image_wb_scr_uiflowphoto;
@ -1246,6 +1247,67 @@ lv_obj_t* UIFlowPhoto_create(){
image_9_scr_uiflowphoto = image_9;
static lv_style_t label_7_s0;
lv_style_init(&label_7_s0);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_DEFAULT, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_DEFAULT, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_DEFAULT, color);
STYLE_COLOR_PROP(0x26, 0xe7, 0x11, 0x11) ; lv_style_set_text_color(&label_7_s0, LV_STATE_DEFAULT, color);
lv_style_set_text_font(&label_7_s0,LV_STATE_DEFAULT,&arialuni_16_1bpp);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_DEFAULT, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_DEFAULT, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_CHECKED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_CHECKED, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_CHECKED, color);
STYLE_COLOR_PROP(0x26, 0xe7, 0x11, 0x11) ; lv_style_set_text_color(&label_7_s0, LV_STATE_CHECKED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_CHECKED, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_CHECKED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_FOCUSED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_FOCUSED, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_FOCUSED, color);
STYLE_COLOR_PROP(0x26, 0xe7, 0x11, 0x11) ; lv_style_set_text_color(&label_7_s0, LV_STATE_FOCUSED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_FOCUSED, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_FOCUSED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_EDITED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_EDITED, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_EDITED, color);
STYLE_COLOR_PROP(0x26, 0xe7, 0x11, 0x11) ; lv_style_set_text_color(&label_7_s0, LV_STATE_EDITED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_EDITED, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_EDITED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_HOVERED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_HOVERED, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_HOVERED, color);
STYLE_COLOR_PROP(0x26, 0xe7, 0x11, 0x11) ; lv_style_set_text_color(&label_7_s0, LV_STATE_HOVERED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_HOVERED, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_HOVERED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_PRESSED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_PRESSED, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_PRESSED, color);
STYLE_COLOR_PROP(0x0d, 0x00, 0x80, 0x00) ; lv_style_set_text_color(&label_7_s0, LV_STATE_PRESSED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_PRESSED, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_PRESSED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_7_s0, LV_STATE_DISABLED, color);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_7_s0, LV_STATE_DISABLED, color);
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_7_s0, LV_STATE_DISABLED, color);
STYLE_COLOR_PROP(0x26, 0xe7, 0x11, 0x11) ; lv_style_set_text_color(&label_7_s0, LV_STATE_DISABLED, color);
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_7_s0, LV_STATE_DISABLED, color);
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_7_s0, LV_STATE_DISABLED, color);
lv_obj_t *label_7 = lv_label_create(container_photo, NULL);
lv_obj_set_hidden(label_7, false);
lv_obj_set_click(label_7, false);
lv_obj_set_drag(label_7, false);
lv_plugin_label_allocate_ext_attr(label_7);
lv_label_set_text(label_7," ");
lv_plugin_label_allocate_ext_attr(label_7);
lv_plugin_label_set_font_type(label_7, LV_PLUGIN_LANGUAGE_FONT_TYPE_4);
lv_label_set_align(label_7, LV_LABEL_ALIGN_CENTER);
lv_obj_set_pos(label_7, 46, 171);
lv_obj_set_size(label_7, 8, 19);
lv_obj_add_style(label_7, 0, &label_7_s0);
label_7_scr_uiflowphoto = label_7;
static lv_style_t image_iso_s0;
lv_style_init(&image_iso_s0);
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&image_iso_s0, LV_STATE_DEFAULT, color);

View File

@ -40,6 +40,7 @@ extern lv_obj_t* image_8_scr_uiflowphoto;
extern lv_obj_t* label_tips_scr_uiflowphoto;
extern lv_obj_t* label_tips2_scr_uiflowphoto;
extern lv_obj_t* image_9_scr_uiflowphoto;
extern lv_obj_t* label_7_scr_uiflowphoto;
extern lv_obj_t* image_iso_scr_uiflowphoto;
extern lv_obj_t* image_ev_scr_uiflowphoto;
extern lv_obj_t* image_wb_scr_uiflowphoto;

View File

@ -731,6 +731,8 @@ unsigned int check_sd_size(UINT64 diskSize)
}
return 0;
}
static void update_sd_emmc_status(void)
{
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
@ -740,10 +742,16 @@ static void update_sd_emmc_status(void)
UINT64 diskSizeEmmc = FileSys_GetDiskInfoEx('B', FST_INFO_DISK_SIZE);
UINT64 diskFreeEmmc = FileSys_GetDiskInfoEx('B', FST_INFO_FREE_SPACE);
char * textLabel;
// char * textLabelError;
char * textLabelError;
UINT16 idLeft;
UINT16 idRight;
BOOL setWarning = false;
BOOL showError = true;
lv_obj_set_hidden(label_7_scr_uiflowphoto, showError);
lv_obj_set_pos(label_7_scr_uiflowphoto, 46, 171);
lv_label_set_text(label_7_scr_uiflowphoto, "");
set_warning_label_text(label_7_scr_uiflowphoto);
lv_plugin_res_id res[] = {
LV_PLUGIN_IMG_ID_SF_SD_NO,
@ -767,24 +775,27 @@ static void update_sd_emmc_status(void)
idRight = LV_PLUGIN_IMG_ID_SF_SD_NO;
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
textLabel = Get_FreePicNumString(g_uiFreePicNum);
// textLabelError = "";
textLabelError = "";
setWarning = false;
showError = true;
}
else if (0 == diskSizeEmmc)
{/*emmc error*/
idLeft = LV_PLUGIN_IMG_ID_SF_SD_NO;
idRight = LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS;
textLabel = "SD CARD Error";
// textLabelError = "EMMC Error, Please format it";
textLabelError = "EMMC Error, Please format it";
setWarning = true;
showError = false;
}
else if (diskFreeEmmc < (FREE_SIZE_MB*1024*1024))
{/*emmc full*/
idLeft = LV_PLUGIN_IMG_ID_SF_SD_NO;
idRight = LV_PLUGIN_IMG_ID_SF_EMMC_FULL;
textLabel = "No SD Card";
// textLabelError = "";
textLabelError = "";
setWarning = true;
showError = true;
}
else{
return;
@ -801,8 +812,9 @@ static void update_sd_emmc_status(void)
idRight = res[check_sd_size(diskSizeSd)];
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
textLabel = Get_FreePicNumString(g_uiFreePicNum);
// textLabelError = "";
textLabelError = "";
setWarning = false;
showError = true;
}
else if (diskSizeEmmc > 0 && diskFreeEmmc >= (FREE_SIZE_MB*1024*1024) && 0 == diskSizeSd)
{/*emmc normal sd error*/
@ -810,8 +822,9 @@ static void update_sd_emmc_status(void)
idRight = LV_PLUGIN_IMG_ID_SF_EMMC_FULL;
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
textLabel = Get_FreePicNumString(g_uiFreePicNum);
// textLabelError = "";
textLabelError = "SD Card Error, Please format it";
setWarning = false;
showError = false;
}
else if (diskSizeEmmc > 0 && diskFreeEmmc >= (FREE_SIZE_MB*1024*1024) && diskFreeSd < (FREE_SIZE_MB*1024*1024))
{/*emmc normal sd full*/
@ -819,8 +832,9 @@ static void update_sd_emmc_status(void)
idRight = LV_PLUGIN_IMG_ID_SF_EMMC_FULL;
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
textLabel = Get_FreePicNumString(g_uiFreePicNum);
// textLabelError = "";
textLabelError = "";
setWarning = false;
showError = true;
}
else if (0 == diskSizeEmmc && diskSizeSd > 0 && diskFreeSd >= (FREE_SIZE_MB*1024*1024))
{/*emmc error sd normal*/
@ -828,24 +842,28 @@ static void update_sd_emmc_status(void)
idRight = LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS;
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
textLabel = Get_FreePicNumString(g_uiFreePicNum);
// textLabelError = "";
textLabelError = "EMMC Error, Please format it";
setWarning = false;
showError = false;
}
else if (0 == diskSizeEmmc && 0 == diskSizeSd)
{/*emmc error sd error*/
idLeft = LV_PLUGIN_IMG_ID_SF_SD_DIS;
idRight = LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS;
textLabel = "SD CARD Error";
// textLabelError = "EMMC and SD Card Error, Please format it";
lv_obj_set_pos(label_7_scr_uiflowphoto, 10, 171);
textLabelError = "EMMC and SD Card Error, Please format it";
setWarning = true;
showError = false;
}
else if (0 == diskSizeEmmc && 0 != diskSizeSd && diskFreeSd <= (FREE_SIZE_MB*1024*1024))
{/*emmc error sd full*/
idLeft = LV_PLUGIN_IMG_ID_SF_SD_FULL;
idRight = LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS;
textLabel = "SD CARD Full";
// textLabelError = "EMMC Error, Please format it";
textLabelError = "EMMC Error, Please format it";
setWarning = true;
showError = false;
}
else if (diskFreeEmmc < (FREE_SIZE_MB*1024*1024) && diskSizeSd > 0 && diskFreeSd >= (FREE_SIZE_MB*1024*1024))
@ -854,24 +872,27 @@ static void update_sd_emmc_status(void)
idRight = LV_PLUGIN_IMG_ID_SF_EMMC_FULL;
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
textLabel = Get_FreePicNumString(g_uiFreePicNum);
// textLabelError = "";
textLabelError = "";
setWarning = false;
showError = true;
}
else if (diskFreeEmmc < (FREE_SIZE_MB*1024*1024) && 0 == diskSizeSd)
{/*emmc full sd error*/
idLeft = LV_PLUGIN_IMG_ID_SF_SD_DIS;
idRight = LV_PLUGIN_IMG_ID_SF_EMMC_FULL;
textLabel = "SD CARD Error";
// textLabelError = "SD Card Error, Please format it";
textLabelError = "SD Card Error, Please format it";
setWarning = true;
showError = false;
}
else if (diskFreeEmmc < (FREE_SIZE_MB*1024*1024) && diskFreeSd < (FREE_SIZE_MB*1024*1024))
{/*emmc full sd full*/
idLeft = LV_PLUGIN_IMG_ID_SF_SD_FULL;
idRight = LV_PLUGIN_IMG_ID_SF_EMMC_FULL;
textLabel = "SD CARD Full";
// textLabelError = "";
textLabelError = "";
setWarning = true;
showError = true;
}
else
{
@ -889,7 +910,8 @@ static void update_sd_emmc_status(void)
{
set_normal_label_text(label_6_scr_uiflowphoto);
}
lv_obj_set_hidden(label_7_scr_uiflowphoto, showError);
lv_label_set_text(label_7_scr_uiflowphoto, textLabelError);
lv_label_set_text(label_6_scr_uiflowphoto, textLabel);
}

View File

@ -93,6 +93,7 @@
#define PB_ENABLE_THUMB_WITH_DIFF_FOLDER 0x00000040 ///< Thumbnail with diff folder
#define PB_ENABLE_TV_PLUGIN 0x00000080 ///< Represent TV in plun in
#define PB_ENABLE_SPEEDUP_SCREENNAIL 0x00000100 ///< Represent screennail is appended after primary image
#define PB_ENABLE_THUMB_JPG_FORCE_DECODE_PRIMARY 0x00000200 ///< Thumbnail - force decode primary if it's a JPG.
//@}
/**
@ -299,6 +300,8 @@ typedef enum _PB_PRMID {
PBPRMID_FILE_BUF_HD_INFO = 0x9D, ///< Get HDAL common file buffer info
PBPRMID_EXIF_BUF_HD_INFO = 0x9E, ///< Get HDAL common exif buffer info
PBPRMID_INFO_IMG_HDBUF = 0x9F, ///< Get HDAL common raw buffer info
PBPRMID_EXIF_MAKER_NAME = 0xA0, ///< Exif check before decode image
PBPRMID_EXIF_MODEL_NAME = 0xA1, ///< Exif check before decode image
ENUM_DUMMY4WORD(PB_PRMID)
} PB_PRMID;

Binary file not shown.

Binary file not shown.