Commit c9bfe9bc authored by 李俭双's avatar 李俭双

Merge branch 'dev' of http://tyw-server.synology.me:12345/ty/tianying_ty100 into lijianshuang

parents 0c2dc6b2 5079da12
...@@ -18,7 +18,7 @@ User definitions ...@@ -18,7 +18,7 @@ User definitions
typedef unsigned short MD_STATUS; typedef unsigned short MD_STATUS;
#define HAS_BOOTLOADER (1u) // 仅仿真App时设置为0 #define HAS_BOOTLOADER (0u) // 仅仿真App时设置为0
#define APP_BASE (0x00008000ul) #define APP_BASE (0x00008000ul)
/* Status list definition */ /* Status list definition */
......
...@@ -19,31 +19,32 @@ void BackLight_Process(void) ...@@ -19,31 +19,32 @@ void BackLight_Process(void)
{ {
if (SYS_OPR_STAT_IGN_ON) if (SYS_OPR_STAT_IGN_ON)
{ {
if(ALS_Get_Data1() > 200)//data1 500以内,data0 3000以内 // if(ALS_Get_Data1() > 200)//data1 500以内,data0 3000以内
{ // {
if (g_Light.Light_Day < 15)//1.5s 1500ms // if (g_Light.Light_Day < 15)//1.5s 1500ms
{ // {
g_Light.Light_Day++;//100ms // g_Light.Light_Day++;//100ms
} // }
else // else
{ // {
g_Light.Light_Night = 0; // g_Light.Light_Night = 0;
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_DAY);
// }
// }
// else
// {
// if (g_Light.Light_Night < 15)
// {
// g_Light.Light_Night++;
// }
// else
// {
// g_Light.Light_Day = 0;
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_NIGHT);
// }
// }
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_DAY); TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_DAY);
} }
}
else
{
if (g_Light.Light_Night < 15)
{
g_Light.Light_Night++;
}
else
{
g_Light.Light_Day = 0;
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_NIGHT);
}
}
}
else else
{ {
g_Light.Light_Day = 0; g_Light.Light_Day = 0;
......
...@@ -1646,7 +1646,7 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM) ...@@ -1646,7 +1646,7 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM)
{ {
IC1_SEG059 = IC_SEG_ON; IC1_SEG059 = IC_SEG_ON;
IC1_SEG058 = IC_SEG_ON; IC1_SEG058 = IC_SEG_ON;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100); //LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100); // LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100);
} }
else else
...@@ -1655,7 +1655,7 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM) ...@@ -1655,7 +1655,7 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM)
{ {
IC1_SEG059 = IC_SEG_ON; IC1_SEG059 = IC_SEG_ON;
IC1_SEG058 = IC_SEG_ON; IC1_SEG058 = IC_SEG_ON;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100); //LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100); //LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100);
} }
else else
...@@ -1664,14 +1664,14 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM) ...@@ -1664,14 +1664,14 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM)
{ {
IC1_SEG059 = IC_SEG_OFF; IC1_SEG059 = IC_SEG_OFF;
IC1_SEG058 = IC_SEG_ON; IC1_SEG058 = IC_SEG_ON;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100); //LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0); // LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0);
} }
else else
{ {
IC1_SEG059 = IC_SEG_ON; IC1_SEG059 = IC_SEG_ON;
IC1_SEG058 = IC_SEG_OFF; IC1_SEG058 = IC_SEG_OFF;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0); //LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100); // LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100);
} }
} }
......
...@@ -76,14 +76,14 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//Set ...@@ -76,14 +76,14 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//Set
Key_Status_en_t Key_Status_Read_Left(void) Key_Status_en_t Key_Status_Read_Left(void)
{ {
Key_Status_en_t enKeyReal = KEY_REALTIME_LOOSEN; Key_Status_en_t enKeyReal = KEY_REALTIME_LOOSEN;
//if (RTE_GPIO_Get_Level(MODE_P_IN)) if (RTE_GPIO_Get_Level(Key_MCU_IN))
//{ {
// enKeyReal = KEY_REALTIME_LOOSEN; enKeyReal = KEY_REALTIME_LOOSEN;
//} }
//else else
//{ {
// enKeyReal = KEY_REALTIME_PRESS; enKeyReal = KEY_REALTIME_PRESS;
//} }
return enKeyReal; return enKeyReal;
} }
Key_Status_en_t Key_Status_Read_Right(void) Key_Status_en_t Key_Status_Read_Right(void)
......
...@@ -78,7 +78,7 @@ static void Power_KL30_Init(void) ...@@ -78,7 +78,7 @@ static void Power_KL30_Init(void)
g_stRTCInformation.u8RTCDayOfMonth = 1; g_stRTCInformation.u8RTCDayOfMonth = 1;
g_stRTCInformation.u8RTCMonth = 1; g_stRTCInformation.u8RTCMonth = 1;
g_stRTCInformation.u8RTCYear = 20; g_stRTCInformation.u8RTCYear = 20;
RTE_RTC_Init(g_stRTCInformation); //RTE_RTC_Init(g_stRTCInformation);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising); RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
} }
......
...@@ -69,12 +69,12 @@ void Sys_50ms_Tasks(void) ...@@ -69,12 +69,12 @@ void Sys_50ms_Tasks(void)
uint8_t u8LEDDriverCheckCount = 0U; uint8_t u8LEDDriverCheckCount = 0U;
void Sys_100ms_Tasks(void) void Sys_100ms_Tasks(void)
{ {
if((PageType != Page_Time_Hour)&&(PageType != Page_Time_Minute)) // if((PageType != Page_Time_Hour)&&(PageType != Page_Time_Minute))
{ // {
RTE_RTC_Get_CounterValue(&counter_val); // RTE_RTC_Get_CounterValue(&counter_val);
counter_val.time.RTC_Hours = RTC_Bcd2ToByte(counter_val.time.RTC_Hours); // counter_val.time.RTC_Hours = RTC_Bcd2ToByte(counter_val.time.RTC_Hours);
counter_val.time.RTC_Minutes = RTC_Bcd2ToByte(counter_val.time.RTC_Minutes); // counter_val.time.RTC_Minutes = RTC_Bcd2ToByte(counter_val.time.RTC_Minutes);
} // }
Fuel_Cal_Sevice(100u); Fuel_Cal_Sevice(100u);
BackLight_Process(); BackLight_Process();
Services_Mileage_Callback(); Services_Mileage_Callback();
......
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