Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
fee2eaa7
Commit
fee2eaa7
authored
Jun 04, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:45097 【天鹰TY100】【蓄电池指示灯】信号掉线恢复,未按上行策略走
parent
7882467d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+28
-7
No files found.
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
fee2eaa7
...
...
@@ -43,6 +43,7 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
Led_HighBeam_Count
HighBeam_Timer
;
Tellib_uint16_t
LED_Battery_Voltage
=
0
;
Tellib_uint16_t
Battery_Voltage_valid
=
0
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
...
@@ -82,6 +83,7 @@ void Telltales_UserInit(void)
HighBeam_Timer
.
LED_Turnon
=
0
;
HighBeam_Timer
.
LED_Turnoff
=
0
;
LED_Battery_Voltage
=
0
;
Battery_Voltage_valid
=
0
;
}
static
Tellib_uint16_t
LED_High_Beam_Judgement
(
void
)
...
...
@@ -509,18 +511,23 @@ static Tellib_uint16_t LED_Low_Batt_Judgement(void)
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
Battery_Voltage
=
0u
;
Battery_Voltage
=
Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage
();
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x401_Msg_Count
)
==
CAN_SIG_LOST
)
)
{
LED_Battery_Voltage
=
1
;
Battery_Voltage_valid
=
0
;
}
else
{
if
(
Battery_Voltage
<
118
)
if
(
Battery_Voltage_valid
==
1
)
{
Battery_Voltage_valid
=
1
;
if
(
Get_Battery_Voltage
()
<
118
)
{
LED_Battery_Voltage
=
1
;
}
else
if
(
Battery_Voltage
>=
120
)
else
if
(
Get_Battery_Voltage
()
>=
120
)
{
LED_Battery_Voltage
=
0
;
}
...
...
@@ -529,6 +536,20 @@ static Tellib_uint16_t LED_Low_Batt_Judgement(void)
;
}
}
else
{
Battery_Voltage_valid
=
1
;
if
(
Get_Battery_Voltage
()
<
118
)
{
LED_Battery_Voltage
=
1
;
}
else
{
LED_Battery_Voltage
=
0
;
}
}
}
LED_STATE
=
LED_Battery_Voltage
;
return
LED_STATE
;
}
...
...
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