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
04ad070f
Commit
04ad070f
authored
May 22, 2024
by
ζδΏε
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
π
fix:43688 γ倩鹰TY100γγθεε€εγθεε€ε倧εζΎη€Ίιθ――
parent
82041e3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
17 deletions
+32
-17
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+5
-2
Can_App.h
Firmware/Source/Application/CAN_User/Can_App.h
+4
-4
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+22
-10
Data_TPMS.h
Firmware/Source/Application/Data_TPMS/Data_TPMS.h
+1
-1
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
04ad070f
...
...
@@ -95,7 +95,10 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450
->
Msg
[
i
]
=
0xFFu
;
}
}
p450
->
Sig
.
Front_Pressure_TX
=
Get_Front_TPMS_TX
();
p450
->
Sig
.
Rear_Pressure_TX
=
Get_Rear_TPMS_TX
();
p450
->
Sig
.
Front_Pressure_TX_H
=
(
Get_Front_TPMS_TX
()
>>
8
)
&
0xFF
;
p450
->
Sig
.
Front_Pressure_TX_L
=
Get_Front_TPMS_TX
()
&
0xFF
;
p450
->
Sig
.
Rear_Pressure_TX_H
=
(
Get_Rear_TPMS_TX
()
>>
8
)
&
0xFF
;
p450
->
Sig
.
Rear_Pressure_TX_L
=
Get_Rear_TPMS_TX
()
&
0xFF
;
}
Firmware/Source/Application/CAN_User/Can_App.h
View file @
04ad070f
...
...
@@ -72,10 +72,10 @@ typedef union
uint8_t
Msg
[
8
];
struct
{
uint
32_t
Front_Pressure_TX
:
16
;
uint
32_t
Rear_Pressure_TX
:
16
;
uint
16_t
Front_Pressure_TX_H
:
8
;
uint16_t
Front_Pressure_TX_L
:
8
;
uint
16_t
Rear_Pressure_TX_H
:
8
;
uint16_t
Rear_Pressure_TX_L
:
8
;
//uint32_t Front_Air_Leakage_TX : 1;
//uint32_t Rear_Air_Leakage_TX : 1;
//uint32_t Front_Low_Voltage_TX : 1;
...
...
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
04ad070f
...
...
@@ -38,7 +38,7 @@ void Data_TPMS_Processing_Service ( void )
{
TPMS
.
Front_TPMS_Valid
=
0
;
TPMS
.
Rear_TPMS_Valid
=
1
;
TPMS
.
Front_Press_Value
=
99
;
TPMS
.
Front_Press_Value
=
99
0
;
TPMS
.
Rear_Press_Value
=
Rear_TPMS
*
275
;
TPMS
.
Rear_Press_Value
/=
102
;
if
(
TPMS
.
Rear_Press_Value
>
990
)
...
...
@@ -54,11 +54,11 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
TPMS_Warning
=
0
;
}
}
else
if
((
Front_TPMS
!=
0xFF
)
||
(
Rear_TPMS
==
0xFF
))
else
if
((
Front_TPMS
!=
0xFF
)
&&
(
Rear_TPMS
==
0xFF
))
{
TPMS
.
Front_TPMS_Valid
=
1
;
TPMS
.
Rear_TPMS_Valid
=
0
;
TPMS
.
Rear_Press_Value
=
99
;
TPMS
.
Rear_Press_Value
=
99
0
;
TPMS
.
Front_Press_Value
=
Front_TPMS
*
275
;
TPMS
.
Front_Press_Value
/=
102
;
if
(
TPMS
.
Front_Press_Value
>
990
)
...
...
@@ -121,7 +121,7 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
TPMS_Warning
=
0
;
}
}
uint
16_t
Data_Bar_To_Psi
(
uint16
_t
bar
)
uint
32_t
Data_Bar_To_Psi
(
uint32
_t
bar
)
{
bar
*=
145
;
bar
/=
10
;
...
...
@@ -154,8 +154,8 @@ uint16_t Get_Front_TPMS_Sig_Value (void)
}
else
{
TPMS
.
Front_Press_Value
+=
5
;
value
=
TPMS
.
Front_Press_V
alue
/
10
;
value
=
TPMS
.
Front_Press_Value
+
5
;
value
=
v
alue
/
10
;
}
return
value
;
}
...
...
@@ -173,16 +173,28 @@ uint16_t Get_Rear_TPMS_Sig_Value (void)
}
else
{
TPMS
.
Rear_Press_Value
+=
5
;
value
=
TPMS
.
Rear_Press_V
alue
/
10
;
value
=
TPMS
.
Rear_Press_Value
+
5
;
value
=
v
alue
/
10
;
}
return
value
;
}
uint16_t
Get_Rear_TPMS_TX
(
void
)
{
return
TPMS
.
Rear_Press_Value
;
uint16_t
value
=
0
;
value
=
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
/
10
;
if
(
value
>
990
)
{
value
=
990
;
}
return
value
;
}
uint16_t
Get_Front_TPMS_TX
(
void
)
{
return
TPMS
.
Front_Press_Value
;
uint16_t
value
=
0
;
value
=
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
/
10
;
if
(
value
>
990
)
{
value
=
990
;
}
return
value
;
}
\ No newline at end of file
Firmware/Source/Application/Data_TPMS/Data_TPMS.h
View file @
04ad070f
...
...
@@ -14,7 +14,7 @@ typedef struct
}
_TPMS_Display
;
void
Data_TPMS_KL30_Init
(
void
);
void
Data_TPMS_Processing_Service
(
void
);
uint
16_t
Data_Bar_To_Psi
(
uint16
_t
bar
);
uint
32_t
Data_Bar_To_Psi
(
uint32
_t
bar
);
uint8_t
Get_Led_TPMS_Waring
(
void
);
uint8_t
Get_Front_TPMS_Sig_Vaild
(
void
);
uint8_t
Get_Rear_TPMS_Sig_Vaild
(
void
);
...
...
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