Commit c0dba78e authored by 高士达's avatar 高士达

Merge branch 'lgh_from_dev' into 'dev'

Lgh from dev

See merge request !32
parents 04733537 770b9f88
...@@ -183,6 +183,7 @@ void BackLight_Process(void) ...@@ -183,6 +183,7 @@ void BackLight_Process(void)
void BackLight_Clock_All_Process(void) void BackLight_Clock_All_Process(void)
{ {
#if (PART_NUMBER == RMR42E_60)
if (openLED_flag && (Charge_OFF_Flag == 0)) if (openLED_flag && (Charge_OFF_Flag == 0))
{ {
//总计时间 //总计时间
...@@ -208,6 +209,18 @@ void BackLight_Clock_All_Process(void) ...@@ -208,6 +209,18 @@ void BackLight_Clock_All_Process(void)
RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN05, RTE_GPIO_LEVEL_LOW); //总计工作时长统计千位_MCU_OUT RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN05, RTE_GPIO_LEVEL_LOW); //总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN06, RTE_GPIO_LEVEL_LOW); //总计工作时长统计百十位_MCU_OUT RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN06, RTE_GPIO_LEVEL_LOW); //总计工作时长统计百十位_MCU_OUT
} }
#else
if (Get_CAN_Power_State() == KEY_ACC)
{
RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN05, RTE_GPIO_LEVEL_HIGH); //总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN06, RTE_GPIO_LEVEL_HIGH); //总计工作时长统计百十位_MCU_OUT
}
else
{
RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN05, RTE_GPIO_LEVEL_LOW); //总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level(RTE_GPIO_PORT01_PIN06, RTE_GPIO_LEVEL_LOW); //总计工作时长统计百十位_MCU_OUT
}
#endif
} }
void Interact_Light_Process(void) void Interact_Light_Process(void)
......
...@@ -557,7 +557,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -557,7 +557,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
0x339ul, 0x339ul,
(( void * )0), (( void * )0),
(CAN_0x339_Receive), (CAN_0x339_Receive),
(( void * )0), (CAN_0x339_Lost_CallBack),
}, },
{ {
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
...@@ -607,7 +607,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -607,7 +607,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
0x17Aul, 0x17Aul,
(( void * )0), (( void * )0),
(CAN_0x17A_Receive), (CAN_0x17A_Receive),
(( void * )0), (CAN_0x17A_Lost_CallBack),
}, },
{ {
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
......
#include "Can_App.h" #include "Can_App.h"
uint8_t Msg0x17ALostFlag = 0U;
uint8_t Msg0x38ELostFlag = 0U;
uint8_t Msg0x339LostFlag = 0U;
void Can_Set_Buff_3A2(canlib_uint8_t CopyData[]) void Can_Set_Buff_3A2(canlib_uint8_t CopyData[])
{ {
...@@ -136,8 +139,30 @@ void Can_Set_Buff_3D4(canlib_uint8_t CopyData[]) ...@@ -136,8 +139,30 @@ void Can_Set_Buff_3D4(canlib_uint8_t CopyData[])
if (p3D4 != (void *)0) if (p3D4 != (void *)0)
{ {
p3D4->Sig.ICU_MasterBMSCommunicatlost = 0; p3D4->Sig.ICU_MasterBMSCommunicatlost = 0;
if (Msg0x17ALostFlag)
{
p3D4->Sig.ICU_SlaveBMSCommunicatlost = 1U;
}
else
{
p3D4->Sig.ICU_SlaveBMSCommunicatlost = 0; p3D4->Sig.ICU_SlaveBMSCommunicatlost = 0;
}
if (Msg0x339LostFlag)
{
p3D4->Sig.ICU_MCUCommunicatlost = 1U;
}
else
{
p3D4->Sig.ICU_MCUCommunicatlost = 0; p3D4->Sig.ICU_MCUCommunicatlost = 0;
}
if (Msg0x38ELostFlag)
{
p3D4->Sig.ICU_BMCUCommunicatlost = 1U;
}
else
{
p3D4->Sig.ICU_BMCUCommunicatlost = 0;
}
p3D4->Sig.ICU_VCUCommunicatlost = 0; p3D4->Sig.ICU_VCUCommunicatlost = 0;
p3D4->Sig.Res0 = 0x0; p3D4->Sig.Res0 = 0x0;
p3D4->Sig.Res1 = 0x00; p3D4->Sig.Res1 = 0x00;
...@@ -147,6 +172,7 @@ void Can_Set_Buff_3D4(canlib_uint8_t CopyData[]) ...@@ -147,6 +172,7 @@ void Can_Set_Buff_3D4(canlib_uint8_t CopyData[])
p3D4->Sig.Res5 = 0x00; p3D4->Sig.Res5 = 0x00;
p3D4->Sig.Res6 = 0x00; p3D4->Sig.Res6 = 0x00;
p3D4->Sig.Res7 = 0x00; p3D4->Sig.Res7 = 0x00;
p3D4->Sig.Res8 = 0x00;
} }
#endif #endif
} }
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#include "Application.h" #include "Application.h"
#include "Components.h" #include "Components.h"
extern uint8_t Msg0x17ALostFlag;
extern uint8_t Msg0x38ELostFlag;
extern uint8_t Msg0x339LostFlag;
void Can_Set_Buff_3A2(canlib_uint8_t CopyData[]); void Can_Set_Buff_3A2(canlib_uint8_t CopyData[]);
void Can_Set_Buff_3A7(canlib_uint8_t CopyData[]); void Can_Set_Buff_3A7(canlib_uint8_t CopyData[]);
void Can_Set_Buff_393(canlib_uint8_t CopyData[]); void Can_Set_Buff_393(canlib_uint8_t CopyData[]);
...@@ -119,14 +123,24 @@ typedef union ...@@ -119,14 +123,24 @@ typedef union
uint8_t ICU_SlaveBMSCommunicatlost : 1; uint8_t ICU_SlaveBMSCommunicatlost : 1;
uint8_t ICU_MCUCommunicatlost : 1; uint8_t ICU_MCUCommunicatlost : 1;
uint8_t ICU_VCUCommunicatlost : 1; uint8_t ICU_VCUCommunicatlost : 1;
uint8_t Res0: 4; uint8_t Res0: 2;
uint8_t ICU_BMCUCommunicatlost: 1;
uint8_t Res8: 1;
uint8_t Res1: 8; uint8_t Res1: 8;
uint8_t Res2: 8; uint8_t Res2: 8;
uint8_t Res3: 8; uint8_t Res3: 8;
uint8_t Res4: 8; uint8_t Res4: 8;
uint8_t Res5: 8; uint8_t Res5: 8;
uint8_t Res6 : 8; uint8_t Res6 : 8;
uint8_t Res7 : 8; uint8_t Res7 : 8;
} Sig; } Sig;
......
...@@ -413,6 +413,8 @@ void CAN_0x38E_Receive(uint8_t CopyData []) ...@@ -413,6 +413,8 @@ void CAN_0x38E_Receive(uint8_t CopyData [])
} }
} }
Msg0x38ELostFlag = 0U;
#endif #endif
} }
...@@ -672,11 +674,13 @@ void CAN_0x170_Receive(uint8_t CopyData []) ...@@ -672,11 +674,13 @@ void CAN_0x170_Receive(uint8_t CopyData [])
void CAN_0x339_Receive(uint8_t CopyData []) void CAN_0x339_Receive(uint8_t CopyData [])
{ {
g_u8ID339flag = 1U; g_u8ID339flag = 1U;
Msg0x339LostFlag = 0U;
} }
void CAN_0x17A_Receive(uint8_t CopyData []) void CAN_0x17A_Receive(uint8_t CopyData [])
{ {
g_Msg0x17AFlag = 1U; g_Msg0x17AFlag = 1U;
Msg0x17ALostFlag = 0U;
} }
void CAN_0x18E_Lost_CallBack(uint8_t CopyData []) void CAN_0x18E_Lost_CallBack(uint8_t CopyData [])
...@@ -703,6 +707,7 @@ void CAN_0x38E_Lost_CallBack(uint8_t CopyData []) ...@@ -703,6 +707,7 @@ void CAN_0x38E_Lost_CallBack(uint8_t CopyData [])
{ {
g_OverLoadCount[i] = 0U; g_OverLoadCount[i] = 0U;
} }
Msg0x38ELostFlag = 1U;
} }
void CAN_0x16B_Lost_CallBack(uint8_t CopyData []) void CAN_0x16B_Lost_CallBack(uint8_t CopyData [])
...@@ -720,4 +725,13 @@ void CAN_0x170_Lost_CallBack(uint8_t CopyData []) ...@@ -720,4 +725,13 @@ void CAN_0x170_Lost_CallBack(uint8_t CopyData [])
g_TOTALSigChargeCount = 0U; g_TOTALSigChargeCount = 0U;
} }
void CAN_0x17A_Lost_CallBack(uint8_t CopyData [])
{
Msg0x17ALostFlag = 1U;
}
void CAN_0x339_Lost_CallBack(uint8_t CopyData [])
{
Msg0x339LostFlag = 1U;
}
...@@ -55,5 +55,8 @@ extern void CAN_0x38E_Lost_CallBack(uint8_t CopyData []); ...@@ -55,5 +55,8 @@ extern void CAN_0x38E_Lost_CallBack(uint8_t CopyData []);
extern void CAN_0x16B_Lost_CallBack(uint8_t CopyData []); extern void CAN_0x16B_Lost_CallBack(uint8_t CopyData []);
extern void CAN_0x22F_Lost_CallBack(uint8_t CopyData []); extern void CAN_0x22F_Lost_CallBack(uint8_t CopyData []);
extern void CAN_0x170_Lost_CallBack(uint8_t CopyData []); extern void CAN_0x170_Lost_CallBack(uint8_t CopyData []);
extern void CAN_0x17A_Lost_CallBack(uint8_t CopyData []);
extern void CAN_0x339_Lost_CallBack(uint8_t CopyData []);
#endif #endif
...@@ -6,6 +6,7 @@ SocStruct_st_t Soc; ...@@ -6,6 +6,7 @@ SocStruct_st_t Soc;
uint8_t SOC_Count_Time = 0; uint8_t SOC_Count_Time = 0;
uint8_t g_Msg0x17AFlag = 0U; uint8_t g_Msg0x17AFlag = 0U;
uint16_t SocPoweroffTime = 0; uint16_t SocPoweroffTime = 0;
uint8_t g_SOCChargingState = 0U;
static void Data_Soc_Battery_Level_Service(void); static void Data_Soc_Battery_Level_Service(void);
static void Data_Soc_DisplayEffect_Service(void); static void Data_Soc_DisplayEffect_Service(void);
...@@ -28,6 +29,7 @@ void Data_Soc_KL30_Init(void) ...@@ -28,6 +29,7 @@ void Data_Soc_KL30_Init(void)
Soc.AllSocValid = 0U; Soc.AllSocValid = 0U;
SocPoweroffTime = 0U; SocPoweroffTime = 0U;
g_Msg0x17AFlag = 0U; g_Msg0x17AFlag = 0U;
g_SOCChargingState = 0U;
} }
void Data_Soc_KL15_Init(void) void Data_Soc_KL15_Init(void)
...@@ -356,15 +358,34 @@ static void Data_Soc_DisplayEffect_Service(void) ...@@ -356,15 +358,34 @@ static void Data_Soc_DisplayEffect_Service(void)
if (VCUChgMode == 1U) if (VCUChgMode == 1U)
{ {
if (++SOC_Count_Time > 10U) /*----------电量条充电流水效果(功能删除)----------------*/
{ // if (++SOC_Count_Time > 10U)
SOC_Count_Time = 0U; // {
Soc.Dis_Seg1 ++; // SOC_Count_Time = 0U;
if (Soc.Dis_Seg1 > Soc.Act_Seg1) // Soc.Dis_Seg1 ++;
{ // if (Soc.Dis_Seg1 > Soc.Act_Seg1)
Soc.Dis_Seg1 = 0U; // {
} // Soc.Dis_Seg1 = 0U;
} // }
// }
// if (Get_CAN_Power_State() == PKEY_ON)
// {
// if (SocPoweroffTime >= 3600U)
// {
// Soc.Valid1 = 0U;
// }
// else
// {
// SocPoweroffTime ++;
// }
// }
// else if(Get_CAN_Power_State() == KEY_OFF)
// {
// Soc.Valid1 = 0U;
// }
/*------------------------------------------------------*/
Soc.Dis_Seg1 = Soc.Act_Seg1;
g_SOCChargingState = 1U;
if (Get_CAN_Power_State() == PKEY_ON) if (Get_CAN_Power_State() == PKEY_ON)
{ {
if (SocPoweroffTime >= 3600U) if (SocPoweroffTime >= 3600U)
...@@ -380,9 +401,11 @@ static void Data_Soc_DisplayEffect_Service(void) ...@@ -380,9 +401,11 @@ static void Data_Soc_DisplayEffect_Service(void)
{ {
Soc.Valid1 = 0U; Soc.Valid1 = 0U;
} }
} }
else else
{ {
g_SOCChargingState = 0U;
if (Get_CAN_Power_State() == KEY_ACC) if (Get_CAN_Power_State() == KEY_ACC)
{ {
Soc.Dis_Seg1 = Soc.Act_Seg1; Soc.Dis_Seg1 = Soc.Act_Seg1;
...@@ -692,3 +715,16 @@ uint8_t Get_EleDial_AllSOC_lenth(void) ...@@ -692,3 +715,16 @@ uint8_t Get_EleDial_AllSOC_lenth(void)
} }
return num; return num;
} }
/******************************************************************************
函数名:Get_SOC_Charging_State
功 能:获取充电状态状态函数
参 数:无
返回值:_SOCChargingState 0--非充电,1--充电
******************************************************************************
注 意:该函数必须每 ms被调用一次
******************************************************************************/
uint8_t Get_SOC_Charging_State(void)
{
return g_SOCChargingState;
}
...@@ -52,6 +52,7 @@ extern uint8_t Get_Soc2_Battery_Icon(void); ...@@ -52,6 +52,7 @@ extern uint8_t Get_Soc2_Battery_Icon(void);
extern uint8_t Get_AllSocValue(void); extern uint8_t Get_AllSocValue(void);
extern uint8_t Get_AllSocValid(void); extern uint8_t Get_AllSocValid(void);
extern uint8_t Get_EleDial_AllSOC_lenth(void); extern uint8_t Get_EleDial_AllSOC_lenth(void);
extern uint8_t Get_SOC_Charging_State(void);
#endif #endif
...@@ -81,6 +81,12 @@ void Data_Time_Single_Working_Hours(void) ...@@ -81,6 +81,12 @@ void Data_Time_Single_Working_Hours(void)
Time.KeepTimeCount ++; Time.KeepTimeCount ++;
Time.SingleHourHistory = Time.SingleHour; Time.SingleHourHistory = Time.SingleHour;
} }
/*每6小时再多补偿1s*/
if (((Time.SingleHour % 6U) == 0U) && (Time.SingleHour != 0U))
{
Time.KeepTimeCount ++;
}
} }
else else
{ {
......
...@@ -162,7 +162,7 @@ void Gauge_faultcode_Display(void) ...@@ -162,7 +162,7 @@ void Gauge_faultcode_Display(void)
uint16_t u16faucodelValue = Get_FaultCode_Value(); uint16_t u16faucodelValue = Get_FaultCode_Value();
uint8_t u8FaultCodeNum = Get_FaultCode_Num(); uint8_t u8FaultCodeNum = Get_FaultCode_Num();
SEG_SET_Fault_Code(u8faucodeValid, u16faucodelValue, 0); SEG_SET_Fault_Code(u8faucodeValid, u16faucodelValue, 0);
SEG_SET_Fault_Code_Spanner(u8faucodeValid, 0, u8FaultCodeNum); SEG_SET_Fault_Code_Spanner(u8faucodeValid, 0, u8faucodeValid);
} }
void Clear_Bu98(void) void Clear_Bu98(void)
......
...@@ -703,7 +703,7 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG) ...@@ -703,7 +703,7 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG)
#if (PART_NUMBER == RMR42E_60) #if (PART_NUMBER == RMR42E_60)
if ((m_SEG == 1) && (Common_GetIgnOnTime() >= 1500) && (SOC_charge_seg_Flag != 1)) if ((m_SEG == 1) && (Common_GetIgnOnTime() >= 1500) && (SOC_charge_seg_Flag != 1))
#else #else
if ((m_SEG == 1) && (Common_GetIgnOnTime() >= 1500) && (SOC_charge_seg_Flag != 1) && (Get_CAN_CH0_ID_220_Sig_VCU_ChgMode() != 1U)) if ((m_SEG == 1) && (Common_GetIgnOnTime() >= 1500) && (Get_SOC_Charging_State() != 1U))
#endif #endif
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
...@@ -717,7 +717,7 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG) ...@@ -717,7 +717,7 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG)
} }
else else
{ {
switch (m_SEG) switch (m_SEG - 1U)
{ {
case 10u: case 10u:
...@@ -745,6 +745,157 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG) ...@@ -745,6 +745,157 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG)
default: default:
break; break;
} }
if (Get_SOC_Charging_State() == 1U)
{
switch (m_SEG)
{
case 10u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG136 = IC_SEG_ON;
}
else
{
IC1_SEG136 = IC_SEG_GREY;
}
break;
case 9u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG137 = IC_SEG_ON;
}
else
{
IC1_SEG137 = IC_SEG_GREY;
}
break;
case 8u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG138 = IC_SEG_ON;
}
else
{
IC1_SEG138 = IC_SEG_GREY;
}
break;
case 7u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG143 = IC_SEG_ON;
}
else
{
IC1_SEG143 = IC_SEG_GREY;
}
break;
case 6u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG144 = IC_SEG_ON;
}
else
{
IC1_SEG144 = IC_SEG_GREY;
}
break;
case 5u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG145 = IC_SEG_ON;
}
else
{
IC1_SEG145 = IC_SEG_GREY;
}
break;
case 4u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG146 = IC_SEG_ON;
}
else
{
IC1_SEG146 = IC_SEG_GREY;
}
break;
case 3u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG147 = IC_SEG_ON;
}
else
{
IC1_SEG147 = IC_SEG_GREY;
}
break;
case 2u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG148 = IC_SEG_ON;
}
else
{
IC1_SEG148 = IC_SEG_GREY;
}
break;
case 1u:
if (FLASH_SYNC_1Hz)
{
IC1_SEG135 = IC_SEG_ON;
}
else
{
IC1_SEG135 = IC_SEG_GREY;
}
break;
case 0u:
break;
default:
break;
}
}
else
{
switch (m_SEG)
{
case 10u:
IC1_SEG136 = IC_SEG_ON;
break;
case 9u:
IC1_SEG137 = IC_SEG_ON;
break;
case 8u:
IC1_SEG138 = IC_SEG_ON;
break;
case 7u:
IC1_SEG143 = IC_SEG_ON;
break;
case 6u:
IC1_SEG144 = IC_SEG_ON;
break;
case 5u:
IC1_SEG145 = IC_SEG_ON;
break;
case 4u:
IC1_SEG146 = IC_SEG_ON;
break;
case 3u:
IC1_SEG147 = IC_SEG_ON;
break;
case 2u:
IC1_SEG148 = IC_SEG_ON;
break;
case 1u:
IC1_SEG135 = IC_SEG_ON;
break;
case 0u:
break;
default:
break;
}
}
} }
} }
else else
...@@ -2406,14 +2557,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM) ...@@ -2406,14 +2557,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
IC2_SEG077 = IC_SEG_ON; IC2_SEG077 = IC_SEG_ON;
Num = m_NUM / 10000u; Num = m_NUM / 10000u;
if ((m_NUM > 10000) || (checkself_seg_Flag == 1)) // if ((m_NUM > 10000) || (checkself_seg_Flag == 1))
{ // {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} // }
else // else
{ // {
m8 = SEG_UNDISPLAY_NUMBER0[Num]; // m8 = SEG_UNDISPLAY_NUMBER0[Num];
} // }
if (Bit_Is_Set(m8, 0)) if (Bit_Is_Set(m8, 0))
{ {
...@@ -2473,14 +2624,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM) ...@@ -2473,14 +2624,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
} }
/*千位*/ /*千位*/
Num = (m_NUM / 1000u) % 10u; Num = (m_NUM / 1000u) % 10u;
if ((m_NUM > 1000) || (checkself_seg_Flag == 1)) // if ((m_NUM > 1000) || (checkself_seg_Flag == 1))
{ // {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} // }
else // else
{ // {
m8 = SEG_UNDISPLAY_NUMBER0[Num]; // m8 = SEG_UNDISPLAY_NUMBER0[Num];
} // }
if (Bit_Is_Set(m8, 0)) if (Bit_Is_Set(m8, 0))
{ {
...@@ -2540,14 +2691,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM) ...@@ -2540,14 +2691,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
} }
/*百位*/ /*百位*/
Num = (m_NUM / 100u) % 10u; Num = (m_NUM / 100u) % 10u;
if ((m_NUM > 100) || (checkself_seg_Flag == 1)) // if ((m_NUM > 100) || (checkself_seg_Flag == 1))
{ // {
m8 = SEG_DISPLAY_NUMBER0[Num]; m8 = SEG_DISPLAY_NUMBER0[Num];
} // }
else // else
{ // {
m8 = SEG_UNDISPLAY_NUMBER0[Num]; // m8 = SEG_UNDISPLAY_NUMBER0[Num];
} // }
if (Bit_Is_Set(m8, 0)) if (Bit_Is_Set(m8, 0))
{ {
......
...@@ -154,7 +154,7 @@ static void Power_Sleep_Init(void) ...@@ -154,7 +154,7 @@ static void Power_Sleep_Init(void)
// RTE_DEEPSLEEP_GPIO_Interrupt_Enable(CAN_MCU_RXD,Trigger_Falling); // RTE_DEEPSLEEP_GPIO_Interrupt_Enable(CAN_MCU_RXD,Trigger_Falling);
// if(g_powerState == 0U) // if(g_powerState == 0U)
// { // {
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_Rising); // RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_Rising);
// } // }
// g_u8CanrxSleepstate = 0U; // g_u8CanrxSleepstate = 0U;
} }
...@@ -312,14 +312,15 @@ static Power_Status_em Power_Stay_Sleep(void) ...@@ -312,14 +312,15 @@ static Power_Status_em Power_Stay_Sleep(void)
while (1) while (1)
{ {
RTE_WDT_Clear(); RTE_WDT_Clear();
if (RTE_GPIO_Get_Level(KL15_AD_IN))/* KL15 */ if (RTE_GPIO_Get_Level(KL15_AD_IN) == 0)/* KL15 */
{ {
u8PowerSts = EM_IGN_Wakeup; RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN,Trigger_Rising);
break; RTE_DEEPSLEEP_Enable();
} }
else else
{ {
RTE_DEEPSLEEP_Enable(); u8PowerSts = EM_IGN_Wakeup;
break;
} }
} }
......
...@@ -583,10 +583,23 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void) ...@@ -583,10 +583,23 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
} }
#else #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();
Tellib_uint8_t BattChargeState = Get_CAN_CH0_ID_31A_Sig_MBMS_StatBattChargeState();
if (Signal1 == 1U) if (Signal1 == 1U)
{ {
LED_STATE = (Tellib_uint16_t) g_ChgModeStatus; // LED_STATE = (Tellib_uint16_t) g_ChgModeStatus;
if (BattChargeState == 2U)
{
LED_STATE = 1U;
}
else if (BattChargeState == 3U)
{
LED_STATE = 2U;
}
else
{
LED_STATE = 0U;
}
} }
else else
{ {
...@@ -606,11 +619,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status) ...@@ -606,11 +619,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status)
} }
else if (led_status == 2u) else if (led_status == 2u)
{ {
#if (PART_NUMBER == RMR42E_60)
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
#else
if (FLASH_SYNC_05Hz)
#endif
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Recharge, 1); SEG_SET_LED_STS(SEG_LED_Recharge, 1);
......
...@@ -99,7 +99,7 @@ void Sys_Exact_50us_Tasks(void) ...@@ -99,7 +99,7 @@ void Sys_Exact_50us_Tasks(void)
#if (PART_NUMBER == G54_A01) #if (PART_NUMBER == G54_A01)
if(g_powerState == 2U) if(g_powerState == 2U)
{ {
// Can_Write_Fun(&CAN_CH0_CanMsgTxOp, 50u); Can_Write_Fun(&CAN_CH0_CanMsgTxOp, 50u);
} }
#else #else
Can_Write_Fun(&CAN_CH0_CanMsgTxOp, 50u); Can_Write_Fun(&CAN_CH0_CanMsgTxOp, 50u);
......
...@@ -310,13 +310,13 @@ ...@@ -310,13 +310,13 @@
#define CheckSumErr 7 // Checksum Error #define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID #define UnknownPartID 8 // Unknown Part ID
#define SWV 0x102 // 0x100 = 1.00 software version 软件版本号 #define SWV 0x103 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号 #define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x103 // 0x100 = 1.00 bootloader version boot程序版本号 #define BTV 0x103 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x102 // 0x100 = 1.00 internal version 内部版本号 #define INTLV 0x103 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x25 // 0x24 = 2024年, program year #define PROG_Y 0x25 // 0x24 = 2024年, program year
#define PROG_M 0x03 // 0x03 = 3月, program month #define PROG_M 0x04 // 0x03 = 3月, program month
#define PROG_D 0x31 // 0x19 = 19日, program day #define PROG_D 0x22 // 0x19 = 19日, program day
/****************************************************************************** /******************************************************************************
Bootloader Variable Bootloader Variable
......
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