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
baizhengyuan
TianYing_ty100
Commits
c1816c21
Commit
c1816c21
authored
Sep 10, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:代码审核问题:小计读取4字节,数组第四个元素判断是否是EE第一次上电
parent
a3c64709
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
Services_Mileage_User.c
Firmware/Source/Component/Mileage/Services_Mileage_User.c
+11
-3
No files found.
Firmware/Source/Component/Mileage/Services_Mileage_User.c
View file @
c1816c21
...
...
@@ -58,12 +58,12 @@ void Data_User_Mileage_KL30Init(void)
}
else
{
ODOInit
.
Offset
=
TempBuf
[
2
];
ODOInit
.
Offset
=
TempBuf
[
1
];
}
ODOInit
.
MaxValue
=
1999990
;
Data_ODO_KL30_Init
(
DataODOBuf
,
&
ODOInit
,
Func
.
EEPromWrite_Cbk
);
(
void
)
Data_User_EEPROM_Read
(
EM_TRIP_BLOCK
,
TempBuf
+
3
,
8
);
(
void
)
Data_User_EEPROM_Read
(
EM_TRIP_BLOCK
,
TempBuf
+
3
,
4
);
if
(
TempBuf
[
3
]
==
0XFFFFFFFF
)
{
TripInit
[
EM_TRIP_A
].
Stamp
=
0
;
...
...
@@ -72,7 +72,15 @@ void Data_User_Mileage_KL30Init(void)
{
TripInit
[
EM_TRIP_A
].
Stamp
=
TempBuf
[
3
];
}
TripInit
[
EM_TRIP_A
].
Offset
=
TempBuf
[
4
];
if
(
TempBuf
[
4
]
==
0XFFFFFFFF
)
{
TripInit
[
EM_TRIP_A
].
Offset
=
0
;
}
else
{
TripInit
[
EM_TRIP_A
].
Offset
=
TempBuf
[
4
];
}
//TripInit[EM_TRIP_A].Offset = TempBuf[4];
TripInit
[
EM_TRIP_A
].
MaxValue
=
9999
;
/* 最大999.9km 进行复位 */
TripInit
[
EM_TRIP_A
].
IsRestart
=
1u
;
...
...
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