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
13a51f36
Commit
13a51f36
authored
Jun 25, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:47628 【天鹰TY200】【胎压换算】胎压换算有点偏差
parent
5b57d322
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+28
-28
No files found.
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
13a51f36
...
...
@@ -293,13 +293,13 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
Front_TPMS_Valid
=
0
;
TPMS
.
Rear_TPMS_Valid
=
1
;
TPMS
.
Front_Press_Value
=
990
;
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
;
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
0
;
TPMS
.
Rear_Press_Value
/=
102
;
if
(
TPMS
.
Rear_Press_Value
>
990
)
if
(
TPMS
.
Rear_Press_Value
>
990
0
)
{
TPMS
.
Rear_Press_Value
=
990
;
TPMS
.
Rear_Press_Value
=
990
0
;
}
if
(((
TPMS
.
Rear_Press_Value
+
5
)
<
170
)
||
((
TPMS
.
Rear_Press_Value
+
5
)
>
25
0
))
if
(((
TPMS
.
Rear_Press_Value
+
5
0
)
<
1700
)
||
((
TPMS
.
Rear_Press_Value
+
50
)
>
250
0
))
{
TPMS
.
TPMS_Warning
=
1
;
}
...
...
@@ -313,13 +313,13 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
Front_TPMS_Valid
=
1
;
TPMS
.
Rear_TPMS_Valid
=
0
;
TPMS
.
Rear_Press_Value
=
990
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
0
;
TPMS
.
Front_Press_Value
/=
102
;
if
(
TPMS
.
Front_Press_Value
>
990
)
if
(
TPMS
.
Front_Press_Value
>
990
0
)
{
TPMS
.
Front_Press_Value
=
990
;
TPMS
.
Front_Press_Value
=
990
0
;
}
if
(((
TPMS
.
Front_Press_Value
+
5
)
<
170
)
||
((
TPMS
.
Front_Press_Value
+
5
)
>
23
0
))
if
(((
TPMS
.
Front_Press_Value
+
5
0
)
<
1700
)
||
((
TPMS
.
Front_Press_Value
+
50
)
>
230
0
))
{
TPMS
.
TPMS_Warning
=
1
;
}
...
...
@@ -330,8 +330,8 @@ void Data_TPMS_Processing_Service ( void )
}
else
{
TPMS
.
Front_Press_Value
=
990
;
TPMS
.
Rear_Press_Value
=
990
;
TPMS
.
Front_Press_Value
=
990
0
;
TPMS
.
Rear_Press_Value
=
990
0
;
TPMS
.
TPMS_Warning
=
0
;
TPMS
.
Front_TPMS_Valid
=
0
;
TPMS
.
Rear_TPMS_Valid
=
0
;
...
...
@@ -341,20 +341,20 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS
.
Front_TPMS_Valid
=
1
;
TPMS
.
Rear_TPMS_Valid
=
1
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
0
;
TPMS
.
Front_Press_Value
/=
102
;
if
(
TPMS
.
Front_Press_Value
>
990
)
if
(
TPMS
.
Front_Press_Value
>
990
0
)
{
TPMS
.
Front_Press_Value
=
990
;
TPMS
.
Front_Press_Value
=
990
0
;
}
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
;
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
0
;
TPMS
.
Rear_Press_Value
/=
102
;
if
(
TPMS
.
Rear_Press_Value
>
990
)
if
(
TPMS
.
Rear_Press_Value
>
990
0
)
{
TPMS
.
Rear_Press_Value
=
990
;
TPMS
.
Rear_Press_Value
=
990
0
;
}
if
(((
TPMS
.
Front_Press_Value
+
5
)
<
170
)
||
((
TPMS
.
Front_Press_Value
+
5
)
>
230
)
||
((
TPMS
.
Rear_Press_Value
+
5
)
<
170
)
||
((
TPMS
.
Rear_Press_Value
+
5
)
>
25
0
))
if
(((
TPMS
.
Front_Press_Value
+
5
0
)
<
1700
)
||
((
TPMS
.
Front_Press_Value
+
50
)
>
2300
)
||
((
TPMS
.
Rear_Press_Value
+
50
)
<
1700
)
||
((
TPMS
.
Rear_Press_Value
+
50
)
>
250
0
))
{
TPMS
.
TPMS_Warning
=
1
;
}
...
...
@@ -381,7 +381,7 @@ void Data_TPMS_Processing_Service ( void )
else
if
(
TPMS
.
TPMS_Front_Learn
==
LearningFailure
)
{
TPMS
.
TPMS_Front_FirstLearn_Flag
=
LearningFailure
;
TPMS
.
Front_Press_Value
=
990
;
TPMS
.
Front_Press_Value
=
990
0
;
}
else
{
...
...
@@ -404,7 +404,7 @@ void Data_TPMS_Processing_Service ( void )
else
if
(
TPMS
.
TPMS_Rear_Learn
==
LearningFailure
)
{
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
LearningFailure
;
TPMS
.
Rear_Press_Value
=
990
;
TPMS
.
Rear_Press_Value
=
990
0
;
}
else
{
...
...
@@ -431,7 +431,7 @@ uint32_t Data_Bar_To_Psi (uint32_t bar)
uint32_t
Bar
=
0
;
Bar
=
bar
*
145
;
Bar
/=
10
;
Bar
+=
5
;
//
Bar += 5;
// bar *= 145;
// bar /= 10;
// bar += 5;
...
...
@@ -459,7 +459,7 @@ uint16_t Get_Front_TPMS_Sig_Value (void)
uint16_t
value
=
0
;
if
(
TPMS
.
TPMS_Unit
==
1
)
{
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
+
50
)
/
1
00
;
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
+
50
0
)
/
10
00
;
if
(
value
>
99
)
{
value
=
99
;
...
...
@@ -467,8 +467,8 @@ uint16_t Get_Front_TPMS_Sig_Value (void)
}
else
{
value
=
TPMS
.
Front_Press_Value
+
5
;
value
=
value
/
10
;
value
=
TPMS
.
Front_Press_Value
+
5
0
;
value
=
value
/
10
0
;
}
return
value
;
}
...
...
@@ -477,7 +477,7 @@ uint16_t Get_Rear_TPMS_Sig_Value (void)
uint16_t
value
=
0
;
if
(
TPMS
.
TPMS_Unit
==
1
)
{
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
+
50
)
/
1
00
;
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
+
50
0
)
/
10
00
;
if
(
value
>
99
)
{
value
=
99
;
...
...
@@ -486,15 +486,15 @@ uint16_t Get_Rear_TPMS_Sig_Value (void)
}
else
{
value
=
TPMS
.
Rear_Press_Value
+
5
;
value
=
value
/
10
;
value
=
TPMS
.
Rear_Press_Value
+
5
0
;
value
=
value
/
10
0
;
}
return
value
;
}
uint16_t
Get_Rear_TPMS_TX
(
void
)
{
uint16_t
value
=
0
;
value
=
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
/
10
;
value
=
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
/
10
0
;
if
(
value
>
990
)
{
value
=
990
;
...
...
@@ -504,7 +504,7 @@ uint16_t Get_Rear_TPMS_TX (void)
uint16_t
Get_Front_TPMS_TX
(
void
)
{
uint16_t
value
=
0
;
value
=
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
/
10
;
value
=
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
/
10
0
;
if
(
value
>
990
)
{
value
=
990
;
...
...
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