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
e154530d
Commit
e154530d
authored
Feb 20, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加报文0x16B回调函数,增加混动车型充电指示灯工作逻辑
parent
1492ad5c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
14 deletions
+83
-14
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
+35
-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
+44
-13
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 @
e154530d
...
@@ -637,7 +637,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
...
@@ -637,7 +637,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
500ul
,
500ul
,
0x16Bul
,
0x16Bul
,
((
void
*
)
0
),
((
void
*
)
0
),
(
(
void
*
)
0
),
(
CAN_0x16B_Receive
),
((
void
*
)
0
),
((
void
*
)
0
),
},
},
{
{
...
...
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
e154530d
...
@@ -467,3 +467,38 @@ void CAN_0x220_Receive(uint8_t CopyData [])
...
@@ -467,3 +467,38 @@ void CAN_0x220_Receive(uint8_t CopyData [])
#endif
#endif
}
}
void
CAN_0x16B_Receive
(
uint8_t
CopyData
[])
{
#if (PART_NUMBER == G54_A01)
uint8_t
u8Signal
=
Get_CAN_CH0_ID_16B_Sig_MBMS_SafeBattWorkState
();
if
((
u8Signal
==
1U
)
&&
(
g_ChgModeStatus
!=
1U
))
{
if
(
g_ChgModeCount
<
3U
)
{
g_ChgModeCount
++
;
}
}
else
if
((
u8Signal
==
3U
)
&&
(
g_ChgModeStatus
!=
2U
))
{
if
(
g_ChgModeCount
<
3U
)
{
g_ChgModeCount
++
;
}
}
else
if
((
u8Signal
!=
1U
)
&&
(
u8Signal
!=
3U
)
&&
(
g_ChgModeStatus
!=
0U
))
{
if
(
g_ChgModeCount
<
3U
)
{
g_ChgModeCount
++
;
}
}
else
{
g_ChgModeCount
=
0U
;
}
#endif
}
Firmware/Source/Application/CAN_User/Can_RX_User.h
View file @
e154530d
...
@@ -42,5 +42,6 @@ extern void CAN_0x225_Receive(uint8_t CopyData []);
...
@@ -42,5 +42,6 @@ extern void CAN_0x225_Receive(uint8_t CopyData []);
extern
void
CAN_0x234_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x234_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x38E_Receive
(
uint8_t
CopyData
[]);
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
[]);
#endif
#endif
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
e154530d
...
@@ -78,6 +78,8 @@ uint8_t g_KeyStatus = 0U;
...
@@ -78,6 +78,8 @@ uint8_t g_KeyStatus = 0U;
uint8_t
g_KeyCount
=
0U
;
uint8_t
g_KeyCount
=
0U
;
uint8_t
g_ReadyStatus
=
0U
;
uint8_t
g_ReadyStatus
=
0U
;
uint8_t
g_ReadyCount
=
0U
;
uint8_t
g_ReadyCount
=
0U
;
uint8_t
g_ChgModeStatus
=
0U
;
uint8_t
g_ChgModeCount
=
0U
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
@@ -134,6 +136,8 @@ void Telltales_Init(void)
...
@@ -134,6 +136,8 @@ void Telltales_Init(void)
g_KeyCount
=
0U
;
g_KeyCount
=
0U
;
g_ReadyStatus
=
0U
;
g_ReadyStatus
=
0U
;
g_ReadyCount
=
0U
;
g_ReadyCount
=
0U
;
g_ChgModeStatus
=
0U
;
g_ChgModeCount
=
0U
;
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
}
}
...
@@ -515,27 +519,54 @@ static void LED_Key_Access_Execution(Tellib_uint16_t led_status)
...
@@ -515,27 +519,54 @@ static void LED_Key_Access_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Battery_Charging_Judgement
(
void
)
static
Tellib_uint16_t
LED_Battery_Charging_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_Num_MBMS_TOTALSigAcc
();
#if (PART_NUMBER == RMR42E_60)
Tellib_uint8_t
Signal2
=
Get_CAN_Num_MBMS_TOTALSigCharge
();
Tellib_uint8_t
Signal1
=
Get_CAN_Num_MBMS_TOTALSigAcc
();
Tellib_uint8_t
Signal3
=
Get_CAN_Power_State
();
Tellib_uint8_t
Signal2
=
Get_CAN_Num_MBMS_TOTALSigCharge
();
if
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
))
Tellib_uint8_t
Signal3
=
Get_CAN_Power_State
();
{
if
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
))
if
(((
Signal1
==
0x1
)
||
(
Signal1
==
0x0
))
&&
(
Signal2
==
0X1
))
{
{
if
((
Signal3
==
CHRG_PLUGIN
)
||
(
Signal3
==
CHRGEND
))
if
((
(
Signal1
==
0x1
)
||
(
Signal1
==
0x0
))
&&
(
Signal2
==
0X1
))
{
{
LED_STATE
=
2
;
if
((
Signal3
==
CHRG_PLUGIN
)
||
(
Signal3
==
CHRGEND
))
{
LED_STATE
=
2
;
}
else
if
(
Signal3
==
CHRGING
)
{
LED_STATE
=
1
;
}
}
}
else
if
(
Signal3
==
CHRGING
)
else
{
{
LED_STATE
=
1
;
LED_STATE
=
0
;
}
}
}
}
else
#else
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_220_Sig_VCU_ChgMode
();
if
(
Signal1
==
1U
)
{
{
LED_STATE
=
0
;
if
((
g_ChgModeStatus
!=
1U
)
&&
(
g_ChgModeCount
>=
3U
))
{
g_ChgModeStatus
=
1U
;
}
else
if
((
g_ChgModeStatus
!=
2U
)
&&
(
g_ChgModeCount
>=
3U
))
{
g_ChgModeStatus
=
2U
;
}
else
if
((
g_ChgModeStatus
!=
0U
)
&&
(
g_ChgModeCount
>=
3U
))
{
g_ChgModeStatus
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_ChgModeStatus
;
}
}
}
else
{
LED_STATE
=
0U
;
}
#endif
return
LED_STATE
;
return
LED_STATE
;
}
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.h
View file @
e154530d
...
@@ -59,6 +59,8 @@ extern uint8_t g_KeyStatus;
...
@@ -59,6 +59,8 @@ extern uint8_t g_KeyStatus;
extern
uint8_t
g_KeyCount
;
extern
uint8_t
g_KeyCount
;
extern
uint8_t
g_ReadyStatus
;
extern
uint8_t
g_ReadyStatus
;
extern
uint8_t
g_ReadyCount
;
extern
uint8_t
g_ReadyCount
;
extern
uint8_t
g_ChgModeStatus
;
extern
uint8_t
g_ChgModeCount
;
// extern Tellib_uint8_t Auto_Start_Stop ;
// extern Tellib_uint8_t Auto_Start_Stop ;
...
...
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