diff --git a/code/application/source/cardv/SrcCode/System/SysMain.c b/code/application/source/cardv/SrcCode/System/SysMain.c index 6a55c0ea1..82d051e3a 100644 --- a/code/application/source/cardv/SrcCode/System/SysMain.c +++ b/code/application/source/cardv/SrcCode/System/SysMain.c @@ -27,7 +27,9 @@ #include #include #endif - +#if (LOGFILE_FUNC==ENABLE) +#include "LogFile.h" +#endif extern void System_BootStart(void); extern void System_BootEnd(void); extern void System_ShutDownStart(void); @@ -765,6 +767,14 @@ exit: stMessageBuf.arg1 = paramArray[0]; stMessageBuf.cmdId = CMD_POWEROFF; sf_com_message_send_to_app(&stMessageBuf); + #if (LOGFILE_FUNC==ENABLE) + UIMenuStoreInfo *puiPara = sf_ui_para_get(); + if (puiPara->DebugMode) + { + DBG_DUMP("LogFile_Close ...\n"); + LogFile_Close(); + } + #endif #else sf_mcu_reg_set(SF_MCU_POWEROFF,paramArray[0]);