85 lines
2.1 KiB
C
85 lines
2.1 KiB
C
#include "PrjInc.h"
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
#include "SysCommon.h"
|
|
//#include "AppCommon.h"
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
#include "UIApp/AppLib.h"
|
|
#include "Mode/UIMode.h"
|
|
#include "Mode/UIModeTranscode.h"
|
|
#include "UIFrameworkExt.h"
|
|
#include "UIWnd/UIFlow.h"
|
|
#include "UIApp/Transcode/UIAppTranscode.h"
|
|
#if HUNTING_CAMERA_MCU == ENABLE
|
|
#include <sf_common.h>
|
|
#endif
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
#define __MODULE__ UIModeTranscode
|
|
#define __DBGLVL__ 2 // 0=FATAL, 1=ERR, 2=WRN, 3=UNIT, 4=FUNC, 5=IND, 6=MSG, 7=VALUE, 8=USER
|
|
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
|
#include <kwrap/debug.h>
|
|
|
|
|
|
int PRIMARY_MODE_TRANSCODE = -1; ///< UpdFw
|
|
int SYS_SUBMODE_TRANSCODE = -1;
|
|
void ModeTranscode_Open(void);
|
|
void ModeTranscode_Close(void);
|
|
|
|
void ModeTranscode_Open(void)
|
|
{
|
|
DBG_FUNC_BEGIN("\r\n");
|
|
Ux_SetActiveApp(&CustomTranscodeObjCtrl);
|
|
Ux_SendEvent(0, NVTEVT_EXE_OPEN, 0);
|
|
#if(UI_FUNC==ENABLE)
|
|
if (System_GetState(SYS_STATE_CURRSUBMODE) == SYS_SUBMODE_NORMAL) {
|
|
//Ux_OpenWindow((VControl *)(&UIUpdFwWndCtrl), 0);
|
|
} else {
|
|
SYS_SUBMODE *pCurSubMode = System_GetSubModeCtrl();
|
|
if (pCurSubMode && pCurSubMode->pfSubMode_OnOpen) {
|
|
pCurSubMode->pfSubMode_OnOpen();
|
|
}
|
|
}
|
|
#endif
|
|
#if 0//HUNTING_CAMERA_MCU == ENABLE
|
|
if((1 == sf_get_fw_update())){
|
|
sf_do_upgrade_thread();//update
|
|
}
|
|
#endif
|
|
DBG_FUNC_END("\r\n");
|
|
|
|
}
|
|
void ModeTranscode_Close(void)
|
|
{
|
|
DBG_FUNC_BEGIN("\r\n");
|
|
#if(UI_FUNC==ENABLE)
|
|
if (System_GetState(SYS_STATE_CURRSUBMODE) == SYS_SUBMODE_NORMAL) {
|
|
//Ux_CloseWindow((VControl *)(&UIUpdFwWndCtrl), 0);
|
|
} else {
|
|
SYS_SUBMODE *pCurSubMode = System_GetSubModeCtrl();
|
|
if (pCurSubMode && pCurSubMode->pfSubMode_OnClose) {
|
|
pCurSubMode->pfSubMode_OnClose();
|
|
}
|
|
}
|
|
#endif
|
|
|
|
Ux_SendEvent(0, NVTEVT_EXE_CLOSE, 0);
|
|
DBG_FUNC_END("\r\n");
|
|
|
|
}
|
|
|
|
SYS_MODE gModeTranscode = {
|
|
"TRANSCODE",
|
|
ModeTranscode_Open,
|
|
ModeTranscode_Close,
|
|
NULL,
|
|
NULL,
|
|
NULL,
|
|
NULL
|
|
};
|
|
|
|
SYS_SUBMODE gSubModeTranscode = {
|
|
"SUBTRANSCODE",
|
|
NULL,
|
|
NULL,
|
|
};
|