Merge branch 'Branch_S550_Fast_Emmc' of http://192.168.6.216/linux-em-group/s530-ntk into Branch_S550_Fast_Emmc
This commit is contained in:
commit
87ece34cef
|
@ -155,7 +155,7 @@ static int nvt_handle_fw_abin(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char cmdline[1024] = {0};
|
char cmdline[1024] = {0};
|
||||||
char buf[1024] = {0};
|
char buf[512] = {0};
|
||||||
int ota_upgrade_sts = 0;
|
int ota_upgrade_sts = 0;
|
||||||
int is_ota = 0;
|
int is_ota = 0;
|
||||||
if(WDT_OTA_GET_STS() == WDT_OTA_MAKEFOURCC(WDT_OTA_STS_LOADER_DETECTING_FW))
|
if(WDT_OTA_GET_STS() == WDT_OTA_MAKEFOURCC(WDT_OTA_STS_LOADER_DETECTING_FW))
|
||||||
|
@ -216,21 +216,27 @@ static int nvt_handle_fw_abin(void)
|
||||||
}
|
}
|
||||||
} else{
|
} else{
|
||||||
printf("%s%s:%d Update successfully %s\r\n", ANSI_COLOR_YELLOW, __FUNCTION__, __LINE__, ANSI_COLOR_RESET);
|
printf("%s%s:%d Update successfully %s\r\n", ANSI_COLOR_YELLOW, __FUNCTION__, __LINE__, ANSI_COLOR_RESET);
|
||||||
ota_upgrade_sts = 1;
|
|
||||||
|
|
||||||
if(is_ota)
|
if(is_ota)
|
||||||
WDT_OTA_SET_STS(WDT_OTA_STS_UBOOT_UPDATE_OK);
|
WDT_OTA_SET_STS(WDT_OTA_STS_UBOOT_UPDATE_OK);
|
||||||
|
|
||||||
|
ota_upgrade_sts = 1;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* To handle bootargs expanding for the kernel /proc/cmdline and uboot mtdids env setting
|
* To handle bootargs expanding for the kernel /proc/cmdline and uboot mtdids env setting
|
||||||
*/
|
*/
|
||||||
sprintf(buf,"%s ",env_get("bootargs"));
|
//printf("%s:%d ota_upgrade_sts:%d\n", __FUNCTION__, __LINE__ ,ota_upgrade_sts);
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), env_get("bootargs"));
|
||||||
|
//sprintf(buf,"%s ",env_get("bootargs"));
|
||||||
|
//printf("%s:%d ota_upgrade_sts:%d\n", __FUNCTION__, __LINE__ ,ota_upgrade_sts);
|
||||||
|
|
||||||
strcat(cmdline, buf);
|
strcat(cmdline, buf);
|
||||||
ret = nvt_part_config((char *)cmdline, NULL);
|
ret = nvt_part_config((char *)cmdline, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (ota_upgrade_sts == 1) {
|
if (ota_upgrade_sts != 0) {
|
||||||
strcat(cmdline, "ota_flag=0x1");
|
strcat(cmdline, "ota_flag=0x1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -979,6 +979,8 @@
|
||||||
#endif
|
#endif
|
||||||
#define SF_NO_SD_SEND ENABLE
|
#define SF_NO_SD_SEND ENABLE
|
||||||
#define SF_SD_LOG_INFO_FILENAME "/tmp/SD.txt"
|
#define SF_SD_LOG_INFO_FILENAME "/tmp/SD.txt"
|
||||||
|
|
||||||
|
#define SF_4G_MODE_TEST DISABLE
|
||||||
//////////////////////sf end///////////////////////////////
|
//////////////////////sf end///////////////////////////////
|
||||||
|
|
||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
|
|
|
@ -168,7 +168,7 @@ static BOOL System_InsmodUsb(BOOL isHost)
|
||||||
|
|
||||||
if(isHost == FALSE){
|
if(isHost == FALSE){
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
sf_set_msdc_clk();
|
//sf_set_msdc_clk();
|
||||||
sf_usb_mux_s(0);
|
sf_usb_mux_s(0);
|
||||||
vos_util_delay_ms(200);
|
vos_util_delay_ms(200);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -233,7 +233,7 @@ BOOL PBDecVideoCB(UINT32 uiUserDataAddr, UINT32 uiUserDataSize)
|
||||||
*/
|
*/
|
||||||
INT32 PlayExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
INT32 PlayExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
{
|
{
|
||||||
|
printf("[------------------------------------------------------------------------------------------------------------------]\n");
|
||||||
UINT32 useFileDB = 0;
|
UINT32 useFileDB = 0;
|
||||||
UINT32 uiPoolAddr = (UINT32)mempool_filedb;
|
UINT32 uiPoolAddr = (UINT32)mempool_filedb;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ INT32 PlayExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
if (useFileDB) {
|
if (useFileDB) {
|
||||||
CHAR *rootPath = "A:\\";
|
CHAR *rootPath = "A:\\";
|
||||||
//CHAR* defaultfolder="A:\\CarDV\\";
|
//CHAR* defaultfolder="A:\\CarDV\\";
|
||||||
|
printf("[---------useFileDB IN -]%d\n", useFileDB);
|
||||||
PPBX_FLIST_OBJ pFlist = PBXFList_FDB_getObject();
|
PPBX_FLIST_OBJ pFlist = PBXFList_FDB_getObject();
|
||||||
pFlist->Config(PBX_FLIST_CONFIG_MEM, uiPoolAddr, POOL_SIZE_FILEDB);
|
pFlist->Config(PBX_FLIST_CONFIG_MEM, uiPoolAddr, POOL_SIZE_FILEDB);
|
||||||
pFlist->Config(PBX_FLIST_CONFIG_MAX_FILENUM, 5000, 0);
|
pFlist->Config(PBX_FLIST_CONFIG_MAX_FILENUM, 5000, 0);
|
||||||
|
@ -275,6 +275,7 @@ INT32 PlayExe_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
pFlist->Config(PBX_FLIST_CONFIG_SUPPORT_LONGNAME, 1, 0);
|
pFlist->Config(PBX_FLIST_CONFIG_SUPPORT_LONGNAME, 1, 0);
|
||||||
PB_SetParam(PBPRMID_FILELIST_OBJ, (UINT32)pFlist);
|
PB_SetParam(PBPRMID_FILELIST_OBJ, (UINT32)pFlist);
|
||||||
} else {
|
} else {
|
||||||
|
printf("[---------useFileDB not in -]%d\n", useFileDB);
|
||||||
PB_SetParam(PBPRMID_FILELIST_OBJ, (UINT32)PBXFList_DCF_getObject());
|
PB_SetParam(PBPRMID_FILELIST_OBJ, (UINT32)PBXFList_DCF_getObject());
|
||||||
}
|
}
|
||||||
PB_SetParam(PBPRMID_DEC_VIDEO_CALLBACK, (UINT32)PBDecVideoCB);
|
PB_SetParam(PBPRMID_DEC_VIDEO_CALLBACK, (UINT32)PBDecVideoCB);
|
||||||
|
|
Binary file not shown.
|
@ -1707,7 +1707,7 @@
|
||||||
"X": 0,
|
"X": 0,
|
||||||
"Y": 0
|
"Y": 0
|
||||||
},
|
},
|
||||||
"source": "sf_delete",
|
"source": "sf_Exit",
|
||||||
"styles": [
|
"styles": [
|
||||||
{
|
{
|
||||||
"part": 0,
|
"part": 0,
|
||||||
|
@ -1759,7 +1759,7 @@
|
||||||
"X": 0,
|
"X": 0,
|
||||||
"Y": 0
|
"Y": 0
|
||||||
},
|
},
|
||||||
"source": "sf_Exit",
|
"source": "sf_delete",
|
||||||
"styles": [
|
"styles": [
|
||||||
{
|
{
|
||||||
"part": 0,
|
"part": 0,
|
||||||
|
@ -3285,6 +3285,68 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"widget": "Container"
|
"widget": "Container"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"class": "lv_cont",
|
||||||
|
"click": true,
|
||||||
|
"drag": false,
|
||||||
|
"event callback": "",
|
||||||
|
"geometry": {
|
||||||
|
"height": 40,
|
||||||
|
"width": 320,
|
||||||
|
"x": 5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"hidden": true,
|
||||||
|
"layout": "Off",
|
||||||
|
"locked": false,
|
||||||
|
"name": "container_option_title",
|
||||||
|
"styles": [
|
||||||
|
{
|
||||||
|
"Background": {
|
||||||
|
"bg_color": "0x666666",
|
||||||
|
"bg_opa": 0
|
||||||
|
},
|
||||||
|
"Border": {
|
||||||
|
"border_color": "0xdddddd",
|
||||||
|
"border_opa": 0,
|
||||||
|
"border_width": 0
|
||||||
|
},
|
||||||
|
"Mix": {
|
||||||
|
"radius": 0
|
||||||
|
},
|
||||||
|
"Padding": {
|
||||||
|
"pad_inner": 5
|
||||||
|
},
|
||||||
|
"part": 0,
|
||||||
|
"state": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"part": 0,
|
||||||
|
"state": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"part": 0,
|
||||||
|
"state": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"part": 0,
|
||||||
|
"state": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"part": 0,
|
||||||
|
"state": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"part": 0,
|
||||||
|
"state": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"part": 0,
|
||||||
|
"state": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"widget": "Container"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -694,12 +694,22 @@ static void qr_page_task_cb(lv_task_t* task){
|
||||||
{
|
{
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
printf("[qr_page_task_cb]is esim card...%s\n", puiPara->ModuleImei);
|
printf("[qr_page_task_cb]is esim card...%s\n", puiPara->ModuleImei);
|
||||||
|
if(strlen(puiPara->SimIccidV) == 0 && strlen(puiPara->SimIccidA) == 0)
|
||||||
|
{
|
||||||
|
lv_label_set_text(labelInit, "Please restart the camera");
|
||||||
|
return;
|
||||||
|
}
|
||||||
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "true");
|
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "true");
|
||||||
}
|
}
|
||||||
else if (ret == 0)
|
else if (ret == 0)
|
||||||
{
|
{
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
printf("[qr_page_task_cb]is sim card...%s\n", puiPara->ModuleImei);
|
printf("[qr_page_task_cb]is sim card...%s\n", puiPara->ModuleImei);
|
||||||
|
if(strlen(puiPara->SimIccidV) == 0 && strlen(puiPara->SimIccidA) == 0)
|
||||||
|
{
|
||||||
|
lv_label_set_text(labelInit, "Please insert SIM card and restart the camera");
|
||||||
|
return;
|
||||||
|
}
|
||||||
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "false");
|
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "false");
|
||||||
}
|
}
|
||||||
else if (ret == -1)
|
else if (ret == -1)
|
||||||
|
|
|
@ -2139,8 +2139,10 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
#define PASSWORD_OPENED 1
|
#define PASSWORD_OPENED 1
|
||||||
#define PASSWORD_NOT_OPENED 0
|
#define PASSWORD_NOT_OPENED 0
|
||||||
static int passwordOpened = PASSWORD_NOT_OPENED;
|
static int passwordOpened = PASSWORD_NOT_OPENED;
|
||||||
|
printf("[***************x]check password");
|
||||||
if(PASSWORD_SWITCH_ON == puiPara->PwdSwitch && PASSWORD_NOT_OPENED == passwordOpened)
|
if(PASSWORD_SWITCH_ON == puiPara->PwdSwitch && PASSWORD_NOT_OPENED == passwordOpened)
|
||||||
{
|
{
|
||||||
|
printf("[***************x]password open");
|
||||||
passwordOpened = PASSWORD_OPENED;
|
passwordOpened = PASSWORD_OPENED;
|
||||||
OpenPasswordScreen();
|
OpenPasswordScreen();
|
||||||
ShutDownTime = PASSWORD_GO_TO_WORK_MODE_TIME_S;
|
ShutDownTime = PASSWORD_GO_TO_WORK_MODE_TIME_S;
|
||||||
|
|
|
@ -59,6 +59,7 @@ lv_obj_t* image_option4_scr_uiflowplay;
|
||||||
lv_obj_t* image_button_option_5_scr_uiflowplay;
|
lv_obj_t* image_button_option_5_scr_uiflowplay;
|
||||||
lv_obj_t* label_option5_scr_uiflowplay;
|
lv_obj_t* label_option5_scr_uiflowplay;
|
||||||
lv_obj_t* image_option5_scr_uiflowplay;
|
lv_obj_t* image_option5_scr_uiflowplay;
|
||||||
|
lv_obj_t* container_option_title_scr_uiflowplay;
|
||||||
|
|
||||||
lv_obj_t* UIFlowPlay_create(){
|
lv_obj_t* UIFlowPlay_create(){
|
||||||
lv_obj_t *parent = lv_plugin_scr_create();
|
lv_obj_t *parent = lv_plugin_scr_create();
|
||||||
|
@ -1498,7 +1499,7 @@ lv_obj_t* UIFlowPlay_create(){
|
||||||
lv_obj_set_drag(image_exit, false);
|
lv_obj_set_drag(image_exit, false);
|
||||||
lv_obj_set_pos(image_exit, 135, 0);
|
lv_obj_set_pos(image_exit, 135, 0);
|
||||||
lv_obj_set_size(image_exit, 32, 40);
|
lv_obj_set_size(image_exit, 32, 40);
|
||||||
lv_img_set_src(image_exit, &sf_delete);
|
lv_img_set_src(image_exit, &sf_exit);
|
||||||
lv_obj_add_style(image_exit, 0, &image_exit_s0);
|
lv_obj_add_style(image_exit, 0, &image_exit_s0);
|
||||||
|
|
||||||
image_exit_scr_uiflowplay = image_exit;
|
image_exit_scr_uiflowplay = image_exit;
|
||||||
|
@ -1547,7 +1548,7 @@ lv_obj_t* UIFlowPlay_create(){
|
||||||
lv_obj_set_drag(image_delete, false);
|
lv_obj_set_drag(image_delete, false);
|
||||||
lv_obj_set_pos(image_delete, 214, 0);
|
lv_obj_set_pos(image_delete, 214, 0);
|
||||||
lv_obj_set_size(image_delete, 32, 40);
|
lv_obj_set_size(image_delete, 32, 40);
|
||||||
lv_img_set_src(image_delete, &sf_exit);
|
lv_img_set_src(image_delete, &sf_delete);
|
||||||
lv_obj_add_style(image_delete, 0, &image_delete_s0);
|
lv_obj_add_style(image_delete, 0, &image_delete_s0);
|
||||||
|
|
||||||
image_delete_scr_uiflowplay = image_delete;
|
image_delete_scr_uiflowplay = image_delete;
|
||||||
|
@ -2857,5 +2858,44 @@ lv_obj_t* UIFlowPlay_create(){
|
||||||
image_option5_scr_uiflowplay = image_option5;
|
image_option5_scr_uiflowplay = image_option5;
|
||||||
|
|
||||||
|
|
||||||
|
static lv_style_t container_option_title_s0;
|
||||||
|
lv_style_init(&container_option_title_s0);
|
||||||
|
lv_style_set_radius(&container_option_title_s0,LV_STATE_DEFAULT,0);
|
||||||
|
lv_style_set_pad_inner(&container_option_title_s0,LV_STATE_DEFAULT,5);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_DEFAULT, color);
|
||||||
|
lv_style_set_bg_opa(&container_option_title_s0,LV_STATE_DEFAULT,0);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_DEFAULT, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_DEFAULT, color);
|
||||||
|
lv_style_set_border_opa(&container_option_title_s0,LV_STATE_DEFAULT,0);
|
||||||
|
lv_style_set_border_width(&container_option_title_s0,LV_STATE_DEFAULT,0);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_CHECKED, color);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_CHECKED, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_CHECKED, color);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_FOCUSED, color);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_FOCUSED, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_FOCUSED, color);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_EDITED, color);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_EDITED, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_EDITED, color);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_HOVERED, color);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_HOVERED, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_HOVERED, color);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_PRESSED, color);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_PRESSED, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_PRESSED, color);
|
||||||
|
STYLE_COLOR_PROP(0x8b, 0x66, 0x66, 0x66) ; lv_style_set_bg_color(&container_option_title_s0, LV_STATE_DISABLED, color);
|
||||||
|
STYLE_COLOR_PROP(0x02, 0xff, 0xff, 0xff) ; lv_style_set_bg_grad_color(&container_option_title_s0, LV_STATE_DISABLED, color);
|
||||||
|
STYLE_COLOR_PROP(0xe9, 0xdd, 0xdd, 0xdd) ; lv_style_set_border_color(&container_option_title_s0, LV_STATE_DISABLED, color);
|
||||||
|
lv_obj_t *container_option_title = lv_cont_create(parent, NULL);
|
||||||
|
lv_obj_set_hidden(container_option_title, true);
|
||||||
|
lv_obj_set_click(container_option_title, true);
|
||||||
|
lv_obj_set_drag(container_option_title, false);
|
||||||
|
lv_obj_set_pos(container_option_title, 5, 0);
|
||||||
|
lv_obj_set_size(container_option_title, 320, 40);
|
||||||
|
lv_obj_add_style(container_option_title, 0, &container_option_title_s0);
|
||||||
|
|
||||||
|
container_option_title_scr_uiflowplay = container_option_title;
|
||||||
|
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ extern lv_obj_t* image_option4_scr_uiflowplay;
|
||||||
extern lv_obj_t* image_button_option_5_scr_uiflowplay;
|
extern lv_obj_t* image_button_option_5_scr_uiflowplay;
|
||||||
extern lv_obj_t* label_option5_scr_uiflowplay;
|
extern lv_obj_t* label_option5_scr_uiflowplay;
|
||||||
extern lv_obj_t* image_option5_scr_uiflowplay;
|
extern lv_obj_t* image_option5_scr_uiflowplay;
|
||||||
|
extern lv_obj_t* container_option_title_scr_uiflowplay;
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
|
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
|
||||||
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
|
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
|
||||||
#include "kwrap/nvt_type.h"
|
#include "kwrap/nvt_type.h"
|
||||||
|
#include "SF_SysStrgMng.h"
|
||||||
#if (USE_DCF == ENABLE)
|
#if (USE_DCF == ENABLE)
|
||||||
#include "DCF.h"
|
#include "DCF.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
//#define PLAY_KEY_PRESS_MASK (FLGKEY_KEY_MASK_DEFAULT)
|
//#define PLAY_KEY_PRESS_MASK (FLGKEY_KEY_MASK_DEFAULT)
|
||||||
//#define PLAY_KEY_RELEASE_MASK FLGKEY_KEY_MASK_NULL//(FLGKEY_UP | FLGKEY_DOWN | FLGKEY_LEFT | FLGKEY_RIGHT)
|
//#define PLAY_KEY_RELEASE_MASK FLGKEY_KEY_MASK_NULL//(FLGKEY_UP | FLGKEY_DOWN | FLGKEY_LEFT | FLGKEY_RIGHT)
|
||||||
//#define PLAY_KEY_CONTINUE_MASK FLGKEY_KEY_CONT_MASK_DEFAULT
|
//#define PLAY_KEY_CONTINUE_MASK FLGKEY_KEY_CONT_MASK_DEFAULT
|
||||||
|
extern SF_ST_MMC_DEV *mmc_dev;
|
||||||
static lv_obj_t* pMenu = NULL;
|
//static lv_obj_t* pMenu = NULL;
|
||||||
enum SELECTION_SHOW
|
enum SELECTION_SHOW
|
||||||
{
|
{
|
||||||
SELECTION_SHOW_TURE = 0,
|
SELECTION_SHOW_TURE = 0,
|
||||||
|
@ -75,112 +75,155 @@ extern uint16_t warn_msgbox_auto_close_ms;
|
||||||
//static lv_obj_t* curr_pressbtn;
|
//static lv_obj_t* curr_pressbtn;
|
||||||
|
|
||||||
#define ITEMS_PER_PAGE 5
|
#define ITEMS_PER_PAGE 5
|
||||||
|
|
||||||
|
void init_bar(void)
|
||||||
|
{
|
||||||
|
lv_obj_set_state(container_option_title_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_hidden(container_option_title_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hidde_bar(void)
|
||||||
|
{
|
||||||
|
lv_obj_set_hidden(container_option_title_scr_uiflowplay, true);
|
||||||
|
}
|
||||||
|
|
||||||
static void update_play_Selection_msg(lv_obj_t* obj)
|
static void update_play_Selection_msg(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < ITEMS_PER_PAGE; i++)
|
for(int i = 0; i < ITEMS_PER_PAGE; i++)
|
||||||
{
|
{
|
||||||
if(i == 0){
|
if (i == 2)
|
||||||
if (ProfileFocused == i) {
|
{
|
||||||
lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_FOCUSED);
|
|
||||||
lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_FOCUSED);
|
|
||||||
// lv_obj_set_hidden(image_option1_scr_uiflowplay, false);
|
|
||||||
lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED_NEXT2);
|
|
||||||
lv_obj_set_pos(image_option1_scr_uiflowplay, 259, 0);
|
|
||||||
} else {
|
|
||||||
lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_DEFAULT);
|
|
||||||
// lv_obj_set_hidden(image_option1_scr_uiflowplay, false);
|
|
||||||
lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT1);
|
|
||||||
lv_obj_set_pos(image_option1_scr_uiflowplay, 288, 0);
|
|
||||||
}
|
|
||||||
} else if(i == 1){
|
|
||||||
if (ProfileFocused == i) {
|
|
||||||
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_FOCUSED);
|
|
||||||
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_FOCUSED);
|
|
||||||
// lv_obj_set_hidden(image_option2_scr_uiflowplay, false);
|
|
||||||
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED_NEXT2);
|
|
||||||
lv_obj_set_pos(image_option2_scr_uiflowplay, 259, 0);
|
|
||||||
} else {
|
|
||||||
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_DEFAULT);
|
|
||||||
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_DEFAULT);
|
|
||||||
// lv_obj_set_hidden(image_option2_scr_uiflowplay, false);
|
|
||||||
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT1);
|
|
||||||
lv_obj_set_pos(image_option2_scr_uiflowplay, 288, 0);
|
|
||||||
}
|
|
||||||
}else if(i == 2){
|
|
||||||
if (ProfileFocused == i) {
|
if (ProfileFocused == i) {
|
||||||
lv_obj_set_state(image_button_option_3_scr_uiflowplay, LV_STATE_FOCUSED);
|
lv_obj_set_state(image_button_option_3_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
} else {
|
} else {
|
||||||
lv_obj_set_state(image_button_option_3_scr_uiflowplay, LV_STATE_DEFAULT);
|
lv_obj_set_state(image_button_option_3_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
}
|
}
|
||||||
}else if(i == 3){
|
}
|
||||||
|
else if (i == 3)
|
||||||
|
{
|
||||||
if (ProfileFocused == i) {
|
if (ProfileFocused == i) {
|
||||||
lv_obj_set_state(image_button_option_4_scr_uiflowplay, LV_STATE_FOCUSED);
|
lv_obj_set_state(image_button_option_4_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
} else {
|
} else {
|
||||||
lv_obj_set_state(image_button_option_4_scr_uiflowplay, LV_STATE_DEFAULT);
|
lv_obj_set_state(image_button_option_4_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
}
|
}
|
||||||
}else if(i == 4){
|
}
|
||||||
|
else if (i == 4)
|
||||||
|
{
|
||||||
if (ProfileFocused == i) {
|
if (ProfileFocused == i) {
|
||||||
lv_obj_set_state(image_button_option_5_scr_uiflowplay, LV_STATE_FOCUSED);
|
lv_obj_set_state(image_button_option_5_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
} else {
|
} else {
|
||||||
lv_obj_set_state(image_button_option_5_scr_uiflowplay, LV_STATE_DEFAULT);
|
lv_obj_set_state(image_button_option_5_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else if (i == 0 && OPTION_PAGE_SELECT_FUNCTION == gOptionPage)
|
||||||
return;
|
{
|
||||||
if(pMenu == NULL)
|
if (ProfileFocused == i) {//focused and >
|
||||||
{
|
lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
printf("[error]Network Selection abnormal operation\n");
|
lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ProfileFocused > PROFILE_MAX)
|
lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
{
|
lv_obj_set_pos(image_option1_scr_uiflowplay, 288, 0);
|
||||||
printf("[error]ProfileFocused exceed the limit\n");
|
}
|
||||||
ProfileFocused = 0;
|
else
|
||||||
}
|
{
|
||||||
|
lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
|
||||||
int selectedPage = ProfileFocused / ITEMS_PER_PAGE;
|
lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT1);
|
||||||
int ishidden = 0;
|
lv_obj_set_pos(image_option1_scr_uiflowplay, 288, 0);
|
||||||
|
}
|
||||||
for(int i = 0; i < ITEMS_PER_PAGE; i++)
|
lv_obj_set_hidden(image_option1_scr_uiflowplay, false);
|
||||||
{
|
|
||||||
// printf("i:%d data:%d\n", i, (IDS_NETWORK_SELECTION_1 + (ITEMS_PER_PAGE * selectedPage) + i));
|
|
||||||
lv_plugin_menu_set_item_string_id(pMenu, i, LV_PLUGIN_MENU_ITEM_VISIBLE_STATE_NUM,
|
|
||||||
(IDS_NETWORK_SELECTION_1 + (ITEMS_PER_PAGE * selectedPage) + i));
|
|
||||||
lv_plugin_menu_set_item_img_id(pMenu, i, LV_PLUGIN_MENU_ITEM_STATE_DISABLED, LV_PLUGIN_IMG_ID_ICON_OK);
|
|
||||||
|
|
||||||
ishidden = true;
|
|
||||||
if((ITEMS_PER_PAGE * selectedPage) + i < ProfileTotal)
|
|
||||||
{
|
|
||||||
lv_plugin_menu_set_item_hidden(pMenu, i, false);//整项
|
|
||||||
if((ITEMS_PER_PAGE * selectedPage) + i == ProfileFocused)
|
|
||||||
{
|
|
||||||
lv_plugin_menu_select_item(pMenu, i);//白条
|
|
||||||
}
|
|
||||||
if((ITEMS_PER_PAGE * selectedPage) + i == ProfileSelected)
|
|
||||||
{
|
|
||||||
ishidden = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lv_plugin_menu_set_item_hidden(pMenu, i, true);//整项
|
|
||||||
}
|
|
||||||
|
|
||||||
if(i==0){
|
|
||||||
lv_obj_set_hidden(image_option1_scr_uiflowplay, ishidden);//打钩
|
|
||||||
}else if(i == 1){
|
|
||||||
lv_obj_set_hidden(image_option2_scr_uiflowplay, ishidden);
|
|
||||||
}else if(i == 2){
|
|
||||||
lv_obj_set_hidden(image_option3_scr_uiflowplay, ishidden);
|
|
||||||
}else if(i == 3){
|
|
||||||
lv_obj_set_hidden(image_option4_scr_uiflowplay, ishidden);
|
|
||||||
}else if(i == 4){
|
|
||||||
lv_obj_set_hidden(image_option5_scr_uiflowplay, ishidden);
|
|
||||||
}
|
}
|
||||||
|
else if (i == 1 && OPTION_PAGE_SELECT_FUNCTION == gOptionPage)
|
||||||
|
{
|
||||||
|
if (ProfileFocused == i) {//focused and >
|
||||||
|
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
|
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
|
|
||||||
|
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
|
lv_obj_set_pos(image_option2_scr_uiflowplay, 288, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT1);
|
||||||
|
lv_obj_set_pos(image_option2_scr_uiflowplay, 288, 0);
|
||||||
|
}
|
||||||
|
lv_obj_set_hidden(image_option2_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
else if (i == 0 && OPTION_PAGE_SELECT_FUNCTION != gOptionPage)
|
||||||
|
{
|
||||||
|
if (ProfileFocused == i) {//focused and √
|
||||||
|
lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
|
lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
|
|
||||||
|
if (ProfileSelected == i)
|
||||||
|
{
|
||||||
|
lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED);
|
||||||
|
lv_obj_set_pos(image_option1_scr_uiflowplay, 272, 0);
|
||||||
|
lv_obj_set_hidden(image_option1_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_hidden(image_option1_scr_uiflowplay, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_state(image_button_option_1_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_state(label_option1_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
if (ProfileSelected == i)
|
||||||
|
{
|
||||||
|
lv_plugin_img_set_src(image_option1_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED);
|
||||||
|
lv_obj_set_pos(image_option1_scr_uiflowplay, 272, 0);
|
||||||
|
lv_obj_set_hidden(image_option1_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_hidden(image_option1_scr_uiflowplay, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (i == 1 && OPTION_PAGE_SELECT_FUNCTION != gOptionPage)
|
||||||
|
{
|
||||||
|
if (ProfileFocused == i) {//focused and √
|
||||||
|
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
|
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_FOCUSED);
|
||||||
|
|
||||||
|
if (ProfileSelected == i)
|
||||||
|
{
|
||||||
|
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED);
|
||||||
|
lv_obj_set_pos(image_option2_scr_uiflowplay, 272, 0);
|
||||||
|
lv_obj_set_hidden(image_option2_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_hidden(image_option2_scr_uiflowplay, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
if (ProfileSelected == i)
|
||||||
|
{
|
||||||
|
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_LIST_SELECTED);
|
||||||
|
lv_obj_set_pos(image_option2_scr_uiflowplay, 272, 0);
|
||||||
|
lv_obj_set_hidden(image_option2_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_hidden(image_option2_scr_uiflowplay, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void show_select_function(lv_obj_t* obj)
|
void show_select_function(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
|
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
|
||||||
|
@ -195,17 +238,17 @@ void show_Selection_page(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
// pMenu = menu_obj;
|
// pMenu = menu_obj;
|
||||||
gSeletionShow = SELECTION_SHOW_TURE;
|
gSeletionShow = SELECTION_SHOW_TURE;
|
||||||
ProfileFocused = 0;
|
|
||||||
ProfileTotal = 2;
|
ProfileTotal = 2;
|
||||||
ProfileSelected = 0;
|
|
||||||
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,false);
|
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,false);
|
||||||
show_select_function(obj);
|
show_select_function(obj);
|
||||||
update_play_Selection_msg(obj);
|
update_play_Selection_msg(obj);
|
||||||
}
|
}
|
||||||
void hide_Selection_page(void)
|
void hidde_Selection_page(void)
|
||||||
{
|
{
|
||||||
gSeletionShow = SELECTION_SHOW_FALSE;
|
gSeletionShow = SELECTION_SHOW_FALSE;
|
||||||
gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
|
gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
|
||||||
|
hidde_bar();
|
||||||
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,true);
|
lv_obj_set_hidden(container_main_menu_scr_uiflowplay,true);
|
||||||
}
|
}
|
||||||
void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
@ -214,62 +257,86 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
case LV_USER_KEY_NEXT:
|
case LV_USER_KEY_NEXT:
|
||||||
if(ProfileFocused >= 0 && ProfileFocused < (ProfileTotal - 1))
|
{
|
||||||
{
|
ProfileFocused++;
|
||||||
ProfileFocused++;
|
if (ProfileFocused >= ProfileTotal)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ProfileFocused = 0;
|
|
||||||
}
|
|
||||||
update_play_Selection_msg(obj);
|
|
||||||
break;
|
|
||||||
case LV_USER_KEY_PREV:
|
|
||||||
if(ProfileFocused > 0 && ProfileFocused < ProfileTotal)
|
|
||||||
{
|
|
||||||
ProfileFocused--;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ProfileFocused = ProfileTotal - 1;
|
|
||||||
}
|
|
||||||
update_play_Selection_msg(obj);
|
|
||||||
break;
|
|
||||||
case LV_USER_KEY_LEFT:
|
|
||||||
// if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
|
|
||||||
// hide_Selection_page();
|
|
||||||
// } else {
|
|
||||||
// gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
|
|
||||||
// show_Selection_page(obj);
|
|
||||||
// }
|
|
||||||
break;
|
|
||||||
case LV_USER_KEY_RIGHT:
|
|
||||||
case LV_KEY_ENTER:
|
|
||||||
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
|
|
||||||
if (1 == ProfileFocused)
|
|
||||||
{
|
{
|
||||||
hide_Selection_page();
|
ProfileFocused = 0;
|
||||||
UINT32 uiFileSeq;
|
}
|
||||||
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
update_play_Selection_msg(obj);
|
||||||
if (0 != uiFileSeq)
|
break;
|
||||||
{
|
}
|
||||||
stop_play();
|
case LV_USER_KEY_PREV:
|
||||||
UIFlowMenuCommonConfirmAPI_Open(IDM_DELETE_THIS);
|
{
|
||||||
break;
|
ProfileFocused--;
|
||||||
}
|
if (ProfileFocused < 0)
|
||||||
} else {
|
{
|
||||||
gOptionPage = OPTION_PAGE_FORMAT;
|
ProfileFocused = ProfileTotal - 1;
|
||||||
|
}
|
||||||
|
update_play_Selection_msg(obj);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_USER_KEY_LEFT:
|
||||||
|
{
|
||||||
|
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage)
|
||||||
|
{
|
||||||
|
hidde_Selection_page();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gOptionPage = OPTION_PAGE_SELECT_FUNCTION;
|
||||||
show_Selection_page(obj);
|
show_Selection_page(obj);
|
||||||
}
|
}
|
||||||
} else {
|
break;
|
||||||
|
}
|
||||||
|
case LV_USER_KEY_RIGHT:
|
||||||
|
case LV_KEY_ENTER:
|
||||||
|
if (OPTION_PAGE_SELECT_FUNCTION == gOptionPage) {
|
||||||
|
if (1 == ProfileFocused)//DELETE
|
||||||
|
{
|
||||||
|
hidde_Selection_page();
|
||||||
|
UINT32 uiFileSeq;
|
||||||
|
PB_GetParam(PBPRMID_CURR_FILESEQ, &uiFileSeq);
|
||||||
|
if (0 != uiFileSeq)
|
||||||
|
{
|
||||||
|
stop_play();
|
||||||
|
UIFlowMenuCommonConfirmAPI_Open(IDM_DELETE_THIS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //GO TO STORAGE OPTIONS
|
||||||
|
{
|
||||||
|
mmc_dev = SF_GetMMCDev();
|
||||||
|
if (mmc_dev->dev_type == 0)//sd 0, emmc 1
|
||||||
|
{
|
||||||
|
ProfileFocused = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProfileFocused = 0;
|
||||||
|
}
|
||||||
|
printf(" ================================== storage option init%d\n", ProfileSelected);
|
||||||
|
ProfileFocused = ProfileSelected;
|
||||||
|
gOptionPage = OPTION_PAGE_FORMAT;
|
||||||
|
show_Selection_page(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
if (1 == ProfileFocused)
|
if (1 == ProfileFocused)
|
||||||
{
|
{
|
||||||
printf(" ================================== switch sd card.\n");
|
printf(" ================================== switch sd card.\n");
|
||||||
} else {
|
ProfileSelected = 1;
|
||||||
printf(" ================================== switch emmc.\n");
|
FileDB_Refresh(0);
|
||||||
}
|
}
|
||||||
hide_Selection_page();
|
else
|
||||||
|
{
|
||||||
|
printf(" ================================== switch emmc.\n");
|
||||||
|
ProfileSelected = 0;
|
||||||
|
FileDB_Refresh(1);
|
||||||
|
}
|
||||||
|
ProfileFocused = 0;
|
||||||
|
hidde_Selection_page();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1369,7 +1436,7 @@ static void UIFlowPlay_ChildScrClose(lv_obj_t* obj, const void * data)
|
||||||
static void UIFlowPlay_ScrClose(lv_obj_t* obj)
|
static void UIFlowPlay_ScrClose(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
DBG_DUMP("%s\r\n", __func__);
|
DBG_DUMP("%s\r\n", __func__);
|
||||||
hide_Selection_page();
|
hidde_Selection_page();
|
||||||
/* do nothing if current system mode is not matched */
|
/* do nothing if current system mode is not matched */
|
||||||
if (System_GetState(SYS_STATE_CURRMODE) != PRIMARY_MODE_PLAYBACK){
|
if (System_GetState(SYS_STATE_CURRMODE) != PRIMARY_MODE_PLAYBACK){
|
||||||
DBG_WRN("system current mode is not playback\r\n");
|
DBG_WRN("system current mode is not playback\r\n");
|
||||||
|
@ -2269,12 +2336,12 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case LV_USER_KEY_DOWN:
|
||||||
case LV_USER_KEY_UP:
|
case LV_USER_KEY_NEXT:
|
||||||
case LV_USER_KEY_PREV:
|
|
||||||
{
|
{
|
||||||
if (SELECTION_SHOW_FALSE == gSeletionShow) {
|
if (SELECTION_SHOW_FALSE == gSeletionShow) {
|
||||||
show_Selection_page(obj);
|
show_Selection_page(obj);
|
||||||
|
init_bar();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2283,8 +2350,8 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
break;
|
break;
|
||||||
UIFlowPlay_OnKeyPrev(obj);
|
UIFlowPlay_OnKeyPrev(obj);
|
||||||
}
|
}
|
||||||
case LV_USER_KEY_DOWN:
|
case LV_USER_KEY_UP:
|
||||||
case LV_USER_KEY_NEXT:
|
case LV_USER_KEY_PREV:
|
||||||
{
|
{
|
||||||
UIFlowPlay_Exit(obj);
|
UIFlowPlay_Exit(obj);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -42,15 +42,11 @@ static void task_msgbox_timer_cb(lv_task_t* task)
|
||||||
UINT16 autoOffTime = sf_get_auto_off_time();
|
UINT16 autoOffTime = sf_get_auto_off_time();
|
||||||
const lv_plugin_string_t* string = lv_plugin_get_string(msgID);
|
const lv_plugin_string_t* string = lv_plugin_get_string(msgID);
|
||||||
|
|
||||||
if (6000 == autoClose)
|
|
||||||
{
|
|
||||||
sf_set_pir_statu_flag(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 == autoClose || autoOffTime <= 10)
|
if (0 == autoClose || autoOffTime <= 10)
|
||||||
{
|
{
|
||||||
|
|
||||||
//sf_set_pir_statu_flag(0);
|
|
||||||
lv_task_del(msgbox_timer);
|
lv_task_del(msgbox_timer);
|
||||||
msgbox_timer = NULL;
|
msgbox_timer = NULL;
|
||||||
if (msgbox)
|
if (msgbox)
|
||||||
|
@ -60,6 +56,7 @@ static void task_msgbox_timer_cb(lv_task_t* task)
|
||||||
}
|
}
|
||||||
if (0 == autoClose)
|
if (0 == autoClose)
|
||||||
{
|
{
|
||||||
|
sf_set_pir_statu_flag(1);
|
||||||
// OpenClosingScreen(DISPLAY_FINAL_DO_NOT_SHOW_POWER_OFF);
|
// OpenClosingScreen(DISPLAY_FINAL_DO_NOT_SHOW_POWER_OFF);
|
||||||
#define DO_NOT_SHOW_POWER_OFF 0
|
#define DO_NOT_SHOW_POWER_OFF 0
|
||||||
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF);
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF);
|
||||||
|
|
|
@ -198,14 +198,21 @@
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
||||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||||
#define DEFAULT_AUTO_OFF_SWITCH SF_ON
|
|
||||||
#define DEFAULT_PIR_SWITCH SF_ON
|
#define DEFAULT_PIR_SWITCH SF_ON
|
||||||
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
||||||
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
||||||
#if SF_BATTERY_TEST == ENABLE
|
#if SF_BATTERY_TEST == ENABLE
|
||||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
#else
|
#else
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_REAL_TIME
|
||||||
|
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
||||||
|
#else
|
||||||
#define DEFAULT_GPRS_SWITCH SF_ON
|
#define DEFAULT_GPRS_SWITCH SF_ON
|
||||||
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
||||||
|
#define DEFAULT_AUTO_OFF_SWITCH SF_ON
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -217,7 +224,6 @@
|
||||||
|
|
||||||
#define DEFAULT_SEND_TYPE SF_SEND_TIMELY
|
#define DEFAULT_SEND_TYPE SF_SEND_TIMELY
|
||||||
#define DEFAULT_PIR_DELAY_SWITCH SF_OFF
|
#define DEFAULT_PIR_DELAY_SWITCH SF_OFF
|
||||||
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
|
||||||
#define DEFAULT_DAILY_REPORT_SWITCH SF_ON
|
#define DEFAULT_DAILY_REPORT_SWITCH SF_ON
|
||||||
#define DEFAULT_GPS_SWITCH SF_ON
|
#define DEFAULT_GPS_SWITCH SF_ON
|
||||||
//#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
//#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||||
|
|
|
@ -2230,7 +2230,7 @@ SINT32 sf_power_off_check_sms(void)
|
||||||
SLOGD(" s %d %d\n",sf_get_sim_insert(), sf_app_while_flag());
|
SLOGD(" s %d %d\n",sf_get_sim_insert(), sf_app_while_flag());
|
||||||
|
|
||||||
/*instant, hybrid mode*/
|
/*instant, hybrid mode*/
|
||||||
if((!sf_get_signal_ready_flag()) && (sf_get_sim_insert()) && (sf_app_while_flag()))
|
if((!sf_get_signal_ready_flag()) && (sf_get_sim_insert()) && (sf_app_while_flag()) && (puiPara->GprsSwitch))
|
||||||
{
|
{
|
||||||
if(puiPara->GprsMode)
|
if(puiPara->GprsMode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -646,7 +646,10 @@ unsigned char sf_mcu_reg_set(MCUParam_t attrId, unsigned char val)
|
||||||
{
|
{
|
||||||
//sf_pdp_flg_set(0);
|
//sf_pdp_flg_set(0);
|
||||||
}
|
}
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
temp |= 0x40; /*bit6=1,instant mode*/
|
||||||
|
temp |= 0x80;
|
||||||
|
#endif
|
||||||
mcuData[i++] = temp;
|
mcuData[i++] = temp;
|
||||||
|
|
||||||
mcuReg[i] = DIGITAL_PIR_SENSITIVITY;
|
mcuReg[i] = DIGITAL_PIR_SENSITIVITY;
|
||||||
|
|
|
@ -289,7 +289,7 @@ void sf_mode_detect(void)
|
||||||
}
|
}
|
||||||
else if(pwroffcnt == 6)
|
else if(pwroffcnt == 6)
|
||||||
{
|
{
|
||||||
sf_sys_status_led_set(SF_LED_SYS_STATE_EXIT_GO_TO_PIR);
|
sf_sys_status_led_set(SF_LED_SYS_STATE_POWER_OFF);
|
||||||
/*
|
/*
|
||||||
printf("[power off] %s(%d) AutoOfftime:%d\n", __FUNCTION__, __LINE__, AutoOfftime);
|
printf("[power off] %s(%d) AutoOfftime:%d\n", __FUNCTION__, __LINE__, AutoOfftime);
|
||||||
#define DO_NOT_SHOW_POWER_OFF 0
|
#define DO_NOT_SHOW_POWER_OFF 0
|
||||||
|
|
|
@ -986,6 +986,8 @@
|
||||||
#define ANR_FUNC ENABLE
|
#define ANR_FUNC ENABLE
|
||||||
#endif
|
#endif
|
||||||
#define SF_NO_SD_SEND ENABLE
|
#define SF_NO_SD_SEND ENABLE
|
||||||
|
#define SF_4G_MODE_TEST DISABLE
|
||||||
|
|
||||||
////////////////////sf end////////////////////////////////
|
////////////////////sf end////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -198,14 +198,22 @@
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
#define DEFAULT_BOOT_WORK_MODE SF_CAM_MODE_PHOTO//
|
||||||
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
#define DEFAULT_NET_WORK_NEED_SEARCH SF_ON
|
||||||
#define DEFAULT_AUTO_OFF_SWITCH SF_ON
|
|
||||||
#define DEFAULT_PIR_SWITCH SF_ON
|
#define DEFAULT_PIR_SWITCH SF_ON
|
||||||
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
#define DEFAULT_PIR_SENSITIVITY SF_PIR_SENSITIVITY_7
|
||||||
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
#define DEFAULT_TIMELAPSE_SWITCH SF_OFF
|
||||||
#if SF_BATTERY_TEST == ENABLE
|
#if SF_BATTERY_TEST == ENABLE
|
||||||
#define DEFAULT_GPRS_SWITCH SF_OFF
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
#else
|
#else
|
||||||
|
#if SF_4G_MODE_TEST == ENABLE
|
||||||
|
#define DEFAULT_GPRS_SWITCH SF_OFF
|
||||||
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_REAL_TIME
|
||||||
|
#define DEFAULT_AUTO_OFF_SWITCH SF_OFF
|
||||||
|
#else
|
||||||
#define DEFAULT_GPRS_SWITCH SF_ON
|
#define DEFAULT_GPRS_SWITCH SF_ON
|
||||||
|
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
||||||
|
#define DEFAULT_AUTO_OFF_SWITCH SF_ON
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -217,7 +225,6 @@
|
||||||
|
|
||||||
#define DEFAULT_SEND_TYPE SF_SEND_TIMELY
|
#define DEFAULT_SEND_TYPE SF_SEND_TIMELY
|
||||||
#define DEFAULT_PIR_DELAY_SWITCH SF_OFF
|
#define DEFAULT_PIR_DELAY_SWITCH SF_OFF
|
||||||
#define DEFAULT_GPRS_MODE SF_REMOTE_CONTROL_OFF
|
|
||||||
#define DEFAULT_DAILY_REPORT_SWITCH SF_ON
|
#define DEFAULT_DAILY_REPORT_SWITCH SF_ON
|
||||||
#define DEFAULT_GPS_SWITCH SF_ON
|
#define DEFAULT_GPS_SWITCH SF_ON
|
||||||
//#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
//#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user