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

Merge branch 'wjl_devlop' into 'dev'

合并请求-20240919

See merge request !88
parents 04acf3aa 3d7cd5af
......@@ -393,6 +393,11 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\System\main.h</FilePath>
</File>
<File>
<FileName>Sys_Scheduler_Lib.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\System\Sys_Scheduler_Lib.c</FilePath>
</File>
<File>
<FileName>Sys_Scheduler.c</FileName>
<FileType>1</FileType>
......@@ -403,11 +408,6 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\System\Sys_Scheduler.h</FilePath>
</File>
<File>
<FileName>Sys_Scheduler_Lib.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\System\Sys_Scheduler_Lib.c</FilePath>
</File>
<File>
<FileName>Sys_Scheduler_Lib.h</FileName>
<FileType>5</FileType>
......
This diff is collapsed.
......@@ -22,10 +22,22 @@
#endif /* NULL */
extern Light_uint16_t LightR_Status ;
void Backlight_KL30_Wakeup_Init(void);
void BackLight_Process(void);
Light_uint8_t Backlight_SetPwmLevel(void);
extern void BackLight_Service(void);
extern void BackLight_30_Init(void);
extern void BackLight_15_Init(void);
extern void BackLight_WakeUp_Init(void);
extern void BackLight_Sleep_Init(void);
extern void BackLight_Back_PWM_Init(void);
extern void BackLight_Set_Lvl(Light_uint8_t lvl);
extern void BackLight_Process(void);
extern Light_uint8_t Backlight_GetPwmLevel(void);
......
......@@ -1729,14 +1729,14 @@ void AMT630H_GUI_Display_Mode_Setting(Menu_Item_en_t display_mode) /*图 显示
if(Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO) == 1)
{
g_u8Display_Mode_select = ModeATUO;
if(LightR_Status == 0)
{
g_u8Display_Mode = ModeNIGHT;
}
else if(LightR_Status == 1)
{
g_u8Display_Mode = ModeDAY;
}
// if(LightR_Status == 0)
// {
// g_u8Display_Mode = ModeNIGHT;
// }
// else if(LightR_Status == 1)
// {
// g_u8Display_Mode = ModeDAY;
// }
}
else
{
......@@ -1887,23 +1887,23 @@ void AMT630H_GUI_Backlight_Setting(Menu_Item_en_t back_mode) /*图 背光*/
if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_AUTO))
{
g_u8Backlight_select = Backlight_ATUO ;
if(Backlight_SetPwmLevel() == 5)
if(Backlight_GetPwmLevel() == 5)
{
g_u8Backlight = Backlight_5;
}
else if(Backlight_SetPwmLevel() == 4)
else if(Backlight_GetPwmLevel() == 4)
{
g_u8Backlight = Backlight_4;
}
else if(Backlight_SetPwmLevel() == 3)
else if(Backlight_GetPwmLevel() == 3)
{
g_u8Backlight = Backlight_3;
}
else if(Backlight_SetPwmLevel() == 2)
else if(Backlight_GetPwmLevel() == 2)
{
g_u8Backlight = Backlight_2;
}
else if(Backlight_SetPwmLevel() == 1)
else if(Backlight_GetPwmLevel() == 1)
{
g_u8Backlight = Backlight_1;
}
......@@ -2048,23 +2048,23 @@ void AMT630H_GUI_Backlight_Setting(Menu_Item_en_t back_mode) /*图 背光*/
if(Menu_Item_Select_Get(MENU_ITEM_BACKLIGHT_AUTO))
{
g_u8Backlight_select = Backlight_ATUO ;
if(Backlight_SetPwmLevel() == 5)
if(Backlight_GetPwmLevel() == 5)
{
g_u8Backlight = Backlight_5;
}
else if(Backlight_SetPwmLevel() == 4)
else if(Backlight_GetPwmLevel() == 4)
{
g_u8Backlight = Backlight_4;
}
else if(Backlight_SetPwmLevel() == 3)
else if(Backlight_GetPwmLevel() == 3)
{
g_u8Backlight = Backlight_3;
}
else if(Backlight_SetPwmLevel() == 2)
else if(Backlight_GetPwmLevel() == 2)
{
g_u8Backlight = Backlight_2;
}
else if(Backlight_SetPwmLevel() == 1)
else if(Backlight_GetPwmLevel() == 1)
{
g_u8Backlight = Backlight_1;
}
......
......@@ -55,11 +55,9 @@ static void Power_KL30_Init(void)
Key_KL30_Init_EXample();
Data_User_Mileage_KL30Init();
Fuel_KL30_Init();
Backlight_KL30_Wakeup_Init();
BackLight_30_Init();
Amt630hInit();
Telltales_Init();
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 20000, 64000000);
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
g_stRTCInformation.u8RTCSecond = 0;
g_stRTCInformation.u8RTCMinute = 0;
g_stRTCInformation.u8RTCHour = 0;
......@@ -71,7 +69,7 @@ static void Power_KL30_Init(void)
UDS_Startup_Init();
Can_Init();
Protocol_KL30_Wakeup_Init();
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 500);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
FaultCode_Init();
}
......@@ -92,7 +90,7 @@ static void Power_Wakeup_Init(void)
Key_Wakeup_Init_EXample();
Line_In_KL15_ON_Init();
Fuel_KL30_Init();
Backlight_KL30_Wakeup_Init();
BackLight_WakeUp_Init();
RTE_UART_Sleep_Init(UART_CH2);
loc_config.u32UARTChEn = 1U;
loc_config.u32UARTbps = 115200U;
......@@ -101,8 +99,6 @@ static void Power_Wakeup_Init(void)
UART_DeInit(UART2);
RTE_UART_Init(UART_CH2, &loc_config); /* 配置串口,630H上电发送0x0D,但是底板没回复 */
Amt630hInit();
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 20000, 64000000);
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
Telltales_Init();
Key_KL30_Init_EXample();
Menu_User_WAKEUP();
......@@ -124,7 +120,7 @@ static void Power_OVP_Init(void)
static void Power_IG_OFF_Init(void)
{
Line_In_KL15_OFF_Init();
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
BackLight_15_Init();
}
static void Power_IG_ON_Init(void)
......
......@@ -42,6 +42,7 @@ void Sys_10ms_Tasks(void)
Fuel_R_Cal(10u);
Coolant_R_Cal(10u);
Data_Light_Res_service(10);
BackLight_Process();
}
void Sys_20ms_Tasks(void)
......@@ -52,7 +53,6 @@ void Sys_20ms_Tasks(void)
void Sys_50ms_Tasks(void)
{
BackLight_Service();
Telltales_Management();
UDS_Read_Preconditions();
g_u8Cursor_Posittion = Menu_Get_Current_Cursor_Information();
......
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