Commit cb6f1ae8 authored by 王雅楠's avatar 王雅楠

Merge branch 'dev' of http://tyw-server.synology.me:12345/shihao/haojin750tft into wangyanan

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