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
87768a6f
Commit
87768a6f
authored
May 10, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:更改胎压数据返回值,当单位时PSI时,返回值分辨率为1
parent
ebafef50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+9
-7
No files found.
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
87768a6f
...
...
@@ -39,7 +39,7 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
Front_TPMS_Valid
=
0
;
TPMS
.
Rear_TPMS_Valid
=
1
;
TPMS
.
Front_Press_Value
=
99
;
TPMS
.
Rear_Press_Value
*=
Rear_TPMS
;
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
;
TPMS
.
Rear_Press_Value
/=
10
;
if
(
TPMS
.
Rear_Press_Value
>
99
)
{
...
...
@@ -58,8 +58,8 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS
.
Front_TPMS_Valid
=
1
;
TPMS
.
Rear_TPMS_Valid
=
0
;
TPMS
.
Rear_Press_Value
=
99
;
TPMS
.
Front_Press_Value
*=
Front_TPMS
;
TPMS
.
Rear_Press_Value
=
99
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
;
TPMS
.
Front_Press_Value
/=
10
;
if
(
TPMS
.
Front_Press_Value
>
99
)
{
...
...
@@ -87,14 +87,14 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS
.
Front_TPMS_Valid
=
1
;
TPMS
.
Rear_TPMS_Valid
=
1
;
TPMS
.
Front_Press_Value
*=
Front_TPMS
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
;
TPMS
.
Front_Press_Value
/=
10
;
if
(
TPMS
.
Front_Press_Value
>
99
)
{
TPMS
.
Front_Press_Value
=
99
;
}
TPMS
.
Rear_Press_Value
*=
Rear_TPMS
;
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
;
TPMS
.
Rear_Press_Value
/=
10
;
if
(
TPMS
.
Rear_Press_Value
>
99
)
{
...
...
@@ -143,12 +143,13 @@ uint8_t Get_Rear_TPMS_Sig_Vaild (void)
{
return
TPMS
.
Rear_TPMS_Valid
;
}
//10倍
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
);
value
=
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
/
10
;
if
(
value
>
99
)
{
value
=
99
;
...
...
@@ -165,11 +166,12 @@ 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
)
/
10
;
if
(
value
>
99
)
{
value
=
99
;
}
value
=
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
);
}
else
{
...
...
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