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
85e3ced7
Commit
85e3ced7
authored
May 29, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:43285 更改胎压换算四舍五入的处理
parent
e1a42c4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+10
-6
No files found.
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
85e3ced7
...
...
@@ -123,10 +123,14 @@ void Data_TPMS_Processing_Service ( void )
}
uint32_t
Data_Bar_To_Psi
(
uint32_t
bar
)
{
bar
*=
145
;
bar
/=
10
;
bar
+=
5
;
return
bar
;
uint32_t
Bar
=
0
;
Bar
=
bar
*
145
;
Bar
/=
10
;
Bar
+=
5
;
// bar *= 145;
// bar /= 10;
// bar += 5;
return
Bar
;
}
uint8_t
Get_Led_TPMS_Waring
(
void
)
{
...
...
@@ -146,7 +150,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
)
/
100
;
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
+
50
)
/
100
;
if
(
value
>
99
)
{
value
=
99
;
...
...
@@ -164,7 +168,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
)
/
100
;
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
+
50
)
/
100
;
if
(
value
>
99
)
{
value
=
99
;
...
...
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