Merge branch 'Branch_S550_Fast_Emmc' into Branch_S550_Fast_Emmc_Optimize
This commit is contained in:
commit
d79f978f1b
|
@ -72,10 +72,16 @@ insmod /etc/lib/modules/$KERVER/extra/fs/exfat/exfat.ko
|
||||||
|
|
||||||
#mdev -s
|
#mdev -s
|
||||||
|
|
||||||
# Scan for without insert card
|
if [ -d "/sys/class/block/mmcblk0p1" ]; then
|
||||||
if [ ! -f /tmp/.nvt_mounts ]; then
|
mknod /dev/mmcblk0p1 b `cat /sys/class/block/mmcblk0p1/dev | sed "s/:/\ /g"`
|
||||||
/etc/mdev-script/autosd.sh
|
fi
|
||||||
rm -rf /tmp/.nvt_mounts;
|
|
||||||
|
if [ -d "/sys/class/block/mmcblk1p1" ]; then
|
||||||
|
mknod /dev/mmcblk1p1 b `cat /sys/class/block/mmcblk1p1/dev | sed "s/:/\ /g"`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "fs" > /proc/nvt_info/bootts
|
# Scan for without insert card
|
||||||
|
if [ ! -f /tmp/.nvt_mounts ]; then
|
||||||
|
/etc/mdev-script/autosd.sh
|
||||||
|
rm -rf /tmp/.nvt_mounts;
|
||||||
|
fi
|
||||||
|
|
|
@ -201,8 +201,6 @@ ${PREFIX}/lib/modules/$KERVER/hdal/kdrv_videoout/fbdev/nvt_fb.ko
|
||||||
#insmod ${PREFIX}/lib/modules/$KERVER/hdal/comm/usb2dev/nvt_usb2dev.ko
|
#insmod ${PREFIX}/lib/modules/$KERVER/hdal/comm/usb2dev/nvt_usb2dev.ko
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
mount /dev/mmcblk1p1 /mnt/sd2
|
|
||||||
|
|
||||||
if [ -f /usr/bin/isp_demon ]; then
|
if [ -f /usr/bin/isp_demon ]; then
|
||||||
/usr/bin/isp_demon
|
/usr/bin/isp_demon
|
||||||
else
|
else
|
||||||
|
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -924,7 +924,7 @@
|
||||||
#define HUNTING_MCU_UART ENABLE
|
#define HUNTING_MCU_UART ENABLE
|
||||||
#define HUNTING_IR_LED_940 ENABLE
|
#define HUNTING_IR_LED_940 ENABLE
|
||||||
#define SF_EXIF_MN_BUF_SIZE 256
|
#define SF_EXIF_MN_BUF_SIZE 256
|
||||||
#define SF_BASE_VERSION "7MR5RCwDC05"
|
#define SF_BASE_VERSION "7MR5RCwDC07"
|
||||||
#define HW_S530 DISABLE
|
#define HW_S530 DISABLE
|
||||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||||
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
||||||
|
@ -981,6 +981,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///////////////////////////////
|
||||||
|
|
||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include <sf_param_common.h>
|
#include <sf_param_common.h>
|
||||||
#include <sf_param_struct.h>
|
#include <sf_param_struct.h>
|
||||||
#include <FileSysTsk.h>
|
#include <FileSysTsk.h>
|
||||||
|
#include "sf_mcu.h"
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int event;
|
int event;
|
||||||
|
@ -81,6 +81,11 @@ void SF_StrgUnInit(void)
|
||||||
pMMCDev = NULL;
|
pMMCDev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SF_GetMMCDevHandle(MMC_DEV_TYPE dev_type)
|
||||||
|
{
|
||||||
|
return sf_mmc_dev[dev_type]->dcf_handle;
|
||||||
|
}
|
||||||
|
|
||||||
void SF_StrgSetDcfHandle(UINT32 strg_id, UINT32 handle)
|
void SF_StrgSetDcfHandle(UINT32 strg_id, UINT32 handle)
|
||||||
{
|
{
|
||||||
sf_mmc_dev[strg_id]->dcf_handle = handle;
|
sf_mmc_dev[strg_id]->dcf_handle = handle;
|
||||||
|
@ -90,7 +95,12 @@ static UINT32 SF_StrgSpaceCheckFull(MMC_DEV_TYPE mmc_dev)
|
||||||
{
|
{
|
||||||
UINT64 diskFree = 0;
|
UINT64 diskFree = 0;
|
||||||
UINT32 ret = 0;
|
UINT32 ret = 0;
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
if(sf_get_power_off_flag() || sf_is_usb_flag())
|
||||||
|
{
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/*check disk free size*/
|
/*check disk free size*/
|
||||||
if(mmc_dev == MMC_DEV_SD)
|
if(mmc_dev == MMC_DEV_SD)
|
||||||
{
|
{
|
||||||
|
@ -341,7 +351,7 @@ static void* mmc_monitoring_thread(void *arg)
|
||||||
|
|
||||||
int sf_mmc_dev_check_start(void)
|
int sf_mmc_dev_check_start(void)
|
||||||
{
|
{
|
||||||
SF_StrgInit();// 初始化sf_mmc设备Obj
|
SF_StrgInit();// 初始化sf_mmc设备Obj
|
||||||
|
|
||||||
int ret = pthread_create(&MMCMonitorTskCfg.TskId, NULL, mmc_monitoring_thread, NULL);
|
int ret = pthread_create(&MMCMonitorTskCfg.TskId, NULL, mmc_monitoring_thread, NULL);
|
||||||
if(ret != SF_SUCCESS)
|
if(ret != SF_SUCCESS)
|
||||||
|
|
|
@ -87,7 +87,7 @@ SF_ST_MMC_DEV *SF_StrgCheckWorkableDev(void);
|
||||||
void SF_SetMMCDev(SF_ST_MMC_DEV *pDev);
|
void SF_SetMMCDev(SF_ST_MMC_DEV *pDev);
|
||||||
SF_ST_MMC_DEV *SF_GetMMCDev(void);
|
SF_ST_MMC_DEV *SF_GetMMCDev(void);
|
||||||
int sf_mmc_dev_check_start(void);
|
int sf_mmc_dev_check_start(void);
|
||||||
|
int SF_GetMMCDevHandle(MMC_DEV_TYPE dev_type);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ void Strg_CB(UINT32 event, UINT32 param1, UINT32 param2)
|
||||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBG_IND("Strg_CB: strg_id = %d, status = %d\n", param1, param2);
|
printf("Strg_CB: strg_id = %d, status = %d\n", param1, param2);
|
||||||
switch (event) {
|
switch (event) {
|
||||||
// part-1
|
// part-1
|
||||||
case SYSTEM_CB_CONFIG:
|
case SYSTEM_CB_CONFIG:
|
||||||
|
|
|
@ -1218,20 +1218,12 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
|
||||||
if((FS_DISK_ERROR == System_GetState(SYS_STATE_FS))){
|
if((FS_DISK_ERROR == System_GetState(SYS_STATE_FS))){
|
||||||
stMessageBuf.arg1 = CMD_SD_STRG_CB_UNMOUNT_FINISH;
|
stMessageBuf.arg1 = CMD_SD_STRG_CB_UNMOUNT_FINISH;
|
||||||
stMessageBuf.arg2 = strg_id;
|
stMessageBuf.arg2 = strg_id;
|
||||||
stMessageBuf.cmdId = CMD_SD;
|
stMessageBuf.cmdId = CMD_SD;
|
||||||
sf_com_message_send_to_app(&stMessageBuf);
|
sf_com_message_send_to_app(&stMessageBuf);
|
||||||
#if USE_MMC_DEV_CHECK
|
#if USE_MMC_DEV_CHECK
|
||||||
|
|
||||||
if(strg_id == 1)
|
|
||||||
{
|
|
||||||
printf("emmc mounted failed, remount\n");
|
|
||||||
system("mount /dev/mmcblk1p1 /mnt/sd2");
|
|
||||||
stMessageBuf.arg1 = CMD_SD_STRG_CB_MOUNT_FINISH;
|
|
||||||
}
|
|
||||||
SF_StrgRegister(&stMessageBuf);
|
SF_StrgRegister(&stMessageBuf);
|
||||||
#endif
|
#endif
|
||||||
printf("System_OnStrgAttach send UNMOUNT! dev_id = %d\n", strg_id);
|
printf("System_OnStrgAttach send UNMOUNT! dev_id = %d\n", strg_id);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -766,12 +766,40 @@ UINT32 PhotoExe_GetFreePicNum(void)
|
||||||
UINT32 PhotoExe_GetTotalPicNum(void)
|
UINT32 PhotoExe_GetTotalPicNum(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
UINT64 uiSpace;
|
UINT64 uiSpace = 0;
|
||||||
UINT32 totalImgNum;
|
UINT32 totalImgNum;
|
||||||
UINT32 reserveSize = 0x80000; // 500KB
|
UINT32 reserveSize = 0x80000; // 500KB
|
||||||
UINT32 CaptureSize;
|
UINT32 CaptureSize;
|
||||||
UINT32 size;
|
UINT32 size;
|
||||||
|
#if USE_MMC_DEV_CHECK
|
||||||
|
|
||||||
|
SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev();
|
||||||
|
if(mmc_dev == NULL)
|
||||||
|
{
|
||||||
|
DBG_ERR("No MMC_Dev Can use!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if(mmc_dev->dcf_handle < 0)
|
||||||
|
{
|
||||||
|
DBG_ERR("dcf_handle err!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_MMC_DEV_CHECK
|
||||||
|
|
||||||
|
if(mmc_dev->dev_type == MMC_DEV_SD)
|
||||||
|
{
|
||||||
|
uiSpace = FileSys_GetDiskInfoEx('A', FST_INFO_DISK_SIZE);
|
||||||
|
}
|
||||||
|
else if(mmc_dev->dev_type == MMC_DEV_EMMC)
|
||||||
|
{
|
||||||
|
uiSpace = FileSys_GetDiskInfoEx('B', FST_INFO_DISK_SIZE);
|
||||||
|
}
|
||||||
|
#else
|
||||||
uiSpace = FileSys_GetDiskInfo(FST_INFO_DISK_SIZE);
|
uiSpace = FileSys_GetDiskInfo(FST_INFO_DISK_SIZE);
|
||||||
|
#endif
|
||||||
|
|
||||||
//DBG_IND("[cap]Free Space = %d KB\r\n", uiSpace / 1024);
|
//DBG_IND("[cap]Free Space = %d KB\r\n", uiSpace / 1024);
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "UIApp/Network/UIAppWiFiCmd.h"
|
#include "UIApp/Network/UIAppWiFiCmd.h"
|
||||||
#include "GxStrg.h"
|
#include "GxStrg.h"
|
||||||
#include "GxVideoFile.h"
|
#include "GxVideoFile.h"
|
||||||
|
#include "DCF.h"
|
||||||
|
|
||||||
#define PB_FILE_FMT PBFMT_JPG | PBFMT_WAV | PBFMT_AVI | PBFMT_MOVMJPG | PBFMT_MP4 | PBFMT_TS
|
#define PB_FILE_FMT PBFMT_JPG | PBFMT_WAV | PBFMT_AVI | PBFMT_MOVMJPG | PBFMT_MP4 | PBFMT_TS
|
||||||
#define RTSP_PLAY_FUNC DISABLE
|
#define RTSP_PLAY_FUNC DISABLE
|
||||||
|
@ -275,7 +276,13 @@ 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 {
|
||||||
PB_SetParam(PBPRMID_FILELIST_OBJ, (UINT32)PBXFList_DCF_getObject());
|
extern DCF_HANDLE System_Get_DCF_Handle(void);
|
||||||
|
|
||||||
|
PPBX_FLIST_OBJ pFlist = PBXFList_DCF_getObject();
|
||||||
|
DCF_HANDLE handle = System_Get_DCF_Handle();
|
||||||
|
|
||||||
|
pFlist->Config(PBX_FLIST_CONFIG_DCF_HANDLE, (UINT32)handle, 0);
|
||||||
|
PB_SetParam(PBPRMID_FILELIST_OBJ, (UINT32)pFlist);
|
||||||
}
|
}
|
||||||
PB_SetParam(PBPRMID_DEC_VIDEO_CALLBACK, (UINT32)PBDecVideoCB);
|
PB_SetParam(PBPRMID_DEC_VIDEO_CALLBACK, (UINT32)PBDecVideoCB);
|
||||||
PB_SetParam(PBPRMID_ONDRAW_CALLBACK, (UINT32)PBView_OnDrawCB);
|
PB_SetParam(PBPRMID_ONDRAW_CALLBACK, (UINT32)PBView_OnDrawCB);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
||||||
#include <kwrap/debug.h>
|
#include <kwrap/debug.h>
|
||||||
|
|
||||||
|
extern DCF_HANDLE System_Get_DCF_Handle(void);
|
||||||
|
|
||||||
void CloseAutoHideTimer(void)
|
void CloseAutoHideTimer(void)
|
||||||
{
|
{
|
||||||
|
@ -61,11 +62,13 @@ void ChkKeySoundComm(void)
|
||||||
|
|
||||||
|
|
||||||
static BOOL gbNoFile = TRUE;
|
static BOOL gbNoFile = TRUE;
|
||||||
|
|
||||||
static void xUIPlay_Filesys_DelCB(FIND_DATA *pFindData, BOOL *bDelete, UINT32 Param1, UINT32 Param2)
|
static void xUIPlay_Filesys_DelCB(FIND_DATA *pFindData, BOOL *bDelete, UINT32 Param1, UINT32 Param2)
|
||||||
{
|
{
|
||||||
INT32 fileNum;
|
INT32 fileNum;
|
||||||
UINT32 fileType;
|
UINT32 fileType;
|
||||||
UINT32 filterType = (DCF_GetDBInfo(DCF_INFO_VALID_FILE_FMT) | DCF_GetDBInfo(DCF_INFO_DEP_FILE_FMT));
|
DCF_HANDLE dcf_handle = System_Get_DCF_Handle();
|
||||||
|
UINT32 filterType = (DCF_GetDBInfoEx(dcf_handle, DCF_INFO_VALID_FILE_FMT) | DCF_GetDBInfoEx(dcf_handle, DCF_INFO_DEP_FILE_FMT));
|
||||||
UINT8 attrib;
|
UINT8 attrib;
|
||||||
|
|
||||||
attrib = pFindData->attrib;
|
attrib = pFindData->attrib;
|
||||||
|
@ -85,7 +88,8 @@ static void xUIPlay_Filesys_LockCB(FIND_DATA *pFindData, BOOL *bApply, UINT32 Pa
|
||||||
{
|
{
|
||||||
INT32 fileNum;
|
INT32 fileNum;
|
||||||
UINT32 fileType;
|
UINT32 fileType;
|
||||||
UINT32 filterType = (DCF_GetDBInfo(DCF_INFO_VALID_FILE_FMT) | DCF_GetDBInfo(DCF_INFO_DEP_FILE_FMT));
|
DCF_HANDLE dcf_handle = System_Get_DCF_Handle();
|
||||||
|
UINT32 filterType = (DCF_GetDBInfoEx(dcf_handle, DCF_INFO_VALID_FILE_FMT) | DCF_GetDBInfoEx(dcf_handle, DCF_INFO_DEP_FILE_FMT));
|
||||||
|
|
||||||
DBG_IND("FileName = %s\r\n", pFindData->FATMainName);
|
DBG_IND("FileName = %s\r\n", pFindData->FATMainName);
|
||||||
|
|
||||||
|
@ -102,14 +106,15 @@ static void xUIPlay_FList_DCF_DelAll(void)
|
||||||
char path[DCF_FULL_FILE_PATH_LEN];
|
char path[DCF_FULL_FILE_PATH_LEN];
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
UINT32 i, uiMaxDirNum;
|
UINT32 i, uiMaxDirNum;
|
||||||
|
DCF_HANDLE dcf_handle = System_Get_DCF_Handle();
|
||||||
|
|
||||||
uiMaxDirNum = DCF_GetDBInfo(DCF_INFO_MAX_DIR_ID);
|
uiMaxDirNum = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_MAX_DIR_ID);
|
||||||
for (i = 100; i <= uiMaxDirNum; i++) {
|
for (i = 100; i <= uiMaxDirNum; i++) {
|
||||||
// check if folder has file
|
// check if folder has file
|
||||||
ret = DCF_GetDirInfo(i, &dirinfo);
|
ret = DCF_GetDirInfoEx(dcf_handle, i, &dirinfo);
|
||||||
if (ret /*&& dirinfo.uiNumOfDcfObj*/) {
|
if (ret /*&& dirinfo.uiNumOfDcfObj*/) {
|
||||||
// delete all in one folder
|
// delete all in one folder
|
||||||
DCF_GetDirPath(i, path);
|
DCF_GetDirPathEx(dcf_handle, i, path);
|
||||||
gbNoFile = TRUE;
|
gbNoFile = TRUE;
|
||||||
FileSys_DelDirFiles(path, xUIPlay_Filesys_DelCB);
|
FileSys_DelDirFiles(path, xUIPlay_Filesys_DelCB);
|
||||||
// delete empty folder
|
// delete empty folder
|
||||||
|
@ -120,7 +125,7 @@ static void xUIPlay_FList_DCF_DelAll(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DCF_Refresh();
|
DCF_RefreshEx(dcf_handle);
|
||||||
}
|
}
|
||||||
static ER xUIPlay_FList_FDB_ProtectFile(UINT32 cmdID)
|
static ER xUIPlay_FList_FDB_ProtectFile(UINT32 cmdID)
|
||||||
{
|
{
|
||||||
|
@ -191,13 +196,14 @@ static void xUIPlay_FList_DCF_LockAll(BOOL bLock)
|
||||||
SDCFDIRINFO dirinfo = {0};
|
SDCFDIRINFO dirinfo = {0};
|
||||||
char path[DCF_FULL_FILE_PATH_LEN] = {0};
|
char path[DCF_FULL_FILE_PATH_LEN] = {0};
|
||||||
UINT32 i, uiMaxDirNum;
|
UINT32 i, uiMaxDirNum;
|
||||||
|
DCF_HANDLE dcf_handle = System_Get_DCF_Handle();
|
||||||
|
|
||||||
uiMaxDirNum = DCF_GetDBInfo(DCF_INFO_MAX_DIR_ID);
|
uiMaxDirNum = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_MAX_DIR_ID);
|
||||||
for (i = 100; i <= uiMaxDirNum; i++) {
|
for (i = 100; i <= uiMaxDirNum; i++) {
|
||||||
// check if folder has file
|
// check if folder has file
|
||||||
if (DCF_GetDirInfo(i, &dirinfo)) {
|
if (DCF_GetDirInfoEx(dcf_handle, i, &dirinfo)) {
|
||||||
if (dirinfo.uiNumOfDcfObj) {
|
if (dirinfo.uiNumOfDcfObj) {
|
||||||
DCF_GetDirPath(i, path);
|
DCF_GetDirPathEx(dcf_handle, i, path);
|
||||||
FileSys_LockDirFiles(path, bLock, xUIPlay_Filesys_LockCB);
|
FileSys_LockDirFiles(path, bLock, xUIPlay_Filesys_LockCB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,6 +215,7 @@ static ER xUIPlay_FList_DCF_ProtectFile(UINT32 cmdID)
|
||||||
char filePath[DCF_FULL_FILE_PATH_LEN];
|
char filePath[DCF_FULL_FILE_PATH_LEN];
|
||||||
UINT32 index, i, uiThisFileFormat, tmpFileType;
|
UINT32 index, i, uiThisFileFormat, tmpFileType;
|
||||||
BOOL bLock;
|
BOOL bLock;
|
||||||
|
DCF_HANDLE dcf_handle = System_Get_DCF_Handle();
|
||||||
|
|
||||||
DBG_IND("cmdID=%d\r\n", cmdID);
|
DBG_IND("cmdID=%d\r\n", cmdID);
|
||||||
if ((cmdID == PLAY_PROTECT_ONE) || (cmdID == PLAY_UNPROTECT_ONE)) {
|
if ((cmdID == PLAY_PROTECT_ONE) || (cmdID == PLAY_UNPROTECT_ONE)) {
|
||||||
|
@ -217,13 +224,13 @@ static ER xUIPlay_FList_DCF_ProtectFile(UINT32 cmdID)
|
||||||
} else {
|
} else {
|
||||||
bLock = FALSE; // unlock
|
bLock = FALSE; // unlock
|
||||||
}
|
}
|
||||||
index = DCF_GetCurIndex();
|
index = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_CUR_INDEX);
|
||||||
uiThisFileFormat = DCF_GetDBInfo(DCF_INFO_CUR_FILE_TYPE);
|
uiThisFileFormat = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_CUR_FILE_TYPE);
|
||||||
for (i = 0; i <= DCF_FILE_TYPE_NUM; i++) {
|
for (i = 0; i <= DCF_FILE_TYPE_NUM; i++) {
|
||||||
tmpFileType = 1;
|
tmpFileType = 1;
|
||||||
tmpFileType <<= i;
|
tmpFileType <<= i;
|
||||||
if (uiThisFileFormat & tmpFileType) {
|
if (uiThisFileFormat & tmpFileType) {
|
||||||
DCF_GetObjPath(index, tmpFileType, filePath);
|
DCF_GetObjPathEx(dcf_handle, index, tmpFileType, filePath);
|
||||||
FileSys_SetAttrib(filePath, FST_ATTRIB_READONLY, bLock);
|
FileSys_SetAttrib(filePath, FST_ATTRIB_READONLY, bLock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,6 +368,9 @@ static ER xUIPlay_FList_FDB_DelFile(UINT32 cmdID)
|
||||||
static ER xUIPlay_FList_DCF_DelFile(UINT32 cmdID)
|
static ER xUIPlay_FList_DCF_DelFile(UINT32 cmdID)
|
||||||
{
|
{
|
||||||
DBG_IND("cmdID=%d\r\n", cmdID);
|
DBG_IND("cmdID=%d\r\n", cmdID);
|
||||||
|
|
||||||
|
DCF_HANDLE dcf_handle = System_Get_DCF_Handle();
|
||||||
|
|
||||||
if (cmdID == PB_DELETE_ONE) {
|
if (cmdID == PB_DELETE_ONE) {
|
||||||
//#NT#2016/05/24#Ben Wang -begin
|
//#NT#2016/05/24#Ben Wang -begin
|
||||||
//#NT#Fix the coverity issue.
|
//#NT#Fix the coverity issue.
|
||||||
|
@ -368,14 +378,14 @@ static ER xUIPlay_FList_DCF_DelFile(UINT32 cmdID)
|
||||||
//#NT#2016/05/24#Ben Wang -end
|
//#NT#2016/05/24#Ben Wang -end
|
||||||
CHAR filePath[DCF_FULL_FILE_PATH_LEN] = {0};
|
CHAR filePath[DCF_FULL_FILE_PATH_LEN] = {0};
|
||||||
|
|
||||||
index = DCF_GetCurIndex();
|
index = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_CUR_INDEX);
|
||||||
uiThisFileFormat = DCF_GetDBInfo(DCF_INFO_CUR_FILE_TYPE);
|
uiThisFileFormat = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_CUR_FILE_TYPE);
|
||||||
for (i = 0; i <= DCF_FILE_TYPE_NUM; i++) {
|
for (i = 0; i <= DCF_FILE_TYPE_NUM; i++) {
|
||||||
tmpFileType = 0x0001 << i;
|
tmpFileType = 0x0001 << i;
|
||||||
if (uiThisFileFormat & tmpFileType) {
|
if (uiThisFileFormat & tmpFileType) {
|
||||||
if (DCF_GetObjPath(index, uiThisFileFormat, filePath)) {
|
if (DCF_GetObjPathEx(dcf_handle, index, uiThisFileFormat, filePath)) {
|
||||||
if (FST_STA_OK == FileSys_DeleteFile(filePath)) {
|
if (FST_STA_OK == FileSys_DeleteFile(filePath)) {
|
||||||
DCF_DelDBfile(filePath);
|
DCF_DelDBfileEx(dcf_handle, filePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,9 +397,9 @@ static ER xUIPlay_FList_DCF_DelFile(UINT32 cmdID)
|
||||||
UINT32 DirID = 0, FileID = 0, Index = 0, uiThisFileFormat = 0;
|
UINT32 DirID = 0, FileID = 0, Index = 0, uiThisFileFormat = 0;
|
||||||
BOOL isCurrFileReadOnly = FALSE;
|
BOOL isCurrFileReadOnly = FALSE;
|
||||||
|
|
||||||
Index = DCF_GetDBInfo(DCF_INFO_CUR_INDEX);
|
Index = DCF_GetDBInfoEx(dcf_handle, DCF_INFO_CUR_INDEX);
|
||||||
DCF_GetObjInfo(Index, &DirID, &FileID, &uiThisFileFormat);
|
DCF_GetObjInfoEx(dcf_handle, Index, &DirID, &FileID, &uiThisFileFormat);
|
||||||
DCF_GetObjPath(Index, uiThisFileFormat, filePath);
|
DCF_GetObjPathEx(dcf_handle, Index, uiThisFileFormat, filePath);
|
||||||
|
|
||||||
ret = FileSys_GetAttrib(filePath, &attrib);
|
ret = FileSys_GetAttrib(filePath, &attrib);
|
||||||
if ((ret == E_OK) && M_IsReadOnly(attrib) == TRUE) {
|
if ((ret == E_OK) && M_IsReadOnly(attrib) == TRUE) {
|
||||||
|
@ -399,10 +409,10 @@ static ER xUIPlay_FList_DCF_DelFile(UINT32 cmdID)
|
||||||
// --------- delete all files -----------------------
|
// --------- delete all files -----------------------
|
||||||
xUIPlay_FList_DCF_DelAll();
|
xUIPlay_FList_DCF_DelAll();
|
||||||
if (isCurrFileReadOnly) {
|
if (isCurrFileReadOnly) {
|
||||||
Index = DCF_GetIndexByID(DirID, FileID);
|
Index = DCF_GetIndexByIDEx(dcf_handle, DirID, FileID);
|
||||||
DCF_SetCurIndex(Index);
|
DCF_SetCurIndexEx(dcf_handle, Index);
|
||||||
}
|
}
|
||||||
DCF_Refresh();
|
DCF_RefreshEx(dcf_handle);
|
||||||
}
|
}
|
||||||
return E_OK;
|
return E_OK;
|
||||||
}
|
}
|
||||||
|
|
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)
|
||||||
|
|
|
@ -905,11 +905,11 @@ static void UIFlowMovie_OnExeRecord(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
if (System_GetState(SYS_STATE_POWERON) == SYSTEM_POWERON_SAFE) {
|
if (System_GetState(SYS_STATE_POWERON) == SYSTEM_POWERON_SAFE) {
|
||||||
|
|
||||||
if (System_GetState(SYS_STATE_CARD) == CARD_REMOVED) {
|
// if (System_GetState(SYS_STATE_CARD) == CARD_REMOVED) {
|
||||||
|
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, warn_msgbox_auto_close_ms);
|
// UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, warn_msgbox_auto_close_ms);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
} else if (System_GetState(SYS_STATE_POWERON) == SYSTEM_POWERON_NORMAL) {
|
} else if (System_GetState(SYS_STATE_POWERON) == SYSTEM_POWERON_NORMAL) {
|
||||||
|
|
||||||
|
@ -920,11 +920,11 @@ static void UIFlowMovie_OnExeRecord(lv_obj_t* obj)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (System_GetState(SYS_STATE_CARD) == CARD_REMOVED) {
|
// if (System_GetState(SYS_STATE_CARD) == CARD_REMOVED) {
|
||||||
|
|
||||||
UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, warn_msgbox_auto_close_ms);
|
// UIFlowWrnMsgAPI_Open_StringID(LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD, warn_msgbox_auto_close_ms);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -672,7 +672,6 @@ static void update_gps_status(void)
|
||||||
}
|
}
|
||||||
int get_storage_type(void)
|
int get_storage_type(void)
|
||||||
{
|
{
|
||||||
return MMC_DEV_SD;
|
|
||||||
SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev();
|
SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev();
|
||||||
if (NULL == mmc_dev)
|
if (NULL == mmc_dev)
|
||||||
{
|
{
|
||||||
|
@ -688,16 +687,16 @@ int get_storage_type(void)
|
||||||
}
|
}
|
||||||
static void update_storage_sd_card(void)
|
static void update_storage_sd_card(void)
|
||||||
{
|
{
|
||||||
if (System_GetState(SYS_STATE_FS) == FS_INIT_OK)
|
// if (System_GetState(SYS_STATE_FS) == FS_INIT_OK)
|
||||||
{
|
{
|
||||||
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
// UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
if (cardStatus != CARD_REMOVED)
|
// if (cardStatus != CARD_REMOVED)
|
||||||
{
|
{
|
||||||
if (g_SysStrg_Chg)
|
if (g_SysStrg_Chg)
|
||||||
{
|
{
|
||||||
static int cnt = 0;
|
static int cnt = 0;
|
||||||
if(cnt++<1){
|
if(cnt++<1){
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, "Loarding...");
|
// lv_label_set_text(label_6_scr_uiflowphoto, "Loarding...");
|
||||||
}else{
|
}else{
|
||||||
g_SysStrg_Chg = false;
|
g_SysStrg_Chg = false;
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
|
@ -705,7 +704,7 @@ static void update_storage_sd_card(void)
|
||||||
} else if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
} else if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
||||||
{
|
{
|
||||||
if(UIStorageCheck_DCIMWritable() == FALSE){
|
if(UIStorageCheck_DCIMWritable() == FALSE){
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
|
lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
|
||||||
}
|
}
|
||||||
} else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
|
} else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
|
||||||
{
|
{
|
||||||
|
@ -719,17 +718,17 @@ static void update_storage_sd_card(void)
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
|
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
set_warning_label_text(label_6_scr_uiflowphoto);
|
// set_warning_label_text(label_6_scr_uiflowphoto);
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
|
// 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");
|
|
||||||
}
|
}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// set_warning_label_text(label_6_scr_uiflowphoto);
|
||||||
|
// lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
unsigned int check_sd_size(UINT64 diskSize)
|
unsigned int check_sd_size(UINT64 diskSize)
|
||||||
{
|
{
|
||||||
|
@ -774,8 +773,14 @@ static void update_sd_card_status(lv_obj_t* obj)
|
||||||
LV_PLUGIN_IMG_ID_SF_SD_256GB,
|
LV_PLUGIN_IMG_ID_SF_SD_256GB,
|
||||||
LV_PLUGIN_IMG_ID_SF_SD_FULL
|
LV_PLUGIN_IMG_ID_SF_SD_FULL
|
||||||
};
|
};
|
||||||
UINT64 diskSize = FileSys_GetDiskInfoEx('A', FST_INFO_DISK_SIZE);
|
UINT64 diskSize = 0;
|
||||||
unsigned int index = check_sd_size(diskSize);
|
unsigned int index = 0;
|
||||||
|
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
|
if (cardStatus != CARD_REMOVED)
|
||||||
|
{
|
||||||
|
diskSize = FileSys_GetDiskInfoEx('A', FST_INFO_DISK_SIZE);
|
||||||
|
index = check_sd_size(diskSize);
|
||||||
|
}
|
||||||
if (index > 7)
|
if (index > 7)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -947,6 +952,12 @@ static void update_dzoom(void)
|
||||||
static void update_icons(void)
|
static void update_icons(void)
|
||||||
{
|
{
|
||||||
// printf(" update_icons\n ");
|
// printf(" update_icons\n ");
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
if(sf_get_power_off_flag() || sf_is_usb_flag())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
update_selftimer();
|
update_selftimer();
|
||||||
update_size();
|
update_size();
|
||||||
update_quality();
|
update_quality();
|
||||||
|
@ -2139,8 +2150,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;
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
||||||
#include <kwrap/debug.h>
|
#include <kwrap/debug.h>
|
||||||
|
|
||||||
|
#include "SF_SysStrgMng.h"
|
||||||
|
|
||||||
PHOTO_TASK_DATA gPhotoData = { 0 };
|
PHOTO_TASK_DATA gPhotoData = { 0 };
|
||||||
|
|
||||||
static UINT32 g_uiFreePicNum = 0;
|
static UINT32 g_uiFreePicNum = 0;
|
||||||
|
@ -28,7 +30,29 @@ CHAR *Get_FreePicNumString(UINT32 uiValue)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
unsigned long fileCount = 0;
|
unsigned long fileCount = 0;
|
||||||
|
#if USE_MMC_DEV_CHECK
|
||||||
|
|
||||||
|
SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev();
|
||||||
|
if(mmc_dev == NULL)
|
||||||
|
{
|
||||||
|
DBG_ERR("No MMC_Dev Can use!\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if(mmc_dev->dcf_handle < 0)
|
||||||
|
{
|
||||||
|
DBG_ERR("dcf_handle err!\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_MMC_DEV_CHECK
|
||||||
|
if(mmc_dev->dev_type != MMC_DEV_NO)
|
||||||
|
{
|
||||||
|
fileCount = DCF_GetDBInfoEx(mmc_dev->dcf_handle, DCF_INFO_TOL_FILE_COUNT);
|
||||||
|
}
|
||||||
|
#else
|
||||||
fileCount = DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT);
|
fileCount = DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT);
|
||||||
|
#endif
|
||||||
snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", fileCount, uiValue);
|
snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", fileCount, uiValue);
|
||||||
return g_cFreePicNumStr;
|
return g_cFreePicNumStr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
static SF_ST_MMC_DEV *mmc_dev = NULL;
|
||||||
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);
|
||||||
|
}
|
||||||
|
lv_obj_set_hidden(image_option1_scr_uiflowplay, false);
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
|
||||||
for(int i = 0; i < ITEMS_PER_PAGE; i++)
|
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);
|
||||||
// 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,
|
else
|
||||||
(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);
|
lv_obj_set_state(image_button_option_2_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_state(label_option2_scr_uiflowplay, LV_STATE_DEFAULT);
|
||||||
ishidden = true;
|
lv_plugin_img_set_src(image_option2_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_NEXT1);
|
||||||
if((ITEMS_PER_PAGE * selectedPage) + i < ProfileTotal)
|
lv_obj_set_pos(image_option2_scr_uiflowplay, 288, 0);
|
||||||
{
|
}
|
||||||
lv_plugin_menu_set_item_hidden(pMenu, i, false);//整项
|
lv_obj_set_hidden(image_option2_scr_uiflowplay, 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 == 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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf(" ================================== switch emmc.\n");
|
||||||
|
ProfileSelected = 0;
|
||||||
|
FileDB_Refresh(1);
|
||||||
}
|
}
|
||||||
hide_Selection_page();
|
ProfileFocused = 0;
|
||||||
|
hidde_Selection_page();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1282,6 +1349,7 @@ static void UIFlowPlay_ChildScrClose(lv_obj_t* obj, const void * data)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NVTRET_ENTER_MENU:
|
case NVTRET_ENTER_MENU:
|
||||||
|
break;
|
||||||
DBG_DUMP("NVTRET_ENTER_MENU");
|
DBG_DUMP("NVTRET_ENTER_MENU");
|
||||||
//#NT#2023/11/03#Eric - begin
|
//#NT#2023/11/03#Eric - begin
|
||||||
//#NT#Support //#NT#Support IVOT_N12144_CO-148 -3
|
//#NT#Support //#NT#Support IVOT_N12144_CO-148 -3
|
||||||
|
@ -1369,7 +1437,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 +2337,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 +2351,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,9 +56,10 @@ 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);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -209,9 +206,7 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
|
||||||
|
|
||||||
void UIFlowWrnMsgEventCallback_OnOpen(lv_obj_t* obj)
|
void UIFlowWrnMsgEventCallback_OnOpen(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
|
evt = NVTEVT_NULL;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UIFlowWrnMsg_OnNVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
|
static void UIFlowWrnMsg_OnNVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* msg)
|
||||||
|
@ -226,7 +221,8 @@ static void UIFlowWrnMsg_OnNVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA
|
||||||
{
|
{
|
||||||
printf("Complete format emmc.\n");
|
printf("Complete format emmc.\n");
|
||||||
lv_plugin_msgbox_set_text(msgbox, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
lv_plugin_msgbox_set_text(msgbox, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
||||||
lv_plugin_label_set_text(label_msg_scr_uiflowwrnmsg, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
// lv_plugin_label_set_text(label_msg_scr_uiflowwrnmsg, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
||||||
|
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "Completed!");
|
||||||
lv_msgbox_start_auto_close(msgbox, 3000);
|
lv_msgbox_start_auto_close(msgbox, 3000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +233,8 @@ static void UIFlowWrnMsg_OnNVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA
|
||||||
if(ret == CMD_FORMAT_SD_OK)
|
if(ret == CMD_FORMAT_SD_OK)
|
||||||
{
|
{
|
||||||
lv_plugin_msgbox_set_text(msgbox, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
lv_plugin_msgbox_set_text(msgbox, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
||||||
lv_plugin_label_set_text(label_msg_scr_uiflowwrnmsg, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
// lv_plugin_label_set_text(label_msg_scr_uiflowwrnmsg, LV_PLUGIN_STRING_ID_STRING_COMPLETED);
|
||||||
|
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "Completed!");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -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_)
|
||||||
|
|
|
@ -2354,6 +2354,7 @@ void sf_power_on_para_check_init(void)
|
||||||
puiPara->FristSendDailyAndGps = 1;
|
puiPara->FristSendDailyAndGps = 1;
|
||||||
puiPara->GpsSendFlag = 0;
|
puiPara->GpsSendFlag = 0;
|
||||||
memset(puiPara->SimIccid,'\0',sizeof(puiPara->SimIccid));
|
memset(puiPara->SimIccid,'\0',sizeof(puiPara->SimIccid));
|
||||||
|
memset(puiPara->ServiceProvider,'\0',sizeof(puiPara->ServiceProvider));
|
||||||
}
|
}
|
||||||
else if(PowerOnMode == PWR_ON_TIME_SYNC)
|
else if(PowerOnMode == PWR_ON_TIME_SYNC)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -895,7 +895,19 @@ void sf_battery_level_polling(void)
|
||||||
LibatCnt++;
|
LibatCnt++;
|
||||||
}
|
}
|
||||||
readBatCnt++;
|
readBatCnt++;
|
||||||
|
if(puiPara->BatteryLogSwitch)
|
||||||
|
{
|
||||||
|
printf("\nDC Adc:%d After Convert:(%d.%dV),Is Dc In=%s, TemperAdc:%d \n", sf_battery_convert_to_adc(24, 100, DcVoltageVal), DcVoltageVal / 10, DcVoltageVal % 10, IsPowerDcIn == 1? "Yes" : "No", TemperAdc);
|
||||||
|
|
||||||
|
if(LiPolymerVoltageVal)
|
||||||
|
{
|
||||||
|
printf("Li Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_battery_convert_to_adc(24, 100, LiPolymerVoltageVal), LiPolymerVoltageVal / 10, LiPolymerVoltageVal % 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("Other Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_aa_battery_convert_to_adc(24, 100, BatVoltageVal),BatVoltageVal / 10, BatVoltageVal % 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
if(readBatCnt >= 10)
|
if(readBatCnt >= 10)
|
||||||
{
|
{
|
||||||
_DcVoltageVal = dcTemp / 10;
|
_DcVoltageVal = dcTemp / 10;
|
||||||
|
|
|
@ -964,17 +964,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
|
||||||
{
|
{
|
||||||
sf_set_pir_statu_flag(0);
|
sf_set_pir_statu_flag(0);
|
||||||
sf_set_module_sleep_flag(0);
|
sf_set_module_sleep_flag(0);
|
||||||
if((PWR_ON_SETUP != sf_poweron_type_get()) && (PWR_ON_USB!= sf_poweron_type_get()))
|
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||||
{
|
|
||||||
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
|
|
||||||
sf_set_power_off_flag(1);
|
|
||||||
//sf_app_battery_stop();
|
|
||||||
system("watchdog -T 1 -t 5 /dev/watchdog");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(0 == stMessageBuf.arg3) //ON->OFF
|
else if(0 == stMessageBuf.arg3) //ON->OFF
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -449,7 +449,7 @@ SINT32 sf_hal_ttyusb2_read_buf(SF_TTY_DATA_TYPE_S *recv)
|
||||||
}
|
}
|
||||||
else if (0 == s32ret) {
|
else if (0 == s32ret) {
|
||||||
waitTime--;
|
waitTime--;
|
||||||
MLOGW("FIFO select timeout [%d]\n",waitTime);
|
//MLOGW("FIFO select timeout [%d]\n",waitTime);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ typedef enum _PBX_FLIST_CONFIG_ID {
|
||||||
PBX_FLIST_CONFIG_SORT_BYSN_DELIMSTR = 0x10, ///< only for FileDB, set the delimiter string, e.g. underline "_", "AA"
|
PBX_FLIST_CONFIG_SORT_BYSN_DELIMSTR = 0x10, ///< only for FileDB, set the delimiter string, e.g. underline "_", "AA"
|
||||||
PBX_FLIST_CONFIG_SORT_BYSN_DELIMNUM = 0x11, ///< only for FileDB, set the delimiter count to find the serial number
|
PBX_FLIST_CONFIG_SORT_BYSN_DELIMNUM = 0x11, ///< only for FileDB, set the delimiter count to find the serial number
|
||||||
PBX_FLIST_CONFIG_SORT_BYSN_NUMOFSN = 0x12, ///< only for FileDB, set the character number of the serial number
|
PBX_FLIST_CONFIG_SORT_BYSN_NUMOFSN = 0x12, ///< only for FileDB, set the character number of the serial number
|
||||||
|
PBX_FLIST_CONFIG_DCF_HANDLE = 0x13, ///< only for DCF , multi storage DCF handle
|
||||||
ENUM_DUMMY4WORD(PBX_FLIST_CONFIG_ID)
|
ENUM_DUMMY4WORD(PBX_FLIST_CONFIG_ID)
|
||||||
} PBX_FLIST_CONFIG_ID;
|
} PBX_FLIST_CONFIG_ID;
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -289,8 +289,8 @@ 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
|
||||||
if(AutoOfftime >= KeepAliveTime_s)
|
if(AutoOfftime >= KeepAliveTime_s)
|
||||||
|
@ -305,7 +305,7 @@ void sf_mode_detect(void)
|
||||||
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF); //shutdown start
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 2, APP_POWER_OFF_APO, DO_NOT_SHOW_POWER_OFF); //shutdown start
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
sf_set_power_off_flag(1);*/
|
sf_set_power_off_flag(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -804,14 +804,7 @@ void sf_mcu_dataready_ck(UINT8 startMode)
|
||||||
gModuleSleep = 0; //power off 4G module
|
gModuleSleep = 0; //power off 4G module
|
||||||
sf_set_power_off_flag(1);
|
sf_set_power_off_flag(1);
|
||||||
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
|
printf("[power off] %s(%d)\n", __FUNCTION__, __LINE__);
|
||||||
if((startMode == 1) && (PWR_ON_AUTO == sf_cardv_convert_power_on_mode()))
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
|
||||||
{
|
|
||||||
system("watchdog -T 1 -t 5 /dev/watchdog");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, 0); //shutdown start
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -945,7 +945,7 @@
|
||||||
#define HUNTING_MCU_UART ENABLE
|
#define HUNTING_MCU_UART ENABLE
|
||||||
#define HUNTING_IR_LED_940 ENABLE
|
#define HUNTING_IR_LED_940 ENABLE
|
||||||
#define SF_EXIF_MN_BUF_SIZE 256
|
#define SF_EXIF_MN_BUF_SIZE 256
|
||||||
#define SF_BASE_VERSION "7MR5RCwDC05"
|
#define SF_BASE_VERSION "7MR5RCwDC07"
|
||||||
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
|
||||||
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */
|
||||||
#define PHOTO_THUMB_PATH ":\\THUMB\\"
|
#define PHOTO_THUMB_PATH ":\\THUMB\\"
|
||||||
|
@ -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_)
|
||||||
|
|
|
@ -2171,7 +2171,6 @@ void sf_file_thumb_cfg_sava(void)
|
||||||
UINT8 fileIndex = 0;
|
UINT8 fileIndex = 0;
|
||||||
INT32 ret_fs = 0;
|
INT32 ret_fs = 0;
|
||||||
FST_FILE_STATUS FileStat;
|
FST_FILE_STATUS FileStat;
|
||||||
char tmp[64] = {'\0'};
|
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
|
|
||||||
if (pThumbFileCfg != NULL) {
|
if (pThumbFileCfg != NULL) {
|
||||||
|
@ -2183,6 +2182,7 @@ void sf_file_thumb_cfg_sava(void)
|
||||||
//static int flag = 0;
|
//static int flag = 0;
|
||||||
//struct stat st;
|
//struct stat st;
|
||||||
#if SF_IQ_TEST != ENABLE
|
#if SF_IQ_TEST != ENABLE
|
||||||
|
char tmp[64] = {'\0'};
|
||||||
INT32 uiStatus = 0;
|
INT32 uiStatus = 0;
|
||||||
UINT8 ucAttrib = 0;
|
UINT8 ucAttrib = 0;
|
||||||
snprintf(tmp, sizeof(tmp), "%c%s", 'A', PHOTO_THUMB_PATH);
|
snprintf(tmp, sizeof(tmp), "%c%s", 'A', PHOTO_THUMB_PATH);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user