Backup.
This commit is contained in:
parent
71c4f3351a
commit
37e8b2a006
|
@ -1147,6 +1147,22 @@ void _lv_plugin_menu_apply_item_state(lv_obj_t* btn, lv_plugin_menu_item_t* item
|
||||||
lv_obj_invalidate(btn);
|
lv_obj_invalidate(btn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lv_plugin_menu_set_item_state(lv_obj_t* menu, uint8_t item_idx, lv_plugin_menu_item_stat_t state)
|
||||||
|
{
|
||||||
|
LV_ASSERT_OBJ(menu, LV_PLUGIN_MENU_OBJ_NAME)
|
||||||
|
|
||||||
|
lv_plugin_menu_ext_t* ext = menu->ext_attr;
|
||||||
|
|
||||||
|
if(ext->items == NULL || item_idx >= ext->item_cnt)
|
||||||
|
return;
|
||||||
|
|
||||||
|
lv_plugin_menu_item_t* data = &ext->items[item_idx];
|
||||||
|
|
||||||
|
data->state = state;
|
||||||
|
|
||||||
|
_lv_plugin_menu_refresh_items(ext);
|
||||||
|
}
|
||||||
|
|
||||||
static LV_PLUG_RET _lv_plugin_menu_calculate_distance(lv_plugin_menu_ext_t* ext, uint8_t idx, int16_t* distance)
|
static LV_PLUG_RET _lv_plugin_menu_calculate_distance(lv_plugin_menu_ext_t* ext, uint8_t idx, int16_t* distance)
|
||||||
{
|
{
|
||||||
uint8_t start, end ;
|
uint8_t start, end ;
|
||||||
|
|
|
@ -74,6 +74,7 @@ uint8_t lv_plugin_menu_item_cnt(lv_obj_t *menu);
|
||||||
*/
|
*/
|
||||||
LV_PLUG_RET lv_plugin_menu_set_item_string_id(lv_obj_t* menu, uint8_t item_idx, lv_plugin_menu_item_stat_t state, lv_plugin_res_id id);
|
LV_PLUG_RET lv_plugin_menu_set_item_string_id(lv_obj_t* menu, uint8_t item_idx, lv_plugin_menu_item_stat_t state, lv_plugin_res_id id);
|
||||||
|
|
||||||
|
void lv_plugin_menu_set_item_state(lv_obj_t* menu, uint8_t item_idx, lv_plugin_menu_item_stat_t state);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"text_color": "0xffffff",
|
"text_color": "0xffffff",
|
||||||
"text_font": "montserrat 16 4bpp",
|
"text_font": "SF-UI-Text-Medium 16 1bpp",
|
||||||
"text_sel_bg_color": "0x00b495",
|
"text_sel_bg_color": "0x00b495",
|
||||||
"text_sel_color": "0x3c3c3c"
|
"text_sel_color": "0x3c3c3c"
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,6 +68,9 @@
|
||||||
"state": 5
|
"state": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"Text": {
|
||||||
|
"text_color": "0xc0c0c0"
|
||||||
|
},
|
||||||
"part": 0,
|
"part": 0,
|
||||||
"state": 6
|
"state": 6
|
||||||
}
|
}
|
||||||
|
@ -248,6 +251,9 @@
|
||||||
"state": 5
|
"state": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"Text": {
|
||||||
|
"text_color": "0xc0c0c0"
|
||||||
|
},
|
||||||
"part": 0,
|
"part": 0,
|
||||||
"state": 6
|
"state": 6
|
||||||
}
|
}
|
||||||
|
@ -428,6 +434,9 @@
|
||||||
"state": 5
|
"state": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"Text": {
|
||||||
|
"text_color": "0xc0c0c0"
|
||||||
|
},
|
||||||
"part": 0,
|
"part": 0,
|
||||||
"state": 6
|
"state": 6
|
||||||
}
|
}
|
||||||
|
@ -608,6 +617,9 @@
|
||||||
"state": 5
|
"state": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"Text": {
|
||||||
|
"text_color": "0xc0c0c0"
|
||||||
|
},
|
||||||
"part": 0,
|
"part": 0,
|
||||||
"state": 6
|
"state": 6
|
||||||
}
|
}
|
||||||
|
@ -788,6 +800,9 @@
|
||||||
"state": 5
|
"state": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"Text": {
|
||||||
|
"text_color": "0xc0c0c0"
|
||||||
|
},
|
||||||
"part": 0,
|
"part": 0,
|
||||||
"state": 6
|
"state": 6
|
||||||
}
|
}
|
||||||
|
|
|
@ -4900,6 +4900,11 @@
|
||||||
"filename": "icons/sy_bg_msg2.bmp",
|
"filename": "icons/sy_bg_msg2.bmp",
|
||||||
"name": "sy_bg_msg2"
|
"name": "sy_bg_msg2"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"colorFormat": "Indexed 256 in RGB332",
|
||||||
|
"filename": "icons/sy_lanya2.bmp",
|
||||||
|
"name": "sy_lanya2"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"colorFormat": "Indexed 256 in RGB332",
|
"colorFormat": "Indexed 256 in RGB332",
|
||||||
"filename": "icons/sy_luzhi.bmp",
|
"filename": "icons/sy_luzhi.bmp",
|
||||||
|
@ -4915,6 +4920,11 @@
|
||||||
"filename": "icons/sy_redline2.bmp",
|
"filename": "icons/sy_redline2.bmp",
|
||||||
"name": "sy_redline2"
|
"name": "sy_redline2"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"colorFormat": "Indexed 256 in RGB332",
|
||||||
|
"filename": "icons/sy_wifi2.bmp",
|
||||||
|
"name": "sy_wifi2"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"colorFormat": "Indexed 256 in RGB332",
|
"colorFormat": "Indexed 256 in RGB332",
|
||||||
"filename": "icons/work_mode.bmp",
|
"filename": "icons/work_mode.bmp",
|
||||||
|
|
|
@ -38,7 +38,7 @@ lv_obj_t* UIFlowMenuCommonConfirm_create(){
|
||||||
lv_style_set_pad_left(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
lv_style_set_pad_left(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
||||||
lv_style_set_pad_right(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
lv_style_set_pad_right(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
||||||
lv_style_set_pad_inner(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
lv_style_set_pad_inner(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
||||||
STYLE_COLOR_PROP(0x27, 0x6c, 0x6c, 0x6c) ; lv_style_set_bg_color(&message_box_1_s0, LV_STATE_DEFAULT, color);
|
STYLE_COLOR_PROP(0x24, 0x6c, 0x6c, 0x6c) ; lv_style_set_bg_color(&message_box_1_s0, LV_STATE_DEFAULT, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&message_box_1_s0, LV_STATE_DEFAULT, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&message_box_1_s0, LV_STATE_DEFAULT, color);
|
||||||
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&message_box_1_s0, LV_STATE_DEFAULT, color);
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&message_box_1_s0, LV_STATE_DEFAULT, color);
|
||||||
lv_style_set_border_width(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
lv_style_set_border_width(&message_box_1_s0,LV_STATE_DEFAULT,0);
|
||||||
|
|
|
@ -274,7 +274,7 @@ lv_obj_t* UIFlowMenuCommonItem_create(){
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_text_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x09, 0xc0, 0xc0, 0xc0) ; lv_style_set_text_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item1_s0, LV_STATE_DISABLED, color);
|
||||||
lv_obj_t *label_item1 = lv_label_create(image_button_item1, NULL);
|
lv_obj_t *label_item1 = lv_label_create(image_button_item1, NULL);
|
||||||
|
@ -438,7 +438,7 @@ lv_obj_t* UIFlowMenuCommonItem_create(){
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_text_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x09, 0xc0, 0xc0, 0xc0) ; lv_style_set_text_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item2_s0, LV_STATE_DISABLED, color);
|
||||||
lv_obj_t *label_item2 = lv_label_create(image_button_item2, NULL);
|
lv_obj_t *label_item2 = lv_label_create(image_button_item2, NULL);
|
||||||
|
@ -602,7 +602,7 @@ lv_obj_t* UIFlowMenuCommonItem_create(){
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_text_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x09, 0xc0, 0xc0, 0xc0) ; lv_style_set_text_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item3_s0, LV_STATE_DISABLED, color);
|
||||||
lv_obj_t *label_item3 = lv_label_create(image_button_item3, NULL);
|
lv_obj_t *label_item3 = lv_label_create(image_button_item3, NULL);
|
||||||
|
@ -766,7 +766,7 @@ lv_obj_t* UIFlowMenuCommonItem_create(){
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_text_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x09, 0xc0, 0xc0, 0xc0) ; lv_style_set_text_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item4_s0, LV_STATE_DISABLED, color);
|
||||||
lv_obj_t *label_item4 = lv_label_create(image_button_item4, NULL);
|
lv_obj_t *label_item4 = lv_label_create(image_button_item4, NULL);
|
||||||
|
@ -930,7 +930,7 @@ lv_obj_t* UIFlowMenuCommonItem_create(){
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x01, 0x00, 0x00, 0x00) ; lv_style_set_border_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_text_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x09, 0xc0, 0xc0, 0xc0) ; lv_style_set_text_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0xd3, 0x3c, 0x3c, 0x3c) ; lv_style_set_text_sel_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
||||||
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
STYLE_COLOR_PROP(0x3a, 0x00, 0xb4, 0x95) ; lv_style_set_text_sel_bg_color(&label_item5_s0, LV_STATE_DISABLED, color);
|
||||||
lv_obj_t *label_item5 = lv_label_create(image_button_item5, NULL);
|
lv_obj_t *label_item5 = lv_label_create(image_button_item5, NULL);
|
||||||
|
|
|
@ -4,9 +4,12 @@
|
||||||
#include "UIApp/Network/UIAppNetwork.h"
|
#include "UIApp/Network/UIAppNetwork.h"
|
||||||
#include "UIFlowLVGL/UIFlowMenuCommonItem/MenuId.h"
|
#include "UIFlowLVGL/UIFlowMenuCommonItem/MenuId.h"
|
||||||
#include <kwrap/debug.h>
|
#include <kwrap/debug.h>
|
||||||
|
#include <unistd.h>
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
#include <sf_inc.h>
|
#include <sf_inc.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
|
||||||
#define PAGE 32
|
#define PAGE 32
|
||||||
#define PER_PAGE_NUM 5
|
#define PER_PAGE_NUM 5
|
||||||
|
@ -34,6 +37,59 @@ lv_obj_t *menu_opened_get(void)
|
||||||
{
|
{
|
||||||
return menu_item;
|
return menu_item;
|
||||||
}
|
}
|
||||||
|
static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
|
||||||
|
{
|
||||||
|
DIR *dirp = NULL;
|
||||||
|
struct dirent *ptr = NULL;
|
||||||
|
|
||||||
|
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||||
|
if ((dirp=opendir((char *)SF_SD_ROOT)) != NULL)
|
||||||
|
{
|
||||||
|
while ((ptr=readdir(dirp)) != NULL)
|
||||||
|
{
|
||||||
|
if(strcmp(ptr->d_name,".")==0 || strcmp(ptr->d_name,"..")==0) ///current dir OR parrent dir
|
||||||
|
continue;
|
||||||
|
else if(ptr->d_type == 4) ///dir
|
||||||
|
{
|
||||||
|
if(strncmp(ptr->d_name, puiPara->ModuleVer, 6) == 0)
|
||||||
|
{
|
||||||
|
sprintf((char*)updateFname, "%s%s", "/mnt/sd/", ptr->d_name);
|
||||||
|
closedir(dirp);
|
||||||
|
printf("[%s:%d] updateFname:%s\n", __FUNCTION__, __LINE__, updateFname);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(dirp);
|
||||||
|
|
||||||
|
printf("no update file\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#define UPGRADABLE 0
|
||||||
|
#define NOT_UPGRADABLE -1
|
||||||
|
int is_camera_fw_upgrade(void)
|
||||||
|
{
|
||||||
|
// FST_FILE hFile = NULL;
|
||||||
|
if (sf_cardv_battery_value_get() < 40 || FileSys_OpenFile(FW_UPDATE_NAME, FST_OPEN_READ) == NULL)
|
||||||
|
{
|
||||||
|
return NOT_UPGRADABLE;
|
||||||
|
}
|
||||||
|
return UPGRADABLE;
|
||||||
|
}
|
||||||
|
int is_module_fw_upgrade(void)
|
||||||
|
{
|
||||||
|
UINT8 updateFileName[60] = {0};
|
||||||
|
if (sf_cardv_battery_value_get() < 40 || sf_is_4g_module_usb_update_file_exist(updateFileName) == FALSE)
|
||||||
|
{
|
||||||
|
return NOT_UPGRADABLE;
|
||||||
|
}
|
||||||
|
return UPGRADABLE;
|
||||||
|
}
|
||||||
#if 0
|
#if 0
|
||||||
static lv_obj_t* container_option1 = NULL;
|
static lv_obj_t* container_option1 = NULL;
|
||||||
static lv_obj_t* container_option2 = NULL;
|
static lv_obj_t* container_option2 = NULL;
|
||||||
|
@ -125,37 +181,48 @@ static TM_MENU *LV_MenuCommonItem_GetCurrentMenu(void)
|
||||||
static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu);
|
static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu);
|
||||||
static void LV_MenuItem_OnSelected(lv_obj_t* obj);
|
static void LV_MenuItem_OnSelected(lv_obj_t* obj);
|
||||||
|
|
||||||
|
//#NT#2023/11/21#Eric - begin
|
||||||
|
//#NT#Support IVOT_N12144_CO-148_1120_5
|
||||||
static void LV_MenuItem_OnPrev(lv_obj_t* obj)
|
static void LV_MenuItem_OnPrev(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
TM_MENU* pMenu = TM_GetMenu();
|
TM_MENU* pMenu = TM_GetMenu();
|
||||||
TM_PAGE *pPage;
|
TM_PAGE *pPage;
|
||||||
// TM_ITEM *pItem;
|
TM_ITEM *pItem;
|
||||||
|
BOOL uSel_Jump = false;
|
||||||
|
|
||||||
pPage = &pMenu->pPages[pMenu->SelPage];
|
pPage = &pMenu->pPages[pMenu->SelPage];
|
||||||
// DBG_DUMP("\r\n %s pMenu Status= %d\r\n", __func__, pMenu->Status);
|
|
||||||
// DBG_DUMP("\r\n %s pPage->SelItem= %d\r\n", __func__, pPage->SelItem);
|
|
||||||
if (pMenu->Status == TMS_ON_TAB){
|
if (pMenu->Status == TMS_ON_TAB){
|
||||||
if(pPage->SelItem == 0){
|
if(pPage->SelItem == 0){
|
||||||
// DBG_WRN("already foucs on tab !");
|
// DBG_WRN("already foucs on tab !");
|
||||||
DBG_DUMP("^Galready foucs on tab !");
|
DBG_DUMP("^Galready foucs on tab !");
|
||||||
//return;
|
|
||||||
pPage->SelItem = (pPage->Count - 1);
|
pPage->SelItem = (pPage->Count - 1);
|
||||||
//}else if(pPage->SelItem < pPage->Count){
|
|
||||||
//CHKPNT;
|
|
||||||
pMenu->Status = TMS_ON_ITEM;
|
pMenu->Status = TMS_ON_ITEM;
|
||||||
LV_MenuCommonItem_UpdateContent(pMenu);
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_select_item(menu_item, pPage->SelItem);
|
lv_plugin_menu_select_item(menu_item, pPage->SelItem);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
OneMore:
|
||||||
//if item = 0; up key foucs to tab
|
//if item = 0; up key foucs to tab
|
||||||
if(pPage->SelItem == 0){
|
if(pPage->SelItem == 0){
|
||||||
pMenu->Status = TMS_ON_TAB;
|
pMenu->Status = TMS_ON_TAB;
|
||||||
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_clear_selected_item(menu_item);
|
lv_plugin_menu_clear_selected_item(menu_item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pPage->SelItem--;
|
pPage->SelItem--;
|
||||||
|
pItem = &pPage->pItems[pPage->SelItem];
|
||||||
|
BOOL uItem_Locked = true; // TODO:
|
||||||
|
if(((pItem->ItemId == IDM_CAMERA_FW_UPGRADE) || (pItem->ItemId == IDM_MODULE_FW_UPGRADE)) && uItem_Locked){
|
||||||
|
lv_plugin_menu_select_prev_item(menu_item);
|
||||||
|
uSel_Jump = true;
|
||||||
|
goto OneMore;
|
||||||
|
}
|
||||||
LV_MenuCommonItem_UpdateContent(pMenu);
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_select_prev_item(menu_item);
|
lv_plugin_menu_select_prev_item(menu_item);
|
||||||
|
if(uSel_Jump){
|
||||||
|
lv_plugin_menu_set_item_state(menu_item, (pPage->SelItem + 1), LV_PLUGIN_MENU_ITEM_STATE_DISABLED);
|
||||||
|
}
|
||||||
|
uSel_Jump = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,17 +230,27 @@ static void LV_MenuItem_OnNext(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
TM_MENU* pMenu = TM_GetMenu();
|
TM_MENU* pMenu = TM_GetMenu();
|
||||||
TM_PAGE *pPage;
|
TM_PAGE *pPage;
|
||||||
|
TM_ITEM *pItem;
|
||||||
|
BOOL uSel_Jump = false;
|
||||||
|
|
||||||
pPage = &pMenu->pPages[pMenu->SelPage];
|
pPage = &pMenu->pPages[pMenu->SelPage];
|
||||||
// DBG_DUMP("\r\n %s pMenu Status= %d\r\n", __func__, pMenu->Status);
|
// DBG_DUMP("\r\n %s pMenu Status= %d\r\n", __func__, pMenu->Status);
|
||||||
if (pMenu->Status == TMS_ON_TAB){
|
if (pMenu->Status == TMS_ON_TAB){
|
||||||
pMenu->Status = TMS_ON_ITEM;
|
pMenu->Status = TMS_ON_ITEM;
|
||||||
pPage->SelItem = 0;
|
pPage->SelItem = 0;
|
||||||
LV_MenuCommonItem_UpdateContent(pMenu);
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_select_item(menu_item, 0);
|
lv_plugin_menu_select_item(menu_item, 0);
|
||||||
}else{
|
}else{
|
||||||
pPage->SelItem++;
|
Onetime:
|
||||||
// DBG_DUMP("\r\n %s pPage->SelItem= %d\r\n", __func__, pMenu->Status);
|
pPage->SelItem++;
|
||||||
|
pItem = &pPage->pItems[pPage->SelItem];
|
||||||
|
BOOL uItem_Locked = true; // TODO:
|
||||||
|
if(((pItem->ItemId == IDM_CAMERA_FW_UPGRADE) || (pItem->ItemId == IDM_MODULE_FW_UPGRADE))&& uItem_Locked){
|
||||||
|
lv_plugin_menu_select_next_item(menu_item);
|
||||||
|
uSel_Jump = true;
|
||||||
|
goto Onetime;
|
||||||
|
}
|
||||||
|
|
||||||
if(pPage->SelItem >= pPage->Count){
|
if(pPage->SelItem >= pPage->Count){
|
||||||
pPage->SelItem = 0;
|
pPage->SelItem = 0;
|
||||||
LV_MenuCommonItem_UpdateContent(pMenu);
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
|
@ -186,8 +263,12 @@ static void LV_MenuItem_OnNext(lv_obj_t* obj)
|
||||||
//#NT#2023/11/03#Eric - end
|
//#NT#2023/11/03#Eric - end
|
||||||
LV_MenuCommonItem_UpdateContent(pMenu);
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_select_next_item(menu_item);
|
lv_plugin_menu_select_next_item(menu_item);
|
||||||
|
if(uSel_Jump){
|
||||||
|
lv_plugin_menu_set_item_state(menu_item, (pPage->SelItem - 1), LV_PLUGIN_MENU_ITEM_STATE_DISABLED);
|
||||||
|
}
|
||||||
|
uSel_Jump = false;
|
||||||
}
|
}
|
||||||
// LV_MenuCommonItem_UpdateContent(pMenu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LV_MenuItem_OnUp(lv_obj_t* obj)
|
static void LV_MenuItem_OnUp(lv_obj_t* obj)
|
||||||
|
@ -196,7 +277,7 @@ static void LV_MenuItem_OnUp(lv_obj_t* obj)
|
||||||
TM_PAGE *pPage;
|
TM_PAGE *pPage;
|
||||||
|
|
||||||
pPage = &pMenu->pPages[pMenu->SelPage];
|
pPage = &pMenu->pPages[pMenu->SelPage];
|
||||||
if (pMenu->Status == TMS_ON_TAB)
|
if (pMenu->Status == TMS_ON_TAB)
|
||||||
{
|
{
|
||||||
printf("handle on tab.\n");
|
printf("handle on tab.\n");
|
||||||
TM_ShiftTab(pMenu, -1);
|
TM_ShiftTab(pMenu, -1);
|
||||||
|
@ -207,14 +288,10 @@ static void LV_MenuItem_OnUp(lv_obj_t* obj)
|
||||||
LV_MenuCommonItem_UpdateContent(pMenu);
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_select_prev_item(menu_tab);
|
lv_plugin_menu_select_prev_item(menu_tab);
|
||||||
}else{
|
}else{
|
||||||
printf("handle on item.\n");
|
|
||||||
//#NT#2023/11/03#Eric - begin
|
|
||||||
//#NT#Support IVOT_N12144_CO-148
|
|
||||||
//if (pMenu->Status == TMS_ON_TAB)
|
|
||||||
//#NT#2023/11/03#Eric - end
|
|
||||||
pPage->SelItem = 0;
|
|
||||||
pMenu->Status = TMS_ON_TAB;
|
pMenu->Status = TMS_ON_TAB;
|
||||||
|
LV_MenuCommonItem_UpdateContent(pMenu);
|
||||||
lv_plugin_menu_clear_selected_item(menu_item);
|
lv_plugin_menu_clear_selected_item(menu_item);
|
||||||
|
pPage->SelItem = 0;
|
||||||
//lv_plugin_scr_close(obj, NULL);
|
//lv_plugin_scr_close(obj, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,6 +313,8 @@ static void LV_MenuItem_OnDown(lv_obj_t* obj)
|
||||||
LV_MenuItem_OnSelected(obj);
|
LV_MenuItem_OnSelected(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//#NT#2023/11/21#Eric - end
|
||||||
|
|
||||||
#define ITEM_IS_SWITCH 1
|
#define ITEM_IS_SWITCH 1
|
||||||
#define ITEM_IS_NOT_SWITCH 0
|
#define ITEM_IS_NOT_SWITCH 0
|
||||||
static int IsItemSwitch(const TM_ITEM *item)
|
static int IsItemSwitch(const TM_ITEM *item)
|
||||||
|
@ -579,19 +658,23 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
|
||||||
u_hiddenitem = true;
|
u_hiddenitem = true;
|
||||||
}else{
|
}else{
|
||||||
lv_plugin_menu_set_item_string_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, pItem->TextId);
|
lv_plugin_menu_set_item_string_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, pItem->TextId);
|
||||||
lv_plugin_menu_set_item_img_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, pItem->IconId);
|
|
||||||
lv_plugin_menu_set_item_hidden(menu_item, i, false);
|
lv_plugin_menu_set_item_hidden(menu_item, i, false);
|
||||||
|
//#NT#2023/11/21#Eric - begin
|
||||||
|
//#NT#Support IVOT_N12144_CO-148_1120_5
|
||||||
|
BOOL uItem_Locked = true; // TODO:
|
||||||
|
if(((pItem->ItemId == IDM_CAMERA_FW_UPGRADE) || (pItem->ItemId == IDM_MODULE_FW_UPGRADE))&& uItem_Locked){
|
||||||
|
lv_plugin_menu_set_item_state(menu_item, i, LV_PLUGIN_MENU_ITEM_STATE_DISABLED);
|
||||||
|
lv_plugin_menu_set_item_img_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, LV_PLUGIN_IMG_ID_SF_CAMERA_NETWORK_SELECTION);
|
||||||
|
} else {
|
||||||
|
lv_plugin_menu_set_item_img_id(menu_item, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM, pItem->IconId);
|
||||||
|
}
|
||||||
|
//#NT#2023/11/21#Eric - end
|
||||||
u_hiddenitem = false;
|
u_hiddenitem = false;
|
||||||
}
|
}
|
||||||
// SelOption = (Sel_item * PER_PAGE_NUM) + i;
|
|
||||||
// DBG_DUMP("\r\n %s SelOption F= %d\r\n", __func__, SelOption);
|
|
||||||
if(!u_hiddenitem){
|
if(!u_hiddenitem){
|
||||||
if(i == 0){
|
if(i == 0){
|
||||||
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
|
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
|
||||||
// DBG_DUMP("\r\n %s Sel_item 0= %d\r\n", __func__, Sel_item);
|
|
||||||
// DBG_DUMP("\r\n %s Sel_item F= %d\r\n", __func__, (Sel_item%5));
|
|
||||||
// DBG_DUMP("\r\n %s pPage->SelItem 0= %d\r\n", __func__, pPage->SelItem);
|
|
||||||
// DBG_DUMP("\r\n %s pPage->SelItem F= %d\r\n", __func__, (pPage->SelItem%PER_PAGE_NUM));
|
|
||||||
//#NT#2023/11/03#Eric - begin
|
//#NT#2023/11/03#Eric - begin
|
||||||
//#NT#Support IVOT_N12144_CO-148 -5
|
//#NT#Support IVOT_N12144_CO-148 -5
|
||||||
if(((pPage->SelItem%PER_PAGE_NUM) == 0)&&(pMenu->Status == TMS_ON_ITEM)){
|
if(((pPage->SelItem%PER_PAGE_NUM) == 0)&&(pMenu->Status == TMS_ON_ITEM)){
|
||||||
|
|
|
@ -64,6 +64,11 @@ static unsigned long KeyDownPressingTimeMs = 0;
|
||||||
static int SendMsgShow = SENDING_NOT_SHOW;
|
static int SendMsgShow = SENDING_NOT_SHOW;
|
||||||
|
|
||||||
static BOOL g_PhotoBgInitFileSys = FALSE;
|
static BOOL g_PhotoBgInitFileSys = FALSE;
|
||||||
|
//#NT#2023/11/21#Eric - begin
|
||||||
|
//#NT#Support IVOT_N12144_CO-148_1120_4
|
||||||
|
static BOOL g_SysStrg_Chg = FALSE;
|
||||||
|
//#NT#2023/11/21#Eric - end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _UIFlowInfoTypePhoto {
|
typedef struct _UIFlowInfoTypePhoto {
|
||||||
|
@ -487,21 +492,39 @@ static void update_camera_message(void)
|
||||||
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
if (cardStatus != CARD_REMOVED)
|
if (cardStatus != CARD_REMOVED)
|
||||||
{
|
{
|
||||||
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
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");
|
// lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
|
||||||
} if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
|
} else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
|
||||||
{
|
{
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, "SD FULL");
|
lv_label_set_text(label_6_scr_uiflowphoto, "SD FULL");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (FALSE == sf_get_cap_statu())
|
//#NT#2023/11/21#Eric - begin
|
||||||
{
|
//#NT#Support IVOT_N12144_CO-148_1120_4
|
||||||
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
|
// if(g_SysStrg_Chg){
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
|
// 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
|
||||||
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -1513,6 +1536,10 @@ static void UIFlowPhoto_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* m
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NVTEVT_STORAGE_CHANGE:
|
case NVTEVT_STORAGE_CHANGE:
|
||||||
|
//#NT#2023/11/21#Eric - begin
|
||||||
|
//#NT#Support IVOT_N12144_CO-148_1120_4
|
||||||
|
g_SysStrg_Chg = true;
|
||||||
|
//#NT#2023/11/21#Eric - end
|
||||||
UIFlowPhoto_OnStorageChange(obj, msg);
|
UIFlowPhoto_OnStorageChange(obj, msg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1959,7 +1959,10 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
play_video(obj);
|
play_video(obj);
|
||||||
break;
|
break;
|
||||||
|
//#NT#2023/11/21#Eric - begin
|
||||||
|
//#NT#Support IVOT_N12144_CO-148_1120_3
|
||||||
UIFlowPlay_OnKeyShutter2(obj);
|
UIFlowPlay_OnKeyShutter2(obj);
|
||||||
|
//#NT#2023/11/21#Eric - end
|
||||||
// UIFlowPlay_OnKeySelect(obj);
|
// UIFlowPlay_OnKeySelect(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user