Commit 72a7411c authored by 李俭双's avatar 李俭双

🐞 fix:代码评审问题:统一自检时间为3030ms

parent 11c50e9f
...@@ -48,7 +48,7 @@ void BackLight_Process(void) ...@@ -48,7 +48,7 @@ void BackLight_Process(void)
// } // }
//} //}
//if ( LED_Turnon == 5 ) //if ( LED_Turnon == 5 )
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
if (Line_In_Get_Status(LINE_IN_Little_Lamp)) if (Line_In_Get_Status(LINE_IN_Little_Lamp))
{ {
......
...@@ -255,7 +255,7 @@ void Data_Coolant_Temp_Display ( void ) ...@@ -255,7 +255,7 @@ void Data_Coolant_Temp_Display ( void )
{ {
if(SYS_OPR_STAT_IGN_ON) if(SYS_OPR_STAT_IGN_ON)
{ {
if (Common_GetIgnOnTime() < 3000) if (Common_GetIgnOnTime() < 3030)
{ {
DataCoolantTemp_Dis.u8_Uptimer = CoolantSelfCheckFlashtimer; DataCoolantTemp_Dis.u8_Uptimer = CoolantSelfCheckFlashtimer;
DataCoolantTemp_Dis.u8_Downtimer = CoolantSelfCheckFlashtimer; DataCoolantTemp_Dis.u8_Downtimer = CoolantSelfCheckFlashtimer;
......
...@@ -274,7 +274,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime) ...@@ -274,7 +274,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
} }
/*IGN ON 1秒/故障恢复后,开始走格 立即指向当前格 20220704*/ /*IGN ON 1秒/故障恢复后,开始走格 立即指向当前格 20220704*/
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
time += deltaTime; time += deltaTime;
if (FuelInitFlag) if (FuelInitFlag)
......
...@@ -338,7 +338,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage) ...@@ -338,7 +338,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
{ {
uint32_t Num = 0; uint32_t Num = 0;
uint8_t m8 = 0; uint8_t m8 = 0;
if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
IC2_SEG164 = IC_SEG_ON; IC2_SEG164 = IC_SEG_ON;
IC2_SEG165 = IC_SEG_ON; IC2_SEG165 = IC_SEG_ON;
...@@ -677,12 +677,12 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage) ...@@ -677,12 +677,12 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
break; break;
} }
} }
if ((m_Flag && BlueTooth.BLE_St) || (Common_GetIgnOnTime() < 3000) || ClearODO_Flag == 1) if ((m_Flag && BlueTooth.BLE_St) || (Common_GetIgnOnTime() < 3030) || ClearODO_Flag == 1)
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_17_Length2, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_17_Length2, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_18_Length1, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_18_Length1, LED_ON);
if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
IC1_SEG030 = IC_SEG_ON; IC1_SEG030 = IC_SEG_ON;
IC1_SEG130 = IC_SEG_ON; IC1_SEG130 = IC_SEG_ON;
...@@ -713,7 +713,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage) ...@@ -713,7 +713,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
{ {
Num = m_Mileage / 100000; Num = m_Mileage / 100000;
} }
if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} }
...@@ -782,7 +782,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage) ...@@ -782,7 +782,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
if (m_Mileage < 1000) if (m_Mileage < 1000)
{ {
Num = m_Mileage / 100; Num = m_Mileage / 100;
if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} }
...@@ -794,7 +794,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage) ...@@ -794,7 +794,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
else else
{ {
Num = ((m_Mileage + 50) / 100) % 1000 / 100; Num = ((m_Mileage + 50) / 100) % 1000 / 100;
if ((m_Mileage >= 10000) || (ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((m_Mileage >= 10000) || (ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} }
...@@ -863,7 +863,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage) ...@@ -863,7 +863,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
if (m_Mileage < 1000) if (m_Mileage < 1000)
{ {
Num = (m_Mileage / 10) % 10; Num = (m_Mileage / 10) % 10;
if ((m_Mileage >= 10) || (ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((m_Mileage >= 10) || (ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} }
...@@ -1069,7 +1069,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG) ...@@ -1069,7 +1069,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
IC2_SEG102 = IC_SEG_GREY; IC2_SEG102 = IC_SEG_GREY;
IC2_SEG101 = IC_SEG_GREY; IC2_SEG101 = IC_SEG_GREY;
if (((Get_Fuel_Sensor_State() == 2) || (Get_Fuel_Sensor_State() == 1)) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if (((Get_Fuel_Sensor_State() == 2) || (Get_Fuel_Sensor_State() == 1)) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
{ {
...@@ -1097,7 +1097,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG) ...@@ -1097,7 +1097,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
else else
{ {
if ((Get_CurFuelSetp() == 0) && (Common_GetIgnOnTime() >= 3000)) if ((Get_CurFuelSetp() == 0) && (Common_GetIgnOnTime() >= 3030))
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
{ {
...@@ -1115,7 +1115,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG) ...@@ -1115,7 +1115,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
IC2_SEG108 = IC_SEG_ON; IC2_SEG108 = IC_SEG_ON;
IC2_SEG100 = IC_SEG_ON; IC2_SEG100 = IC_SEG_ON;
} }
if ((Get_CurFuelSetp() == 1) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((Get_CurFuelSetp() == 1) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
IC2_SEG108 = IC_SEG_ON; IC2_SEG108 = IC_SEG_ON;
IC2_SEG100 = IC_SEG_ON; IC2_SEG100 = IC_SEG_ON;
...@@ -1355,7 +1355,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t ...@@ -1355,7 +1355,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
uint8_t m8; uint8_t m8;
if (m_Flag == 1u) if (m_Flag == 1u)
{ {
if ((m_flash == 0) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((m_flash == 0) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
{ {
...@@ -1400,7 +1400,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t ...@@ -1400,7 +1400,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
default: default:
break; break;
} }
if ((m_flash == 0) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((m_flash == 0) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
IC1_SEG128 = IC_SEG_OFF; IC1_SEG128 = IC_SEG_OFF;
IC1_SEG125 = IC_SEG_OFF; IC1_SEG125 = IC_SEG_OFF;
...@@ -1612,7 +1612,7 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit) ...@@ -1612,7 +1612,7 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
RTE_GPIO_Set_Level(VSpeed_Hundreds, 0); RTE_GPIO_Set_Level(VSpeed_Hundreds, 0);
} }
if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
if (Get_Current_PageType() == Page_Km_Unit) if (Get_Current_PageType() == Page_Km_Unit)
{ {
...@@ -1847,7 +1847,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM) ...@@ -1847,7 +1847,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
{ {
IC1_SEG079 = IC_SEG_ON; IC1_SEG079 = IC_SEG_ON;
IC1_SEG086 = IC_SEG_ON; IC1_SEG086 = IC_SEG_ON;
if ((Get_Battery_Voltage_Valid() != 1) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((Get_Battery_Voltage_Valid() != 1) && (ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
IC1_SEG088 = IC_SEG_ON; IC1_SEG088 = IC_SEG_ON;
...@@ -1876,7 +1876,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM) ...@@ -1876,7 +1876,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
else else
{ {
Num = m_NUM / 100; Num = m_NUM / 100;
if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() <= 3000)) if ((ClearODO_Flag == 1) || (Common_GetIgnOnTime() <= 3030))
{ {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} }
...@@ -2091,7 +2091,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint ...@@ -2091,7 +2091,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
{ {
IC2_SEG142 = IC_SEG_ON; IC2_SEG142 = IC_SEG_ON;
IC2_SEG122 = IC_SEG_ON; IC2_SEG122 = IC_SEG_ON;
if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
//if (Get_Current_PageType() == Page_Tpms_Unit) //if (Get_Current_PageType() == Page_Tpms_Unit)
//{ //{
...@@ -3341,7 +3341,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint ...@@ -3341,7 +3341,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
uint8_t m8; uint8_t m8;
RTE_GPIO_Set_Level(ODO_TenThousand, 1); RTE_GPIO_Set_Level(ODO_TenThousand, 1);
RTE_GPIO_Set_Level(ODO_Thousand, 1); RTE_GPIO_Set_Level(ODO_Thousand, 1);
if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000)) if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3030))
{ {
if ((Get_Current_PageType() == Page_Km_Unit) && ((Get_Current_PageMenu() == Page_Odo) || (Get_Current_PageMenu() == Page_Trip))) if ((Get_Current_PageType() == Page_Km_Unit) && ((Get_Current_PageMenu() == Page_Odo) || (Get_Current_PageMenu() == Page_Trip)))
{ {
...@@ -3431,7 +3431,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint ...@@ -3431,7 +3431,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
LED_Driver_Channel_Set(LampChannel_0, LampCh0_34_TRIP, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_34_TRIP, LED_ON);
} }
if ((Get_Current_PageMenu() == Page_Odo) || (ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3000)) if ((Get_Current_PageMenu() == Page_Odo) || (ClearODO_Flag == 1) || (Common_GetIgnOnTime() < 3030))
{ {
if (m_NUM_ODO > 99999) if (m_NUM_ODO > 99999)
{ {
......
...@@ -28,14 +28,14 @@ void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode ...@@ -28,14 +28,14 @@ void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode
switch (enKeyEvent) switch (enKeyEvent)
{ {
case KEY_EVENT_SHORT_PRESS_1://1s case KEY_EVENT_SHORT_PRESS_1://1s
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
Key_Left_Short_Press(); Key_Left_Short_Press();
} }
Key_Clear_Time(); Key_Clear_Time();
break; break;
case KEY_EVENT_SHORT_PRESS_2://3-5s case KEY_EVENT_SHORT_PRESS_2://3-5s
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
Key_Left_Long_Press(); Key_Left_Long_Press();
} }
...@@ -48,7 +48,7 @@ void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode ...@@ -48,7 +48,7 @@ void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode
case KEY_EVENT_LONG_PRESS_3: //9s case KEY_EVENT_LONG_PRESS_3: //9s
break; break;
case KEY_EVENT_LONG_PRESS_4: //10s case KEY_EVENT_LONG_PRESS_4: //10s
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
Maintain_Reset_Service(); Maintain_Reset_Service();
......
...@@ -227,7 +227,7 @@ static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status) ...@@ -227,7 +227,7 @@ static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Fuel_Judgement(void) static Tellib_uint16_t LED_Fuel_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3030)
{ {
if(Get_Fuel_Sensor_State() == FuelSensorNormal) if(Get_Fuel_Sensor_State() == FuelSensorNormal)
{ {
...@@ -763,7 +763,7 @@ void Turn_Left_Right_Lamp(void) ...@@ -763,7 +763,7 @@ void Turn_Left_Right_Lamp(void)
{ {
if ( SYS_OPR_STAT_IGN_ON ) if ( SYS_OPR_STAT_IGN_ON )
{ {
if ((Common_GetIgnOnTime() >= 3000) && (ClearODO_Flag == 0)) if ((Common_GetIgnOnTime() >= 3030) && (ClearODO_Flag == 0))
{ {
if (Line_In_Get_Status(LINE_IN_TurnLeft)) if (Line_In_Get_Status(LINE_IN_TurnLeft))
{ {
......
...@@ -43,7 +43,7 @@ void Sys_5ms_Tasks(void) ...@@ -43,7 +43,7 @@ void Sys_5ms_Tasks(void)
void Sys_10ms_Tasks(void) void Sys_10ms_Tasks(void)
{ {
Line_In_Debounce_Service(10u); Line_In_Debounce_Service(10u);
if(Common_GetIgnOnTime() >= 3000) if(Common_GetIgnOnTime() >= 3030)
{ {
Key_Service(); Key_Service();
} }
......
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