Commit 4f2a15be authored by 张金硕's avatar 张金硕

Merge branch 'wjl_dev' into 'dev'

合并请求

See merge request !47
parents f9a50e29 991636c4
......@@ -1018,6 +1018,11 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath>
</File>
<File>
<FileName>System_Monitor.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.lib</FilePath>
</File>
</Files>
</Group>
<Group>
......
......@@ -78,7 +78,8 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
LightRes += 5;
}
}
else
timeCount += deltaTime;
if(LightADCompleteFlg)
{
LightRes = 32000;
}
......@@ -142,7 +143,6 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 800);
}
}
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_AUTO))
{
......@@ -169,9 +169,8 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
}
else
{
BackLight_Process();
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
}
}
......@@ -257,10 +256,10 @@ Light_uint8_t Backlight_SetPwmLevel(void)
}
/* 获取电阻值回调函数 */
Light_uint8_t Backlight_NtcRes(void)
Light_uint16_t Backlight_NtcRes(void)
{
return 1;
Light_uint16_t u8NtcRes = ADC_Read_Signal(ADC_CH_NTC_TEMP);
return u8NtcRes;
}
void Backlight_Init(BackLightExtPara *backlightInit)
......@@ -535,28 +534,35 @@ void BackLight_Service(void)
void BackLight_Process(void)
{
if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_5) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_4) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_3) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_3);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_2) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_1) == 1)
if(SYS_OPR_STAT_IGN_ON)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_1);
if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_5) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_5);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_4) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_3) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_3);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_2) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_2);
}
else if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_1) == 1)
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_1);
}
else
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
}
}
else
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_Val_4);
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
}
}
......@@ -54,6 +54,7 @@ static void Power_KL30_Init(void)
Key_KL30_Init_EXample();
Data_User_Mileage_KL30Init();
Fuel_KL30_Init();
Backlight_KL30_Wakeup_Init();
Amt630hInit();
Telltales_Init();
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 20000, 64000000);
......@@ -87,6 +88,7 @@ static void Power_Wakeup_Init(void)
Key_Wakeup_Init_EXample();
Line_In_KL15_ON_Init();
Fuel_KL30_Init();
Backlight_KL30_Wakeup_Init();
Amt630hInit();
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 20000, 64000000);
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
......@@ -122,6 +124,8 @@ static void Power_IG_ON_Init(void)
Fuel_KL15_Init();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init();
Amt630hInit();
ResetInitedState();
}
static void Power_Sleep_Init(void)
......@@ -173,6 +177,10 @@ static Power_Status_em Power_Stay_OFF(void)
{
u8PowerSts = EM_IGN_OFF;
}
else
{
u8PowerSts = EM_IGN_Sleep_Init;
}
}
return u8PowerSts;
......
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