Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
RT_RMR42E
Commits
cd94cce0
Commit
cd94cce0
authored
Feb 21, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加0x170报文回调函数,混动车型增加充电连接指示灯工作策略
parent
5338b113
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
10 deletions
+60
-10
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+1
-1
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+19
-0
Can_RX_User.h
Firmware/Source/Application/CAN_User/Can_RX_User.h
+1
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+37
-9
Telltales_user.h
Firmware/Source/Component/Telltales/Telltales_user.h
+2
-0
No files found.
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
cd94cce0
...
@@ -627,7 +627,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
...
@@ -627,7 +627,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
500ul
,
500ul
,
0x170ul
,
0x170ul
,
((
void
*
)
0
),
((
void
*
)
0
),
(
(
void
*
)
0
),
(
CAN_0x170_Receive
),
((
void
*
)
0
),
((
void
*
)
0
),
},
},
{
{
...
...
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
cd94cce0
...
@@ -606,5 +606,24 @@ void CAN_0x22F_Receive(uint8_t CopyData [])
...
@@ -606,5 +606,24 @@ void CAN_0x22F_Receive(uint8_t CopyData [])
#endif
#endif
}
}
void
CAN_0x170_Receive
(
uint8_t
CopyData
[])
{
#if (PART_NUMBER == G54_A01)
uint8_t
u8Signal
=
Get_CAN_CH0_ID_170_Sig_MBMS_TOTALSigCharge
();
if
((
u8Signal
==
1U
)
&&
(
g_TOTALSigChargeStatus
==
0U
))
{
g_TOTALSigChargeCount
++
;
}
else
if
((
u8Signal
==
0U
)
&&
(
g_TOTALSigChargeStatus
==
1U
))
{
g_TOTALSigChargeCount
++
;
}
else
{
g_TOTALSigChargeCount
=
0U
;
}
#endif
}
Firmware/Source/Application/CAN_User/Can_RX_User.h
View file @
cd94cce0
...
@@ -44,5 +44,6 @@ extern void CAN_0x38E_Receive(uint8_t CopyData []);
...
@@ -44,5 +44,6 @@ extern void CAN_0x38E_Receive(uint8_t CopyData []);
extern
void
CAN_0x220_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x220_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x16B_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x16B_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x22F_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x22F_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x170_Receive
(
uint8_t
CopyData
[]);
#endif
#endif
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
cd94cce0
...
@@ -88,6 +88,8 @@ uint8_t g_SysFltLampStatus = 0U;
...
@@ -88,6 +88,8 @@ uint8_t g_SysFltLampStatus = 0U;
uint8_t
g_SysFltLampCount
=
0U
;
uint8_t
g_SysFltLampCount
=
0U
;
uint8_t
g_BmsFltStatus
[
2
]
=
{
0U
,
0U
};
uint8_t
g_BmsFltStatus
[
2
]
=
{
0U
,
0U
};
uint8_t
g_BmsFltCount
[
2
]
=
{
0U
,
0U
};
uint8_t
g_BmsFltCount
[
2
]
=
{
0U
,
0U
};
uint8_t
g_TOTALSigChargeStatus
=
0U
;
uint8_t
g_TOTALSigChargeCount
=
0U
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
@@ -152,6 +154,8 @@ void Telltales_Init(void)
...
@@ -152,6 +154,8 @@ void Telltales_Init(void)
g_PtoSwCount
=
0U
;
g_PtoSwCount
=
0U
;
g_SysFltLampStatus
=
0U
;
g_SysFltLampStatus
=
0U
;
g_SysFltLampCount
=
0U
;
g_SysFltLampCount
=
0U
;
g_TOTALSigChargeStatus
=
0U
;
g_TOTALSigChargeCount
=
0U
;
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
}
}
...
@@ -1127,6 +1131,7 @@ static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status)
...
@@ -1127,6 +1131,7 @@ static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Charging_Connection_R_Judgement
(
void
)
static
Tellib_uint16_t
LED_Charging_Connection_R_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
#if (PART_NUMBER == RMR42E_60)
Tellib_uint8_t
Signal1
=
Get_CAN_Num_MBMS_StatBattChargeState
();
Tellib_uint8_t
Signal1
=
Get_CAN_Num_MBMS_StatBattChargeState
();
if
(((
Signal1
==
0x1
)
||
(
Signal1
==
0x2
)
||
(
Signal1
==
0x3
))
&&
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
)))
if
(((
Signal1
==
0x1
)
||
(
Signal1
==
0x2
)
||
(
Signal1
==
0x3
))
&&
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
)))
{
{
...
@@ -1136,6 +1141,29 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
...
@@ -1136,6 +1141,29 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
{
{
LED_STATE
=
0
;
LED_STATE
=
0
;
}
}
#else
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
;
}
else
if
((
g_TOTALSigChargeStatus
==
1U
)
&&
(
g_TOTALSigChargeCount
>=
3U
))
{
g_TOTALSigChargeStatus
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_TOTALSigChargeStatus
;
}
else
{
LED_STATE
=
0U
;
}
#endif
return
LED_STATE
;
return
LED_STATE
;
}
}
static
void
LED_Charging_Connection_R_Execution
(
Tellib_uint16_t
led_status
)
static
void
LED_Charging_Connection_R_Execution
(
Tellib_uint16_t
led_status
)
...
...
Firmware/Source/Component/Telltales/Telltales_user.h
View file @
cd94cce0
...
@@ -69,6 +69,8 @@ extern uint8_t g_SysFltLampStatus;
...
@@ -69,6 +69,8 @@ extern uint8_t g_SysFltLampStatus;
extern
uint8_t
g_SysFltLampCount
;
extern
uint8_t
g_SysFltLampCount
;
extern
uint8_t
g_BmsFltStatus
[
2
];
extern
uint8_t
g_BmsFltStatus
[
2
];
extern
uint8_t
g_BmsFltCount
[
2
];
extern
uint8_t
g_BmsFltCount
[
2
];
extern
uint8_t
g_TOTALSigChargeStatus
;
extern
uint8_t
g_TOTALSigChargeCount
;
// extern Tellib_uint8_t Auto_Start_Stop ;
// extern Tellib_uint8_t Auto_Start_Stop ;
void
Telltales_Init
(
void
);
void
Telltales_Init
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment