1.优化消息处理
This commit is contained in:
parent
b35822d717
commit
350d9bd3f2
|
@ -155,24 +155,7 @@ void Strg_CB(UINT32 event, UINT32 param1, UINT32 param2)
|
||||||
INIT_SETFLAG(FLGINIT_MOUNTFS);
|
INIT_SETFLAG(FLGINIT_MOUNTFS);
|
||||||
#endif
|
#endif
|
||||||
Ux_PostEvent(NVTEVT_STRG_ATTACH, 2, param1, status);
|
Ux_PostEvent(NVTEVT_STRG_ATTACH, 2, param1, status);
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
|
||||||
INT32 uiStatus = 0;
|
|
||||||
UINT8 ucAttrib = 0;
|
|
||||||
uiStatus = FileSys_GetAttrib(PHOTO_THUMB_PATH, &ucAttrib);
|
|
||||||
if (uiStatus == FST_STA_OK) {
|
|
||||||
if(!(ucAttrib&FST_ATTRIB_HIDDEN)){
|
|
||||||
#if SF_IQ_TEST != ENABLE
|
|
||||||
FileSys_SetAttrib(PHOTO_THUMB_PATH, FST_ATTRIB_HIDDEN/* | FST_ATTRIB_SYSTEM*/, TRUE);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
FileSys_MakeDir(PHOTO_THUMB_PATH);
|
|
||||||
#if SF_IQ_TEST != ENABLE
|
|
||||||
FileSys_SetAttrib(PHOTO_THUMB_PATH, FST_ATTRIB_HIDDEN/* | FST_ATTRIB_SYSTEM*/, TRUE);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -181,7 +164,7 @@ void Strg_CB(UINT32 event, UINT32 param1, UINT32 param2)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
if((CMD_FORMAT_SD_STA != sf_get_card_statu())){
|
if((FST_STA_OK != param2) && (CMD_FORMAT_SD_STA != sf_get_card_statu())){
|
||||||
stMessageBuf.arg1 = event;
|
stMessageBuf.arg1 = event;
|
||||||
stMessageBuf.arg2 = param1;
|
stMessageBuf.arg2 = param1;
|
||||||
stMessageBuf.arg3 = param2;
|
stMessageBuf.arg3 = param2;
|
||||||
|
|
|
@ -71,7 +71,11 @@
|
||||||
#include <mntent.h>
|
#include <mntent.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "emmc.h"
|
#include "emmc.h"
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
#include <sf_message_queue.h>
|
||||||
|
#include <sf_param_struct.h>
|
||||||
|
#include "sf_sd_common.h"
|
||||||
|
#endif
|
||||||
#if (LOGFILE_FUNC==ENABLE)
|
#if (LOGFILE_FUNC==ENABLE)
|
||||||
#include "LogFile.h"
|
#include "LogFile.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -793,7 +797,10 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
unsigned int *p_data;
|
unsigned int *p_data;
|
||||||
#endif
|
#endif
|
||||||
UINT32 result = paramArray[1];
|
UINT32 result = paramArray[1];
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||||
|
|
||||||
|
#endif
|
||||||
#if defined(__FREERTOS)
|
#if defined(__FREERTOS)
|
||||||
if (p_fdt== NULL) {
|
if (p_fdt== NULL) {
|
||||||
DBG_ERR("p_fdt is NULL.\n");
|
DBG_ERR("p_fdt is NULL.\n");
|
||||||
|
@ -855,6 +862,34 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||||
//FileSys_GetDiskInfo(FST_INFO_DISK_SIZE);
|
//FileSys_GetDiskInfo(FST_INFO_DISK_SIZE);
|
||||||
System_SetState(SYS_STATE_FS, FS_INIT_OK);
|
System_SetState(SYS_STATE_FS, FS_INIT_OK);
|
||||||
|
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
INT32 uiStatus = 0;
|
||||||
|
UINT8 ucAttrib = 0;
|
||||||
|
uiStatus = FileSys_GetAttrib(PHOTO_THUMB_PATH, &ucAttrib);
|
||||||
|
if (uiStatus == FST_STA_OK) {
|
||||||
|
if(!(ucAttrib&FST_ATTRIB_HIDDEN)){
|
||||||
|
#if SF_IQ_TEST != ENABLE
|
||||||
|
FileSys_SetAttrib(PHOTO_THUMB_PATH, FST_ATTRIB_HIDDEN/* | FST_ATTRIB_SYSTEM*/, TRUE);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
FileSys_MakeDir(PHOTO_THUMB_PATH);
|
||||||
|
#if SF_IQ_TEST != ENABLE
|
||||||
|
FileSys_SetAttrib(PHOTO_THUMB_PATH, FST_ATTRIB_HIDDEN/* | FST_ATTRIB_SYSTEM*/, TRUE);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
|
||||||
|
if((CMD_FORMAT_SD_STA != sf_get_card_statu())){
|
||||||
|
stMessageBuf.arg1 = STRG_CB_MOUNT_FINISH;
|
||||||
|
stMessageBuf.arg2 = result;
|
||||||
|
stMessageBuf.arg3 = FST_STA_OK;
|
||||||
|
stMessageBuf.cmdId = CMD_SD;
|
||||||
|
sf_com_message_send_to_app(&stMessageBuf);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#if defined(__FREERTOS)
|
#if defined(__FREERTOS)
|
||||||
if (p_shm && p_shm->boot.LdCtrl2 & LDCF_UPDATE_FW) {
|
if (p_shm && p_shm->boot.LdCtrl2 & LDCF_UPDATE_FW) {
|
||||||
FST_FILE hFile = FileSys_OpenFile(FW_DEL_INDIACTION_PATH, FST_OPEN_READ | FST_OPEN_EXISTING);
|
FST_FILE hFile = FileSys_OpenFile(FW_DEL_INDIACTION_PATH, FST_OPEN_READ | FST_OPEN_EXISTING);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user