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
c4943fc8
Commit
c4943fc8
authored
Sep 19, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:禅道外发问题:62025、61997、61907,数据处理完之前外发无效值
parent
1cd7f1c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
60 deletions
+108
-60
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+99
-56
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+9
-4
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
c4943fc8
...
...
@@ -4,7 +4,17 @@
uint16_t
CAN_TX_Count
=
0
;
uint16_t
AliveCountTimer
=
0
;
uint8_t
Power_KL30_Init_flag
=
0
;
extern
uint8_t
Tpms_TX_Flag
;
#define INVALID_VALUE 0x0
void
CAN_TX_Flag_Init
(
void
)
{
Power_KL30_Init_flag
=
0
;
}
void
CAN_TX_Count_Init
(
void
)
{
CAN_TX_Count
=
0
;
...
...
@@ -45,6 +55,8 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
p6EE
=
(
CANMsg6EEUnion
*
)
CopyData
;
if
(
p6EE
!=
(
void
*
)
0
)
{
if
(
Power_KL30_Init_flag
==
1
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
...
...
@@ -61,6 +73,15 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
{
p6EE
->
Sig
.
Fuel_Res_TX
=
Fuel_tx
;
}
}
else
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
p6EE
->
Msg
[
i
]
=
INVALID_VALUE
;
}
}
}
//p6EE -> Sig.Vsppe_H3_TX = (Vspeed_tx >> 8) & 0x7u ;
...
...
@@ -90,6 +111,8 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
TripA_tx
=
(
uint16_t
)
Data_Read_Trip
(
EM_TRIP_A
);
p6EF
=
(
CANMsg6EFUnion
*
)
CopyData
;
if
(
p6EF
!=
(
void
*
)
0
)
{
if
(
Power_KL30_Init_flag
==
1
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
...
...
@@ -98,6 +121,15 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
p6EF
->
Sig
.
TripA_H
=
(
TripA_tx
>>
8
)
&
0xFF
;
p6EF
->
Sig
.
TripA_L
=
TripA_tx
&
0xFF
;
}
else
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
p6EF
->
Msg
[
i
]
=
INVALID_VALUE
;
}
}
}
//p6EF -> Sig.Espeed_TX = Espeed_tx;
//p6EF -> Sig.Coolant_TX = GET_DataCoolantTempValueDisp() + 40;
...
...
@@ -114,6 +146,8 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450
=
(
CANMsg450Union
*
)
CopyData
;
if
(
p450
!=
(
void
*
)
0
)
{
if
(
Power_KL30_Init_flag
==
1
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
...
...
@@ -161,6 +195,15 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450
->
Sig
.
Rear_Pressure_TX_H
=
(
u16RearTpms
>>
8
)
&
0xFF
;
p450
->
Sig
.
Rear_Pressure_TX_L
=
(
u16RearTpms
)
&
0xFF
;
}
}
else
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
p450
->
Msg
[
i
]
=
INVALID_VALUE
;
}
}
}
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
c4943fc8
...
...
@@ -23,6 +23,7 @@ static Power_Status_em Power_Stay_Sleep(void);
extern
uint8_t
u8LEDDriverCheckCount
;
static
const
st_PowerGroup
g_stPwrTasks
=
{
Power_KL30_Init
,
Power_IG_OFF_Init
,
...
...
@@ -42,8 +43,10 @@ void PwrMemInit(void)
PowerMemInit
(
&
g_stPwrTasks
);
}
extern
uint8_t
Power_KL30_Init_flag
;
static
void
Power_KL30_Init
(
void
)
{
CAN_TX_Flag_Init
();
ClearODO_Flag
=
0
;
Gpio_Init
(
Gpio_KL30_Init
);
Simulated_IIC_2_Init
();
...
...
@@ -98,6 +101,8 @@ static void Power_KL30_Init(void)
// Data_TPMS_Processing_Service();
Common_DataInit
();
Power_KL30_Init_flag
=
1
;
}
extern
uint32_t
PowerIgnOffTimeLine
;
static
void
Power_Wakeup_Init
(
void
)
...
...
@@ -350,5 +355,5 @@ void Sys_Startup_Init(void)
uint8_t
u8StartuoMode
=
0
;
PwrMemInit
(
);
Power_Management_Init
(
u8StartuoMode
);
}
}
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