1.rtos下log调整

This commit is contained in:
payton 2024-01-26 18:38:59 +08:00
parent f3b87fae3e
commit 4d78227e9a
7 changed files with 41 additions and 30 deletions

View File

@ -203,7 +203,7 @@ THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg)
//if((vos_perf_duration(t1, t2) / 1000) > (50*1000))
if(cnt > 200)//200*200= 40S
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("failed timeout ID:%d\n", MOVIEFAST_FLG_ID);
sf_power_off();
goto exit;
@ -308,7 +308,7 @@ static void MovieFast_ShutDown(void)
#if (POWERON_FAST_BOOT_MSG == DISABLE)
#if SF_TRIGGER_TIME_TEST == ENABLE
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
#endif
#endif
@ -335,7 +335,7 @@ static void MovieFast_ShutDown(void)
#if HUNTING_CAMERA_MCU
#if SF_TRIGGER_TIME_TEST != ENABLE
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
#endif
sf_file_thumb_cfg_sava();
sf_para_print();
@ -958,7 +958,7 @@ INT32 MovieFast_Wait_FileSys(UINT32 timeout_ms)
return E_OK;
}
else {
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
return E_SYS;
}
@ -1106,7 +1106,7 @@ static void MovieFast_Manual_Raw_Task(void* arg)
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("failed timeout\n");
break;
}
@ -1138,7 +1138,7 @@ static void MovieFast_Manual_Raw_Task(void* arg)
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (30*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("failed timeout\n");
break;
}
@ -1246,7 +1246,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
break;
case MOVIE_USER_CB_ERROR_CARD_SLOW:
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("Slow card!, id %d\r\n", value);
MovieFast_Set_Shutdown_flag();
}
@ -1254,7 +1254,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
case MOVIE_USER_CB_ERROR_CARD_WR_ERR:
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("EVENT %d: card write error!\r\n", event_id);
MovieFast_Set_Shutdown_flag();
}
@ -1263,7 +1263,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
case MOVIE_USER_CB_EVENT_CARD_FULL:
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("EVENT %d: card full!\r\n", event_id);
MovieFast_Set_Shutdown_flag();
}
@ -1392,7 +1392,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
MovieFast_FileNamingCB(id, pFileName);
}
else{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR(" MovieFast_Wait_FileNaming err TIMEOUT\n");
vos_flag_set(MOVIEFAST_FLG_ID, FLGMOVIEFAST_SHUTDOWN);
}
@ -1510,7 +1510,7 @@ THREAD_RETTYPE MovieFast_InitFileNamingThread(void *arg)
}
else
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR(" FILESYS TIMEOUT failed\r\n");
}
}
@ -1533,7 +1533,7 @@ THREAD_RETTYPE MovieFast_InitFileNamingThread2(void *arg)
//fastboot_wait_done(BOOT_INIT_FILESYSOK_2);
if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK)
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR(" BOOT_INIT_FILESYSOK_2 TIMEOUT failed\r\n");
if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK)
{
@ -2047,7 +2047,7 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n");
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("failed timeout\n");
goto EXIT;
}
@ -2174,7 +2174,7 @@ DBG_WRN(">>>>>>>>>>>>>>> movie thread <<<<<<<<<<\r\n");
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("failed timeout\n");
goto EXIT;
}
@ -2355,7 +2355,7 @@ static void MovieFast_Close(void)
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("failed es timeout\n");
goto EXIT;
}

View File

@ -1676,7 +1676,7 @@ THREAD_RETTYPE PhotoFast_InitFileNamingThread(void *arg)
}
else
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR(" FILESYS TIMEOUT failed\r\n");
}
THREAD_RETURN(0);
@ -1913,7 +1913,7 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg)
}
if((vos_perf_duration(t1timeout, t2) / 1000) > (15*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
g_bPreViewPullFlag = FALSE;
DBG_ERR("failed timeout\n");
goto exit;
@ -2113,7 +2113,7 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg)
}
break;
default:
//fastboot_msg_en(ENABLE);
//sf_fastboot_msg_en(ENABLE);
DBG_ERR(" DrvGPIO_GetPhotoMovieModeFromMonitor default\n");
break;
}
@ -2293,7 +2293,7 @@ static void PhotoFast_ShutDown(void)
#if (POWERON_FAST_BOOT_MSG == DISABLE)
#if SF_TRIGGER_TIME_TEST == ENABLE
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
#endif
#endif
@ -2305,7 +2305,7 @@ static void PhotoFast_ShutDown(void)
#endif
#if HUNTING_CAMERA_MCU == ENABLE
#if SF_TRIGGER_TIME_TEST != ENABLE
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
#endif
sf_file_thumb_cfg_sava();
sf_para_print();

