1.自动模式下oat不亮屏
This commit is contained in:
parent
521c79c1d3
commit
97a9cc578a
|
@ -35,6 +35,10 @@
|
|||
#include "UI/UIView.h"
|
||||
#endif
|
||||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
#include <sf_common.h>
|
||||
#endif
|
||||
|
||||
static DX_HANDLE gDispDev = 0;
|
||||
|
||||
void Display_SetEnable(UINT8 LayerID, BOOL bEnable)
|
||||
|
@ -355,7 +359,13 @@ void System_OnVideoInit2(void)
|
|||
GxVideo_SetDeviceCtrl(DOUT1, DISPLAY_DEVCTRL_BACKLIGHT, TRUE);
|
||||
}
|
||||
#else
|
||||
GxVideo_SetDeviceCtrl(DOUT1, DISPLAY_DEVCTRL_BACKLIGHT, TRUE);
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
if(!sf_get_ota_flag())
|
||||
{
|
||||
GxVideo_SetDeviceCtrl(DOUT1, DISPLAY_DEVCTRL_BACKLIGHT, TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
TM_BOOT_END("video", "show_logo");
|
||||
|
||||
|
|
|
@ -330,9 +330,10 @@ UINT8 sf_cardv_check_power_on_mode(void)
|
|||
FILE *fp = NULL;
|
||||
UINT32 u32ize = 0;
|
||||
char *pStrSrc = NULL;
|
||||
char *pStrOtsOk = "Mode=";
|
||||
char *pStrMode = "Mode=";
|
||||
char *pStrUpFw = "UpFw=";
|
||||
char *pStrUpMcu = "mcu=";
|
||||
char *pStrOtsOk = "ota_flag=0x1";
|
||||
char *pStrSF = "sf=";
|
||||
|
||||
char *temp = NULL;
|
||||
|
@ -353,7 +354,7 @@ UINT8 sf_cardv_check_power_on_mode(void)
|
|||
pStrSrc = (char *)malloc(u32ize*sizeof(char));
|
||||
if (pStrSrc) {
|
||||
fread(pStrSrc, 1, u32ize, fp);
|
||||
temp = strstr(pStrSrc, pStrOtsOk);
|
||||
temp = strstr(pStrSrc, pStrMode);
|
||||
if ( temp != NULL) {
|
||||
temp += strlen("Mode=");
|
||||
sscanf(temp, "%hhd", &startup);
|
||||
|
@ -374,6 +375,11 @@ UINT8 sf_cardv_check_power_on_mode(void)
|
|||
sscanf(temp, "%hhd", &Upmcu);
|
||||
sf_set_mcu_update_flag(Upmcu);
|
||||
}
|
||||
temp = strstr(pStrSrc, pStrOtsOk);
|
||||
if ( temp != NULL) {
|
||||
SLOGI(": ota upgrade success\r\n");
|
||||
sf_set_ota_flag(1);
|
||||
}
|
||||
temp = strstr(pStrSrc, pStrSF);
|
||||
if ( temp != NULL) {
|
||||
temp += strlen("sf=");
|
||||
|
|
|
@ -219,4 +219,6 @@ BOOL sf_cmd_lpa_test(unsigned char argc, char **argv);
|
|||
unsigned long sf_usb_insmod_start(void);
|
||||
int sf_cardv_init_start(void);
|
||||
void sf_cardv_set_battery_level(unsigned long Val);
|
||||
int sf_get_ota_flag(void);
|
||||
void sf_set_ota_flag(int falg);
|
||||
#endif
|
||||
|
|
|
@ -105,6 +105,7 @@ static SF_GPS_STATUS_E gGpsSearching = SF_GPS_SEARCHING_UNKNOW;
|
|||
static FTP_CONNECTING_E gFtpConnectingStatus = FTP_CONNECTING_END;
|
||||
static char CamMode = 0;
|
||||
static CHAR netGeneration = SF_NET_NO;
|
||||
static int OtaCameraFlag = 0;
|
||||
static SF_THREAD_S UpgradeTskParam =
|
||||
{
|
||||
.IsRun = 0,
|
||||
|
@ -3790,3 +3791,15 @@ void sf_cardv_set_battery_level(unsigned long Val)
|
|||
sf_cardv_battery_level_update(batteryVal);
|
||||
// MLOGI("batteryVal:%d batteryType:%d powerVal:%d p:%d\n",batteryVal, batteryType, powerVal,Val);
|
||||
}
|
||||
|
||||
void sf_set_ota_flag(int falg)
|
||||
{
|
||||
OtaCameraFlag = falg;
|
||||
printf("[%s:%d] e OtaCameraFlag:%d\n",__FUNCTION__,__LINE__,OtaCameraFlag);
|
||||
}
|
||||
|
||||
int sf_get_ota_flag(void)
|
||||
{
|
||||
// printf("[%s:%d] s OtaCameraFlag:%d\n",__FUNCTION__,__LINE__,OtaCameraFlag);
|
||||
return OtaCameraFlag;
|
||||
}
|
Loading…
Reference in New Issue
Block a user