Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
le21_Fuel
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
时昊
le21_Fuel
Commits
006e092d
Commit
006e092d
authored
1 year ago
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加燃油外发
parent
2cd400c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
9 deletions
+56
-9
CAN_CH0_CAN_Communication_Matrix.c
le21_fuel/Sources/Part_3/CAN_CH0_CAN_Communication_Matrix.c
+54
-7
Fuel.c
le21_fuel/Sources/Part_3/Fuel.c
+2
-2
No files found.
le21_fuel/Sources/Part_3/CAN_CH0_CAN_Communication_Matrix.c
View file @
006e092d
...
...
@@ -72,13 +72,21 @@ void Can_Set_Buff_18FF4017(canlib_uint8_t CopyData [])
uint8_t
IC_LanguageMode
=
0
;
uint8_t
IC_MaintanceWarningSts
=
0
;
uint8_t
IC_AirbagUnitLEDSts
=
0
;
uint8_t
IC_FuelLevelLowWarn
=
0
;
uint8_t
IC_FuelLevelSts
=
0
;
uint8_t
IC_FuelLevelStsInvalid
=
0
;
uint8_t
IC_FuelSensorSTGFault
=
0
;
uint8_t
IC_FuelSensorOCFault
=
0
;
IC_FuelLevelSts
=
FuelData
.
Capacity_Get
/
5
;
u16Maintodo
=
(
INT16U
)(
DataServiceInterval
/
10
);
if
(
u16Maintodo
>
50000
)
{
u16Maintodo
=
50000
;
}
if
(
(
DataServiceWarning
==
1
)
||
(
DataServiceDistanceWarning
==
1
)
)
if
(
(
DataServiceWarning
==
1
)
||
(
DataServiceDistanceWarning
==
1
)
)
{
IC_MaintanceWarningSts
=
0x01
;
}
...
...
@@ -86,9 +94,44 @@ void Can_Set_Buff_18FF4017(canlib_uint8_t CopyData [])
{
IC_MaintanceWarningSts
=
0x00
;
}
IC_LanguageMode
=
MenuData
.
Language
;
if
(
SYS_OPR_STAT_IGN_ON
)
{
if
(
FuelData
.
Sensor_State
==
FuelSensorShortCircuit
)
{
IC_FuelSensorSTGFault
=
2
;
}
else
{
IC_FuelSensorSTGFault
=
1
;
}
if
(
FuelData
.
Sensor_State
==
FuelSensorOpenCircuit
)
{
IC_FuelSensorOCFault
=
2
;
}
else
{
IC_FuelSensorOCFault
=
1
;
}
if
(
FuelData
.
Sensor_State
==
FuelSensorNormal
)
{
IC_FuelLevelStsInvalid
=
0
;
if
((
FuelData
.
Step_Get
<=
20
)
&&
(
DataAirPressEn
))
{
IC_FuelLevelLowWarn
=
1
;
}
else
{
IC_FuelLevelLowWarn
=
0
;
}
}
else
{
IC_FuelLevelStsInvalid
=
1
;
}
if
(
Line_In_Get_Status
(
LINE_IN_Driver_SafeBelt
))
{
IC_DrvSeatbeltBucklestatus
=
0x01
;
...
...
@@ -189,7 +232,6 @@ void Can_Set_Buff_18FF4017(canlib_uint8_t CopyData [])
IC_AirbagUnitLEDSts
=
3
;
}
}
}
else
{
...
...
@@ -204,16 +246,21 @@ void Can_Set_Buff_18FF4017(canlib_uint8_t CopyData [])
IC_BrakeFuleLowWarn
=
0
;
//IC_MaintanceWarningSts = 0;
IC_AirbagUnitLEDSts
=
0
;
IC_FuelLevelLowWarn
=
0
;
IC_FuelLevelStsInvalid
=
1
;
IC_FuelSensorSTGFault
=
0
;
IC_FuelSensorOCFault
=
0
;
}
IC_LanguageMode
=
MenuData
.
Language
;
CopyData
[
0
]
=
0xFFu
;
CopyData
[
0
]
=
IC_FuelLevelSts
;
CopyData
[
1
]
=
u16AvgSpd
;
CopyData
[
2
]
=
(
uint8_t
)(
u16Maintodo
&
0xFF
);
CopyData
[
3
]
=
(
uint8_t
)((
u16Maintodo
>>
8
)
&
0xFF
);
CopyData
[
4
]
=
(
IC_PassSeatbeltWarning
<<
7
)
|
(
IC_DrvSeatbeltBucklestatus
<<
6
)
|
(
IC_BrakeFuleLowWarn
<<
5
)
|
(
0x10
)
|
(
IC_LanguageMode
<<
1
)
|
(
IC_MaintanceWarningSts
);
CopyData
[
4
]
=
(
IC_PassSeatbeltWarning
<<
7
)
|
(
IC_DrvSeatbeltBucklestatus
<<
6
)
|
(
IC_BrakeFuleLowWarn
<<
5
)
|
(
IC_FuelLevelLowWarn
<<
4
)
|
(
IC_LanguageMode
<<
1
)
|
(
IC_MaintanceWarningSts
);
CopyData
[
5
]
=
u16AirPress_Front
;
CopyData
[
6
]
=
u16AirPress_Rear
;
CopyData
[
7
]
=
(
IC_PassSeatMidPosbeltWarning
<<
7
)
|
(
IC_AirbagUnitLEDSts
<<
5
)
|
(
0x1F
);
CopyData
[
7
]
=
(
IC_PassSeatMidPosbeltWarning
<<
7
)
|
(
IC_AirbagUnitLEDSts
<<
5
)
|
(
IC_FuelLevelStsInvalid
<<
4
)
|
(
IC_FuelSensorOCFault
<<
2
)
|
(
IC_FuelSensorSTGFault
);
}
void
Can_Set_Buff_18FF4117
(
canlib_uint8_t
CopyData
[])
{
...
...
This diff is collapsed.
Click to expand it.
le21_fuel/Sources/Part_3/Fuel.c
View file @
006e092d
...
...
@@ -245,8 +245,8 @@ void GET_Data_To_DSP(void) //100ms����
if
(
FuelData
.
Sensor_State
==
FuelSensorNormal
)
{
FuelData
.
Res_Valid
=
1
;
if
((
FuelData
.
Res_Get
>=
Fuel_Short_Cricuit_Res
)
&&
(
FuelData
.
Res_Get
<
Fuel_Open_Res
))
FuelData
.
Res_Valid
=
1
;
if
((
FuelData
.
Res_Get
>=
Fuel_Short_Cricuit_Res
)
&&
(
FuelData
.
Res_Get
<
Fuel_Open_Res
))
{
FuelData
.
Flag
=
1
;
FuelData
.
Step_Get
=
GetFuelStep
();
...
...
This diff is collapsed.
Click to expand it.
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