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
5338b113
Commit
5338b113
authored
Feb 21, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:混动车型增加动力电池故障指示功能逻辑
parent
8f8491e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
19 deletions
+67
-19
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+26
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+39
-19
Telltales_user.h
Firmware/Source/Component/Telltales/Telltales_user.h
+2
-0
No files found.
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
5338b113
...
...
@@ -322,6 +322,32 @@ void CAN_0x225_Receive(uint8_t CopyData [])
g_VoltLowCount
=
0U
;
}
uint8_t
u8Signal
[
2
]
=
{
0
,
0
};
u8Signal
[
0
]
=
Get_CAN_CH0_ID_225_Sig_VCU_BmsFltLv3
();
u8Signal
[
1
]
=
Get_CAN_CH0_ID_225_Sig_VCU_BmsFltLv4
();
for
(
uint8_t
i
=
0U
;
i
<
2U
;
i
++
)
{
if
((
u8Signal
[
i
]
==
1U
)
&&
(
g_BmsFltStatus
[
i
]
==
0U
))
{
if
(
g_BmsFltCount
[
i
]
<
3U
)
{
g_BmsFltCount
[
i
]
++
;
}
}
else
if
((
u8Signal
[
i
]
==
0U
)
&&
(
g_BmsFltStatus
[
i
]
==
1U
))
{
if
(
g_BmsFltCount
[
i
]
<
3U
)
{
g_BmsFltCount
[
i
]
++
;
}
}
else
{
g_BmsFltCount
[
i
]
=
0U
;
}
}
#endif
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
5338b113
...
...
@@ -86,6 +86,8 @@ uint8_t g_PtoSwStatus = 0U;
uint8_t
g_PtoSwCount
=
0U
;
uint8_t
g_SysFltLampStatus
=
0U
;
uint8_t
g_SysFltLampCount
=
0U
;
uint8_t
g_BmsFltStatus
[
2
]
=
{
0U
,
0U
};
uint8_t
g_BmsFltCount
[
2
]
=
{
0U
,
0U
};
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
...
@@ -1153,27 +1155,45 @@ static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Power_Battery_Failure_R_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
// Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_StatBattChargeState();
// if ((Signal1 == 0x1) || (Signal1 == 0x2) ||(Signal1 == 0x3))
// {
// LED_STATE = 1;
// }
// else
// {
// LED_STATE = 0;
// }
#if (PART_NUMBER == G54_A01)
for
(
uint8_t
i
=
0U
;
i
<
2U
;
i
++
)
{
if
((
g_BmsFltStatus
[
i
]
==
0U
)
&&
(
g_BmsFltCount
[
i
]
>=
3U
))
{
g_BmsFltStatus
[
i
]
=
1U
;
}
else
if
((
g_BmsFltStatus
[
i
]
==
1U
)
&&
(
g_BmsFltCount
[
i
]
>=
3U
))
{
g_BmsFltStatus
[
i
]
=
0U
;
}
}
if
((
g_BmsFltStatus
[
0
]
==
0U
)
&&
(
g_BmsFltStatus
[
1
]
==
0U
))
{
LED_STATE
=
0U
;
}
else
{
LED_STATE
=
1U
;
}
#endif
return
LED_STATE
;
}
static
void
LED_Power_Battery_Failure_R_Execution
(
Tellib_uint16_t
led_status
)
{
// if ( (led_status == 1u ) && openLED_flag)
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON);
// SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,1);
// }
// else
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_OFF);
// SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,0);
// }
#if (PART_NUMBER == G54_A01)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_01_Power_Battery_Failure_R
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_Power_Battery_Failure
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_01_Power_Battery_Failure_R
,
LED_OFF
);
SEG_SET_LED_STS
(
SEG_LED_Power_Battery_Failure
,
0
);
}
#endif
}
Firmware/Source/Component/Telltales/Telltales_user.h
View file @
5338b113
...
...
@@ -67,6 +67,8 @@ extern uint8_t g_PtoSwStatus;
extern
uint8_t
g_PtoSwCount
;
extern
uint8_t
g_SysFltLampStatus
;
extern
uint8_t
g_SysFltLampCount
;
extern
uint8_t
g_BmsFltStatus
[
2
];
extern
uint8_t
g_BmsFltCount
[
2
];
// extern Tellib_uint8_t Auto_Start_Stop ;
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