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
e9c5cfd4
Commit
e9c5cfd4
authored
Aug 15, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:胎压学习580外发三帧修改
parent
1525e4dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
15 deletions
+44
-15
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+27
-12
Can_User.c
Firmware/Source/Application/CAN_User/Can_User.c
+17
-3
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
e9c5cfd4
...
...
@@ -158,7 +158,7 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
}
//uint8_t Can_580Send_flag = 0;
void
Can_Set_Buff_580
(
canlib_uint8_t
CopyData
[])
{
CANMsg580Union
*
p580
;
...
...
@@ -174,33 +174,48 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
if
(
Get_Tpms_TX_Flag
()
==
1
)
{
if
(
++
CAN_TX_Count
>
3
)
{
Tpms_TX_Flag
=
0
;
CAN_TX_Count
=
0
;
}
//Can_580Send_flag = 1;
//if(CAN_TX_Count++ > 2)
//{
// Tpms_TX_Flag = 0;
// CAN_TX_Count = 0;
// //Can_580Send_flag = 0;
//}
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x31
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x01
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x59
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x08
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x00
;
//if(Can_580Send_flag == 0)
//{
// Can_580Send_flag = 1;
// CAN_TX_Count++;
//}
}
else
if
(
Get_Tpms_TX_Flag
()
==
2
)
{
if
(
++
CAN_TX_Count
>
3
)
{
Tpms_TX_Flag
=
0
;
CAN_TX_Count
=
0
;
}
//Can_580Send_flag = 1;
//if(CAN_TX_Count++ > 2)
//{
// Tpms_TX_Flag = 0;
// CAN_TX_Count = 0;
// //Can_580Send_flag = 0;
//}
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x31
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x01
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x59
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x08
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x01
;
//if(Can_580Send_flag == 0)
//{
// Can_580Send_flag = 1;
// CAN_TX_Count++;
//}
}
else
{
CAN_TX_Count
=
0
;
//Can_580Send_flag = 0;
//CAN_TX_Count = 0;
//p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x0;
//p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x0;
//p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x0;
...
...
Firmware/Source/Application/CAN_User/Can_User.c
View file @
e9c5cfd4
...
...
@@ -326,7 +326,11 @@ uint8_t Get_Busoff_Status(void)
{
return
get_can_busoff
(
CAN_CH_0
);
}
extern
uint8_t
Can_341_Flg
;
//extern uint8_t Can_341_Flg;
//extern uint8_t Can_580Send_flag;
uint8_t
CAN_Send_Cound
=
0
;
extern
uint8_t
Tpms_TX_Flag
;
uint8_t
COM_APP_Process
(
st_CAN_Msg
*
Msg
)
{
// Can_Write((st_CAN_Msg *)Msg);
...
...
@@ -380,9 +384,19 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
#if (IC_Current == TY200_080000b_ty)
case
0x580
:
if
(
Get_Tpms_TX_Flag
()
!=
0
)
{
if
(
CAN_Send_Cound
++
<=
2
)
{
CAN_result
=
CAN_Transmit
(
CAN0MSG14
,
&
CAN_SendMsg
);
}
else
{
CAN_Send_Cound
=
0
;
Tpms_TX_Flag
=
0
;
}
//Can_580Send_flag = 0;
}
break
;
#endif
...
...
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