View File

@ -1939,7 +1939,7 @@ INT32 PhotoFast_Sliceencode2_Enq_Frame(const HD_VIDEO_FRAME* video_frame)
cnt++;
if(cnt > 3)
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("cnt%d timeout\n",cnt);
}
vos_util_delay_ms(1);
@ -1962,7 +1962,7 @@ INT32 PhotoFast_Sliceencode2_Stop(void)
cnt++;
if(cnt > 3)
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("cnt%d timeout\n",cnt);
}
vos_util_delay_ms(1);
@ -2056,7 +2056,7 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (30*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("sfailed timeout\n");
goto EXIT;
}
@ -2244,7 +2244,7 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("2failed timeout\n");
goto EXIT;
}
@ -2258,7 +2258,7 @@ INT32 PhotoFast_SliceEncode_CB2(void* user_data)
vos_perf_mark(&t2);
if((vos_perf_duration(t1, t2) / 1000) > (20*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("23failed timeout\n");
goto EXIT;
}
@ -2346,7 +2346,7 @@ INT32 PhotoFast_SliceEncode_CB3(void* user_data)
vos_perf_mark(&t6);
if((vos_perf_duration(t5, t6) / 1000) > (30*1000))
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_ERR("erfailed timeout\n");
goto EXIT;
}
@ -2358,8 +2358,8 @@ INT32 PhotoFast_SliceEncode_CB3(void* user_data)
if(DrvGPIO_GetPhotoMovieModeFromMonitor() == DX_HUNTING_MODE_MOVIE2)
{
fastboot_msg_en(ENABLE);
DBG_WRN("fastboot_msg_en test\n");
sf_fastboot_msg_en(ENABLE);
DBG_WRN("sf_fastboot_msg_en test\n");
}
if(queue_ele_in->comm.terminate){
@ -2393,7 +2393,7 @@ INT32 PhotoFast_SliceEncode_CB3(void* user_data)
}
if(waitFalg)
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
DBG_WRN("filesys not ready, store data into mem\n");
SYS_USRMEM usrmem = {0};

View File

@ -1751,6 +1751,7 @@ void sf_power_on_para_check_init(void)
}
else if(PowerOnMode == PWR_ON_GPRS_INIT)
{
puiPara->SdFileSwitch = 0;
puiPara->NetWorkNeedSearch = 0;
}
else if(PowerOnMode == PWR_ON_TIME_SYNC)

View File

@ -532,5 +532,6 @@ UINT32 sf_in_update(void);
UINT32 sf_in_mcu_update(void);
int sf_base64_decode(const char * base64, char * bindata);
void sf_dailyReport_refresh(void);
void sf_fastboot_msg_en(int en);
#endif

View File

@ -727,7 +727,7 @@ unsigned char sf_commu_parse_mcu_data(unsigned char * src, unsigned int len)
ret = sf_getRegFromMcu_depack(copyBuf, copyLen, &reg[0], &val[0]);
if (ret > 0)
{
fastboot_msg_en(ENABLE);
sf_fastboot_msg_en(ENABLE);
printf("MCU send 0x05, reg_value[%d,%d]\n\n",reg[0], val[0]);
sf_getRegFromMcu_ack(reg[0], val[0]);
//SF_MESSAGE_BUF_S stMessageBuf = {0};

View File

@ -39,6 +39,7 @@
#include "sf_battery.h"
#include <IOCfg.h>
#include <sf_sd_common.h>
#include "sys_fastboot.h"
static UINT8 McuSubVersion = 0;
static UINT16 McuVersion = 0;
static UINT8 DailyReportStartMode = 0;
@ -2697,6 +2698,14 @@ void sf_dailyReport_refresh(void)
}
}
}
void sf_fastboot_msg_en(int en)
{
UIMenuStoreInfo *puiPara = sf_ui_para_get();
if((!puiPara->DebugMode) && (!puiPara->AutoLogSwitch))
{
fastboot_msg_en(ENABLE);
}
}
#if defined __FREERTOS