Commit a331bed7 authored by 王金亮's avatar 王金亮

🐞 fix:55980 【豪进7500TFT】【电源管理】下15电仪表不熄屏,仪表处于卡死状态

56289 【豪进7500TFT】【显示模式】显示模式切换为自动模式时,仪表卡在开机动画页面
仪表自动模式,下电后未关闭背光
parent c69ec3fd
......@@ -138,64 +138,71 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
}
}
timeCount += deltaTime;
if(Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO))
if(SYS_OPR_STAT_IGN_ON)
{
if(LightADCompleteFlg)
if(Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO))
{
if(LightR <= 800)
if(LightADCompleteFlg)
{
LightR_Status_Count++;
if(LightR_Status_Count>=150)
if(LightR <= 800)
{
LightR_Status_Count++;
if(LightR_Status_Count>=150)
{
LightR_Status_Count = 0;
LightR_Status = 0;
}
}
else if(LightR > 800)
{
LightR_Status_Count++;
if(LightR_Status_Count>=150)
{
LightR_Status_Count = 0;
LightR_Status = 1;
}
}
if(LightR_Status == 0)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
}
else
{
LightR_Status_Count = 0;
LightR_Status = 0;
}
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
}
}
else if(LightR > 800)
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_AUTO))
{
if(Backlight_SetPwmLevel() == 1U)
{
LightR_Status_Count++;
if(LightR_Status_Count>=150)
{
LightR_Status_Count = 0;
LightR_Status = 1;
}
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_1);
}
if(LightR_Status == 0)
else if(Backlight_SetPwmLevel() == 2U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
}
else
else if(Backlight_SetPwmLevel() == 3U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_3);
}
else if(Backlight_SetPwmLevel() == 4U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
}
else if(Backlight_SetPwmLevel() == 5U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
}
}
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_AUTO))
{
if(Backlight_SetPwmLevel() == 1U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_1);
}
else if(Backlight_SetPwmLevel() == 2U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
}
else if(Backlight_SetPwmLevel() == 3U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_3);
}
else if(Backlight_SetPwmLevel() == 4U)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
}
else if(Backlight_SetPwmLevel() == 5U)
else
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
BackLight_Process();
}
}
else
{
BackLight_Process();
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
}
}
......
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