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
baizhengyuan
TianYing_ty100
Commits
164f8179
Commit
164f8179
authored
Jul 05, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:胎压学习外发改为三帧
parent
434a07db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+17
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+4
-0
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
164f8179
...
...
@@ -123,6 +123,12 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
}
uint16_t
CAN_TX_Count
;
extern
uint8_t
Tpms_TX_Flag
;
void
CAN_TX_Count_Init
(
void
)
{
CAN_TX_Count
=
0
;
}
void
Can_Set_Buff_580
(
canlib_uint8_t
CopyData
[])
{
CANMsg580Union
*
p580
;
...
...
@@ -138,6 +144,11 @@ 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
;
}
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x31
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x01
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x59
;
...
...
@@ -146,6 +157,11 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
}
else
if
(
Get_Tpms_TX_Flag
()
==
2
)
{
if
(
++
CAN_TX_Count
>=
3
)
{
Tpms_TX_Flag
=
0
;
CAN_TX_Count
=
0
;
}
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x31
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x01
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x59
;
...
...
@@ -154,6 +170,7 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
}
else
{
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/Component/PowerManagement/PowerManag_user.c
View file @
164f8179
...
...
@@ -93,6 +93,8 @@ static void Power_KL30_Init(void)
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
FaultCode_Init
();
CAN_TX_Count_Init
();
}
extern
uint32_t
PowerIgnOffTimeLine
;
static
void
Power_Wakeup_Init
(
void
)
...
...
@@ -138,6 +140,8 @@ static void Power_Wakeup_Init(void)
Data_TPMS_KL15_WAKE_UP_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
FaultCode_Init
();
CAN_TX_Count_Init
();
}
static
void
Power_LVP_Init
(
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