1.led限制

This commit is contained in:
payton 2023-11-17 15:40:32 +08:00
parent 5478299e7b
commit 8d380867e8

View File

@ -1427,6 +1427,7 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg)
UINT32 max_cnt = 0; UINT32 max_cnt = 0;
BOOL start_cap = FALSE; BOOL start_cap = FALSE;
BOOL stop_flag = FALSE; BOOL stop_flag = FALSE;
BOOL led_flag = FALSE;
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
UIMenuStoreInfo *puiPara = sf_ui_para_get(); UIMenuStoreInfo *puiPara = sf_ui_para_get();
@ -1547,7 +1548,7 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg)
VOS_TICK t1, t2; VOS_TICK t1, t2;
UINT32 duration; UINT32 duration;
UINT32 led_delay = 170; UINT32 led_delay = 170;
led_flag = FALSE;
vos_perf_mark(&t1); vos_perf_mark(&t1);
/************************************************** /**************************************************
@ -1566,7 +1567,8 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg)
if((duration >= period) ||((period - duration) <= (led_delay + 17)) if((duration >= period) ||((period - duration) <= (led_delay + 17))
){ ){
if(sf_is_night_mode(0) ==TRUE){ if((FALSE == led_flag) && (sf_is_night_mode(0) ==TRUE)){
led_flag = TRUE;
sf_ir_led_set(((2 == puiPara->NightMode) ? 2 : 1),puiPara->FlashLed, puiPara->NightMode,0); sf_ir_led_set(((2 == puiPara->NightMode) ? 2 : 1),puiPara->FlashLed, puiPara->NightMode,0);
} }