Commit f6c58998 authored by 王佳伟's avatar 王佳伟

feat:添加手动调整背光

parent 8dec7321
......@@ -63,7 +63,8 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
uint8_t i, j;
uint32_t temp32;
static uint16_t timeCount = 0;
if(GET_Backlight() == Backlight_ATUO)
{
if (timeCount >= LIGHT_DATA_TIME)
{
timeCount = 0;
......@@ -113,11 +114,11 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
}
}
timeCount += deltaTime;
if(LightADCompleteFlg)
{
if(LightR_Status == 0)
{
if(LightR >20)
{
LightR_Status_Count++;
......@@ -126,6 +127,7 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
{
LightR_Status_Count = 0 ;
}
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 800);
}
else
{
......@@ -137,6 +139,7 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
{
LightR_Status_Count = 0 ;
}
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 200);
}
if(LightR_Status_Count>=150)
......@@ -145,6 +148,13 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
LightR_Status = !LightR_Status;
}
}
}
else
{
BackLight_Process();
}
}
......
......@@ -4064,3 +4064,8 @@ void AMT630H_GUI_ReadPosittion_Display(void)
break;
}
}
uint8_t GET_Backlight(void)
{
return g_u8Backlight;
}
\ No newline at end of file
......@@ -52,7 +52,7 @@ typedef enum
extern void AMT630H_GUI_DisplayProc(void);
extern void AMT630H_GUI_Background(void);
extern uint8_t GET_Backlight(void);
......
......@@ -84,7 +84,7 @@ void Sys_100ms_Tasks(void)
//Data_Mileage_Clear();
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
BackLight_Process();
//BackLight_Process();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
// aaa = Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment