Commit a8dcc61c authored by 李冠华's avatar 李冠华

feat:修改充电连接指示灯触发策略

parent daaee6d3
......@@ -737,6 +737,7 @@ void System_Indicator_OFF_callback(canlib_uint8_t CopyData[])
g_ReadyCount = 0U;
g_PtoSwCount = 0U;
g_SysFltLampCount = 0U;
g_VCUChgModeCount = 0U;
}
uint8_t Get_CAN_CH0_ID_225_Sig_VCU_VoltLow(void)
......
......@@ -548,6 +548,26 @@ void CAN_0x220_Receive(uint8_t CopyData [])
{
g_SysFltLampCount = 0U;
}
if ((Get_CAN_CH0_ID_220_Sig_VCU_ChgMode() == 1U) && (g_VCUChgModeStatus == 0U))
{
if (g_VCUChgModeCount < 3U)
{
g_VCUChgModeCount++;
}
}
else if ((Get_CAN_CH0_ID_220_Sig_VCU_ChgMode() == 0U) && (g_VCUChgModeStatus == 1U))
{
if (g_VCUChgModeCount < 3U)
{
g_VCUChgModeCount++;
}
}
else
{
g_VCUChgModeCount = 0U;
}
#endif
}
......
......@@ -90,6 +90,8 @@ __align(4) uint8_t g_BmsFltStatus[2] = {0U,0U};
__align(4)uint8_t g_BmsFltCount[2] = {0U,0U};
uint8_t g_TOTALSigChargeStatus = 0U;
uint8_t g_TOTALSigChargeCount = 0U;
uint8_t g_VCUChgModeStatus = 0U;
uint8_t g_VCUChgModeCount = 0U;
const LED_Attribute_st LED_Attribute[LED_Max] =
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
......@@ -156,6 +158,8 @@ void Telltales_Init(void)
g_SysFltLampCount = 0U;
g_TOTALSigChargeStatus = 0U;
g_TOTALSigChargeCount = 0U;
g_VCUChgModeStatus = 0U;
g_VCUChgModeCount = 0U;
Telltales_KL30_Wakeup_Init(Tel_Mem, LED_Attribute, &m_ExtPara);
}
......@@ -1178,27 +1182,40 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
LED_STATE = 0;
}
#else
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_220_Sig_VCU_ChgMode();
// Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_220_Sig_VCU_ChgMode();
if (Signal1 == 0x1U)
{
if ((g_TOTALSigChargeStatus == 0U) && (g_TOTALSigChargeCount >= 3U))
{
g_TOTALSigChargeStatus = 1U;
g_TOTALSigChargeCount = 0U;
}
else if ((g_TOTALSigChargeStatus == 1U) && (g_TOTALSigChargeCount >= 3U))
{
g_TOTALSigChargeStatus = 0U;
g_TOTALSigChargeCount = 0U;
}
// if (Signal1 == 0x1U)
// {
// if ((g_TOTALSigChargeStatus == 0U) && (g_TOTALSigChargeCount >= 3U))
// {
// g_TOTALSigChargeStatus = 1U;
// g_TOTALSigChargeCount = 0U;
// }
// else if ((g_TOTALSigChargeStatus == 1U) && (g_TOTALSigChargeCount >= 3U))
// {
// g_TOTALSigChargeStatus = 0U;
// g_TOTALSigChargeCount = 0U;
// }
LED_STATE = (Tellib_uint16_t) g_TOTALSigChargeStatus;
// LED_STATE = (Tellib_uint16_t) g_TOTALSigChargeStatus;
// }
// else
// {
// LED_STATE = 0U;
// }
if ((g_VCUChgModeStatus == 0U) && (g_VCUChgModeCount >= 3U))
{
g_VCUChgModeStatus = 1U;
g_VCUChgModeCount = 0U;
}
else
else if ((g_VCUChgModeStatus == 1U) && (g_VCUChgModeCount >= 3U))
{
LED_STATE = 0U;
g_VCUChgModeStatus = 0U;
g_VCUChgModeCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_VCUChgModeStatus;
#endif
......
......@@ -71,6 +71,8 @@ extern uint8_t g_BmsFltStatus[2];
extern uint8_t g_BmsFltCount[2];
extern uint8_t g_TOTALSigChargeStatus;
extern uint8_t g_TOTALSigChargeCount;
extern uint8_t g_VCUChgModeStatus;
extern uint8_t g_VCUChgModeCount;
// extern Tellib_uint8_t Auto_Start_Stop ;
void Telltales_Init(void);
......
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