Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
IVECO_NS216
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
时昊
IVECO_NS216
Commits
59afe3ad
Commit
59afe3ad
authored
Feb 28, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加EBD指示灯
parent
eccdec79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
Telltales_user.c
source/Appliciation/Telltales_user.c
+38
-2
No files found.
source/Appliciation/Telltales_user.c
View file @
59afe3ad
...
...
@@ -1211,13 +1211,38 @@ Tellib_uint16_t Water_High_Res = 0u;
Tellib_uint16_t
LED_Brake_Lamp_Judge
(
void
)
{
Tellib_uint16_t
res
=
0u
;
if
((
Line_In_Get_Status
(
LINE_IN_Brake_Fault
)
==
1u
)
||
(
Line_In_Get_Status
(
LINE_IN_Handbrake
)
==
1u
))
Tellib_uint16_t
EBD_lamp
=
0u
;
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_can0A18A006_Msg_Count
)
==
CAN_SIG_LOST
)
&&
(
Common_GetIgnOnTime
()
>=
8000
))
{
EBD_lamp
=
2u
;
}
else
{
if
(
Get_CAN_CH0_ID_0A18A006_Sig_EbdFail
()
==
1
)
{
EBD_lamp
=
1u
;
}
else
{
EBD_lamp
=
0u
;
}
}
if
((
Line_In_Get_Status
(
LINE_IN_Brake_Fault
)
==
1u
)
||
(
Line_In_Get_Status
(
LINE_IN_Handbrake
)
==
1u
)
||
(
EBD_lamp
==
1
))
{
res
=
1u
;
}
else
{
res
=
0u
;
if
(
EBD_lamp
==
2
)
{
res
=
2u
;
}
else
{
res
=
0u
;
}
}
return
res
;
}
...
...
@@ -1240,6 +1265,17 @@ Tellib_uint16_t Water_High_Res = 0u;
{
LED_Driver_Channel_Set
(
LED_Attr
[
LED_Brake_Lamp
].
chip
,
LED_Attr
[
LED_Brake_Lamp
].
channel
,
LED_Attr
[
LED_Brake_Lamp
].
brightness
);
}
else
if
(
led_status
==
2u
)
{
if
(
g_LED
.
LedBlink_1_5HZ
)
{
LED_Driver_Channel_Set
(
LED_Attr
[
LED_Brake_Lamp
].
chip
,
LED_Attr
[
LED_Brake_Lamp
].
channel
,
LED_Attr
[
LED_Brake_Lamp
].
brightness
);
}
else
{
LED_Driver_Channel_Set
(
LED_Attr
[
LED_Brake_Lamp
].
chip
,
LED_Attr
[
LED_Brake_Lamp
].
channel
,
0
);
}
}
else
{
LED_Driver_Channel_Set
(
LED_Attr
[
LED_Brake_Lamp
].
chip
,
LED_Attr
[
LED_Brake_Lamp
].
channel
,
0
);
...
...
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