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
a396dc38
Commit
a396dc38
authored
Jul 25, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:52963 胎压从学习成功改为学习中,外发显示错误,仪表显示错误
parent
19a05634
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
26 deletions
+70
-26
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+70
-26
No files found.
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
a396dc38
...
...
@@ -26,8 +26,8 @@ void Data_TPMS_KL30_Init ( void )
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
MenuData
.
TPMS_Rear_FirstLearn_Flag
;
TPMS
.
TPMS_LOST
=
0
;
LearnTime_Count
=
6001
;
LearnTime_Count1
=
6001
;
LearnTime_Count
=
0
;
//
6001;
LearnTime_Count1
=
0
;
//
6001;
Can_341_Flg
=
0
;
}
...
...
@@ -45,8 +45,8 @@ void Data_TPMS_KL15_WAKE_UP_Init ( void )
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
MenuData
.
TPMS_Rear_FirstLearn_Flag
;
TPMS
.
TPMS_LOST
=
0
;
LearnTime_Count
=
6001
;
LearnTime_Count1
=
6001
;
LearnTime_Count
=
0
;
//
6001;
LearnTime_Count1
=
0
;
//
6001;
Can_341_Flg
=
0
;
}
...
...
@@ -74,6 +74,35 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
TPMS_Rear_Learn
=
MenuData
.
TPMS_Rear_Learn
;
TPMS
.
TPMS_LOST
=
0
;
}
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x373_Msg_Count
)
!=
CAN_SIG_LOST
)
{
if
((
Get_CAN_CH0_ID_373_Sig_Rear_id
()
!=
0
)
&&
(
Get_CAN_CH0_ID_373_Sig_Rear_id
()
!=
0xFFFFFFFF
))
{
TPMS
.
TPMS_Rear_ID_Value
=
1
;
//TPMS.TPMS_Rear_Learn = LearningCompletion;
}
else
{
TPMS
.
TPMS_Rear_ID_Value
=
0
;
}
if
((
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0
)
&&
(
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0xFFFFFFFF
))
{
TPMS
.
TPMS_Front_ID_Value
=
1
;
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
else
{
TPMS
.
TPMS_Front_ID_Value
=
0
;
}
}
else
{
TPMS
.
TPMS_Front_ID_Value
=
0
;
TPMS
.
TPMS_Rear_ID_Value
=
0
;
}
if
(
TPMS
.
TPMS_Front_Learn
==
0x0
)
...
...
@@ -112,6 +141,16 @@ void Data_TPMS_Processing_Service ( void )
}
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x1
)
{
//if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
//{
// TPMS.TPMS_Front_ID_Value = 1;
// //TPMS.TPMS_Front_Learn = LearningCompletion;
//}
//else
//{
// TPMS.TPMS_Front_ID_Value = 0;
//}
if
(
TPMS
.
TPMS_Front_Timeclean
==
0
)
{
LearnTime_Count
=
0
;
...
...
@@ -144,15 +183,15 @@ void Data_TPMS_Processing_Service ( void )
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x2
)
{
LearnTime_Count
=
0
;
if
((
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0
)
&&
(
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0xFFFFFFFF
))
{
TPMS
.
TPMS_Front_ID_Value
=
1
;
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
else
{
TPMS
.
TPMS_Front_ID_Value
=
0
;
}
//
if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
//
{
//
TPMS.TPMS_Front_ID_Value = 1;
//
//TPMS.TPMS_Front_Learn = LearningCompletion;
//
}
//
else
//
{
//
TPMS.TPMS_Front_ID_Value = 0;
//
}
}
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x3
)
...
...
@@ -199,6 +238,12 @@ void Data_TPMS_Processing_Service ( void )
}
else
if
(
TPMS
.
TPMS_Rear_Learn
==
0x1
)
{
if
(
TPMS
.
TPMS_Rear_Timeclean
==
0
)
{
LearnTime_Count1
=
0
;
}
TPMS
.
TPMS_Rear_Timeclean
=
1
;
if
(
LearnTime_Count1
<=
6000
)
{
LearnTime_Count1
++
;
...
...
@@ -206,11 +251,7 @@ void Data_TPMS_Processing_Service ( void )
}
else
{
if
(
TPMS
.
TPMS_Rear_Timeclean
==
0
)
{
LearnTime_Count1
=
0
;
}
TPMS
.
TPMS_Rear_Timeclean
=
1
;
if
((
MenuData
.
TPMS_Rear_Learn
!=
0x2
)
&&
(
MenuData
.
TPMS_Rear_Learn
!=
0x3
)
)
{
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x341_Msg_Count
)
!=
CAN_SIG_LOST
)
...
...
@@ -265,23 +306,26 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
1
;
}
if
((
TPMS
.
TPMS_Front_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Front_Learn
==
0x3
))
{
MenuData
.
TPMS_Front_Learn
=
TPMS
.
TPMS_Front_Learn
;
}
if
((
TPMS
.
TPMS_Rear_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Rear_Learn
==
0x3
))
{
MenuData
.
TPMS_Rear_Learn
=
TPMS
.
TPMS_Rear_Learn
;
}
//
if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3))
//
{
//
MenuData.TPMS_Front_Learn = TPMS.TPMS_Front_Learn;
//
}
//
if((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
//
{
//
MenuData.TPMS_Rear_Learn = TPMS.TPMS_Rear_Learn;
//
}
if
(((
TPMS
.
TPMS_Front_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Front_Learn
==
0x3
))
&&
(
TPMS
.
TPMS_Front_Learn
!=
MenuData
.
TPMS_Front_Learn
))
{
MenuData
.
TPMS_Front_Learn
=
TPMS
.
TPMS_Front_Learn
;
TPMS_L
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMS_L
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
}
if
(
((
TPMS
.
TPMS_Rear_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Rear_Learn
==
0x3
))
&&
(
TPMS
.
TPMS_Rear_Learn
!=
MenuData
.
TPMS_Rear_Learn
))
{
MenuData
.
TPMS_Rear_Learn
=
TPMS
.
TPMS_Rear_Learn
;
TPMS_L
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMS_L
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
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