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
71f49b74
Commit
71f49b74
authored
Sep 20, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:62817 故障码0不显示
parent
b2270b14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
code.c
Firmware/Source/Application/FaultCode/code.c
+22
-12
No files found.
Firmware/Source/Application/FaultCode/code.c
View file @
71f49b74
...
...
@@ -60,10 +60,10 @@ uint32_t Get_FaultCodeDtc1(void)
DTC1
|=
DTCM1
&
0xF
;
}
if
(
DTC1
==
0
)
{
return
0XFFFF
;
}
//
if (DTC1 == 0)
//
{
//
return 0XFFFF;
//
}
u16FaultCode
=
DTC1
;
...
...
@@ -347,6 +347,15 @@ void FaultCode_Service(uint16_t Cycle)
#if 1
uint8_t
List_GetNum
(
FaultCodeList_t
*
CodeList
)
{
if
(
CodeList
==
NULL
)
{
return
0
;
}
return
CodeList
->
tail
-
CodeList
->
hade
;
}
uint8_t
List_Init
(
FaultCodeList_t
*
CodeList
,
uint32_t
Arr
[],
uint8_t
Len
)
{
if
((
CodeList
==
NULL
)
||
(
Arr
==
NULL
))
...
...
@@ -372,6 +381,10 @@ uint8_t List_Find(FaultCodeList_t *CodeList, uint32_t FaultCode)
{
return
2
;
}
if
(
List_GetNum
(
CodeList
)
==
0
)
{
return
0
;
}
for
(
int
i
=
CodeList
->
hade
;
i
<
CodeList
->
tail
;
i
++
)
{
if
(
CodeList
->
code_list
[
i
]
==
FaultCode
)
...
...
@@ -388,6 +401,10 @@ uint8_t List_add(FaultCodeList_t *CodeList, uint32_t FaultCode)
{
return
3
;
}
if
(
FaultCode
==
0
)
{
return
4
;
//无效值:0
}
if
((
CodeList
->
tail
+
1
)
>=
CodeList
->
len
)
{
return
1
;
//列表满
...
...
@@ -417,14 +434,7 @@ uint8_t List_Clear(FaultCodeList_t *CodeList)
//CodeList->code_num = 0;
return
0
;
}
uint8_t
List_GetNum
(
FaultCodeList_t
*
CodeList
)
{
if
(
CodeList
==
NULL
)
{
return
0
;
}
return
CodeList
->
tail
-
CodeList
->
hade
;
}
uint16_t
FaultTimeCount
=
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