Commit 58afa751 authored by 李冠华's avatar 李冠华

feat:修改混动车型IGN ON状态判断条件

parent 24d341c0
......@@ -51,26 +51,67 @@ void Common_Set_IG_Sts_Valid(DataValid_t Val)
void Common_Input_Para(void)
{
if (SYS_OPR_STAT_IGN_ON)
{
if ((Get_CAN_Power_State() != KEY_OFF) && (System_Indicator_CANFlag != 1))
#if (PART_NUMBER == RMR42E_60)
if (SYS_OPR_STAT_IGN_ON)
{
Common_Set_IG_Sts(COMMON_POWER_ON);
Common_Set_IG_Sts_Valid(COMMON_Valid);
if ((Get_CAN_Power_State() != KEY_OFF) && (System_Indicator_CANFlag != 1))
{
Common_Set_IG_Sts(COMMON_POWER_ON);
Common_Set_IG_Sts_Valid(COMMON_Valid);
PowerIgnOffTimeLine = 0ul;
PowerIgnOffTimeLine = 0ul;
if (PowerIgnOnTimeLine < 0x7ffffffful && (Get_CAN_Power_State() != PKEY_ON))
if (PowerIgnOnTimeLine < 0x7ffffffful && (Get_CAN_Power_State() != PKEY_ON))
{
PowerIgnOnTimeLine += 2u;
}
}
else if (System_Indicator_CANFlag == 1)
{
PowerIgnOnTimeLine += 2u;
Common_Set_IG_Sts(COMMON_POWER_ON);
Common_Set_IG_Sts_Valid(COMMON_Valid);
PowerIgnOffTimeLine = 0ul;
PowerIgnOnTimeLine = 0ul;
}
else
{
PowerIgnOnTimeLine = 0ul;
if (PowerIgnOffTimeLine < 0x7ffffffful)
{
PowerIgnOffTimeLine += 2u;
}
Common_Set_IG_Sts(COMMON_POWER_OFF);
Common_Set_IG_Sts_Valid(COMMON_Valid);
}
if ((Get_CAN_Power_State() == PKEY_ON) || (Power_Stay_Flag == 1))
{
PowerIgnOnTimeLine = 0ul;
Power_Stay_Flag = 0;
}
}
else
{
PowerIgnOnTimeLine = 0ul;
if (PowerIgnOffTimeLine < 0x7ffffffful)
{
PowerIgnOffTimeLine += 2u;
}
Common_Set_IG_Sts(COMMON_POWER_OFF);
Common_Set_IG_Sts_Valid(COMMON_Valid);
}
else if (System_Indicator_CANFlag == 1)
#else
if (SYS_OPR_STAT_IGN_ON)
{
Common_Set_IG_Sts(COMMON_POWER_ON);
Common_Set_IG_Sts_Valid(COMMON_Valid);
PowerIgnOffTimeLine = 0ul;
PowerIgnOnTimeLine = 0ul;
// g_PowerWakeupLineLow = 0UL;
if (PowerIgnOnTimeLine < 0x7ffffffful)
{
PowerIgnOnTimeLine += 2u;
}
}
else
{
......@@ -79,25 +120,21 @@ void Common_Input_Para(void)
{
PowerIgnOffTimeLine += 2u;
}
// if ((RTE_GPIO_Get_Level(WAKEUP_KL15_IN) == 0U) && (g_PowerWakeupLineLow < 0x7ffffffful))
// {
// g_PowerWakeupLineLow += 2UL;
// }
// else if(RTE_GPIO_Get_Level(WAKEUP_KL15_IN) == 1U)
// {
// g_PowerWakeupLineLow = 0UL;
// }
Common_Set_IG_Sts(COMMON_POWER_OFF);
Common_Set_IG_Sts_Valid(COMMON_Valid);
}
if ((Get_CAN_Power_State() == PKEY_ON) || (Power_Stay_Flag == 1))
{
PowerIgnOnTimeLine = 0ul;
Power_Stay_Flag = 0;
}
}
else
{
PowerIgnOnTimeLine = 0ul;
if (PowerIgnOffTimeLine < 0x7ffffffful)
{
PowerIgnOffTimeLine += 2u;
}
Common_Set_IG_Sts(COMMON_POWER_OFF);
Common_Set_IG_Sts_Valid(COMMON_Valid);
}
#endif
}
uint32_t Common_GetIgnOnTime(void)
......
......@@ -104,14 +104,36 @@ monitorlib_uint8_t Sys_Read_KL15_Valid(void)
monitorlib_uint8_t System_LINE_KL15(void)
{
static monitorlib_uint8_t u8KL15 = 0;
if ((Get_CAN_Num_MMCU_PowerMode() != 0x0) || (System_Indicator_CANFlag == 1) )
{
u8KL15 = 1u;
}
else
{
u8KL15 = 0u;
}
#if (PART_NUMBER == RMR42E_60)
if ((Get_CAN_Num_MMCU_PowerMode() != 0x0) || (System_Indicator_CANFlag == 1) )
{
u8KL15 = 1u;
}
else
{
u8KL15 = 0u;
}
#else
if ((Sys_Read_KL15_Voltage() >= 5500u ) && (Sys_Read_KL30_Voltage() >= 5500u))
{
if ((CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x220_Msg)) == CAN_SIG_NORMAL) && (Get_CAN_CH0_ID_220_Sig_VCU_KeySts() == 1U))
{
u8KL15 = 1U;
}
else
{
u8KL15 = 0U;
}
}
else
{
u8KL15 = 0U;
}
#endif
return u8KL15;
}
......
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