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
96c0f7f6
Commit
96c0f7f6
authored
Jun 19, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:45350 Apparent: Dereference of NULL pointer.
parent
777d8d7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
43 deletions
+51
-43
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+51
-43
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
96c0f7f6
...
...
@@ -15,8 +15,10 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[])
{
p220
->
Msg
[
i
]
=
0xFFu
;
}
p220
->
Sig
.
TCS_TX
=
Get_Dis_Tcs_Val
();
}
p220
->
Sig
.
TCS_TX
=
Get_Dis_Tcs_Val
();
}
void
Can_Set_Buff_6EE
(
canlib_uint8_t
CopyData
[])
{
...
...
@@ -33,12 +35,22 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
{
p6EE
->
Msg
[
i
]
=
0xFFu
;
}
p6EE
->
Sig
.
ODO_TX_H
=
(
ODO_tx
>>
16
)
&
0xFF
;
p6EE
->
Sig
.
ODO_TX_M
=
(
ODO_tx
>>
8
)
&
0xFF
;
p6EE
->
Sig
.
ODO_TX_L
=
ODO_tx
&
0xFF
;
if
(
Get_Fuel_RES
()
>
255
)
{
p6EE
->
Sig
.
Fuel_Res_TX
=
0xFF
;
}
else
{
p6EE
->
Sig
.
Fuel_Res_TX
=
Get_Fuel_RES
()
;
}
}
//p6EE -> Sig.Vsppe_H3_TX = (Vspeed_tx >> 8) & 0x7u ;
//p6EE -> Sig.Vsppe_L8_TX = Vspeed_tx & 0xFF ;
p6EE
->
Sig
.
ODO_TX_H
=
(
ODO_tx
>>
16
)
&
0xFF
;
p6EE
->
Sig
.
ODO_TX_M
=
(
ODO_tx
>>
8
)
&
0xFF
;
p6EE
->
Sig
.
ODO_TX_L
=
ODO_tx
&
0xFF
;
// p6EE -> Sig.Uint_TX = Get_Dis_KM_Unit() ;
// p6EE -> Sig.Coolant_Seg_TX = GET_DataCoolantTempSegDisp() ;
//if (GET_DataCollantTempWarnflg() == 2)
...
...
@@ -50,15 +62,7 @@ void Can_Set_Buff_6EE(canlib_uint8_t CopyData[])
// p6EE -> Sig.Coolant_Warn_TX = 0;
//}
//p6EE -> Sig.Fuel_Seg_TX = Get_CurFuelSetp() ;
if
(
Get_Fuel_RES
()
>
255
)
{
p6EE
->
Sig
.
Fuel_Res_TX
=
0xFF
;
}
else
{
p6EE
->
Sig
.
Fuel_Res_TX
=
Get_Fuel_RES
()
;
}
}
void
Can_Set_Buff_6EF
(
canlib_uint8_t
CopyData
[])
...
...
@@ -76,10 +80,11 @@ void Can_Set_Buff_6EF(canlib_uint8_t CopyData[])
{
p6EF
->
Msg
[
i
]
=
0xFFu
;
}
p6EF
->
Sig
.
TripA_H
=
(
TripA_tx
>>
8
)
&
0xFF
;
p6EF
->
Sig
.
TripA_L
=
TripA_tx
&
0xFF
;
}
//p6EF -> Sig.Espeed_TX = Espeed_tx;
p6EF
->
Sig
.
TripA_H
=
(
TripA_tx
>>
8
)
&
0xFF
;
p6EF
->
Sig
.
TripA_L
=
TripA_tx
&
0xFF
;
//p6EF -> Sig.Coolant_TX = GET_DataCoolantTempValueDisp() + 40;
}
void
Can_Set_Buff_450
(
canlib_uint8_t
CopyData
[])
...
...
@@ -94,11 +99,12 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
{
p450
->
Msg
[
i
]
=
0xFFu
;
}
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
;
}
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
;
}
void
Can_Set_Buff_580
(
canlib_uint8_t
CopyData
[])
{
...
...
@@ -112,31 +118,33 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{
p580
->
Msg
[
i
]
=
0xFFu
;
}
if
(
Get_Tpms_TX_Flag
()
==
1
)
{
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
;
}
else
if
(
Get_Tpms_TX_Flag
()
==
2
)
{
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
;
}
else
{
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x02
;
}
}
if
(
Get_Tpms_TX_Flag
()
==
1
)
{
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
;
}
else
if
(
Get_Tpms_TX_Flag
()
==
2
)
{
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
;
}
else
{
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x02
;
}
}
...
...
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