Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
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
ISUZU
VC66_7C
Commits
6f05650c
Commit
6f05650c
authored
Dec 03, 2021
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整报文外发
parent
fe7244ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
17 deletions
+65
-17
Data_Fuel_User.c
source/Application/APP/Data_Fuel/Data_Fuel_User.c
+12
-3
Data_Fuel_User.h
source/Application/APP/Data_Fuel/Data_Fuel_User.h
+1
-0
CAN_FUNC.c
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.c
+52
-14
No files found.
source/Application/APP/Data_Fuel/Data_Fuel_User.c
View file @
6f05650c
...
...
@@ -25,6 +25,7 @@ step 0 17 27 38 47 55 64 70 76
*-----------------------------------------------------------------------------------------------------------------------*/
static
uint8_t
Fuel_CurSeg
=
0
;
static
uint8_t
Fuel_CyrStep
=
0u
;
/*-------------------------------------------------------------------------
* Function Name : Fuel_User_KL30_Init
...
...
@@ -101,7 +102,6 @@ void Fuel_User_Sleep_Init(void)
* Return : None
* onther : 10Ms调用
--------------------------------------------------------------------------*/
static
uint8_t
Fuel_CyrStep
=
0u
;
void
Fuel_User_KL15_ON_Processing_Service
(
void
)
{
AFC_PARA
AFCPara
;
...
...
@@ -169,7 +169,7 @@ void Fuel_User_KL15_ON_Processing_Service(void)
if
(
FuelMode
==
FuelSensorNormal
)
{
Fuel_CurSeg
=
(
uint16_t
)
GetFuelSeg
();
/*段*/
Fuel_CurSeg
=
(
uint16_t
)
GetFuelSeg
();
/*段*/
Fuel_CyrStep
=
(
uint16_t
)
GetFuelStep
();
/*步*/
}
else
...
...
@@ -222,6 +222,11 @@ uint8_t Fuel_Get_CurSeg(void)
{
return
Fuel_CurSeg
;
}
uint8_t
Fuel_Get_CyrStep
(
void
)
{
return
Fuel_CyrStep
;
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_Get_Percent
* Description : 燃油百分比
...
...
@@ -260,7 +265,11 @@ uint16_t Fuel_Get_Res(void)
}
uint16_t
Fuel_Get_Step
(
void
)
{
return
GetFuelStep
();
uint16_t
FuelStep
=
0u
;
FuelStep
=
GetFuelStep
();
return
FuelStep
}
uint8_t
Fuel_Get_LowAlarm
(
void
)
...
...
source/Application/APP/Data_Fuel/Data_Fuel_User.h
View file @
6f05650c
...
...
@@ -20,6 +20,7 @@ extern uint8_t Fuel_Get_Percent(void) ;
extern
uint16_t
Fuel_Get_Res
(
void
)
;
extern
uint16_t
Fuel_Get_Step
(
void
)
;
extern
uint8_t
Fuel_Get_CyrStep
(
void
);
extern
uint8_t
Fuel_Get_LowAlarm
(
void
);
#endif
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.c
View file @
6f05650c
...
...
@@ -255,9 +255,13 @@ void Can_Set_Buff_18FEFC17(uint8_t CopyData[])
uint8_t
Fuel_Level_2
=
0u
;
uint8_t
Engine_Oil_Filter_Differential
=
0u
;
if
(
Fuel_Get_Step
()
>
10u
)
uint16_t
Get_Step
=
0u
;
Get_Step
=
Fuel_Get_Step
();
if
(
Get_Step
>
10u
)
{
Fuel_Level_1
=
(
uint8_t
)((
Fuel_Get_Step
()
-
10u
)
*
50u
/
24u
);
Fuel_Level_1
=
(
uint8_t
)((
Get_Step
-
10u
)
*
50u
/
24u
);
}
else
{
...
...
@@ -440,14 +444,29 @@ void Can_Set_Buff_18FF2A17(uint8_t CopyData[])
/*-------------------------------------------------------------------------
* Function Name : Can_Set_Buff_18FF9D17
* Description :
* Input : None
* Input : None
18FF9D17
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
void
Can_Set_Buff_18FF9D17
(
uint8_t
CopyData
[])
{
CopyData
[
0
]
=
0u
;
/* 1 */
uint8_t
Fuel_Level
=
0u
;
uint16_t
Get_Step
=
0u
;
Get_Step
=
Fuel_Get_Step
();
/*燃油剩余百分比 精度 1% 偏移量 0 */
if
(
Get_Step
>
10u
)
{
Fuel_Level
=
(
uint8_t
)((
Get_Step
-
10u
)
*
100u
/
120u
);
}
else
{
Fuel_Level
=
0u
;
}
CopyData
[
0
]
=
(
uint8_t
)(
Fuel_Level
&
0xFFu
);
/* 1 */
CopyData
[
1
]
=
0u
;
/* 2 */
CopyData
[
2
]
=
0u
;
/* 3 */
CopyData
[
3
]
=
0u
;
/* 4 */
...
...
@@ -460,16 +479,27 @@ void Can_Set_Buff_18FF9D17(uint8_t CopyData[])
/*-------------------------------------------------------------------------
* Function Name : Can_Set_Buff_18FFE517
* Description :
* Input : None
* Input : None
18FFE517
* Output : None
* Return : None
* onther : Event triggered
* onther : Event triggered
事件型报文
--------------------------------------------------------------------------*/
void
Can_Set_Buff_18FFE517
(
uint8_t
CopyData
[])
{
CopyData
[
0
]
=
0u
;
/* 1 */
CopyData
[
1
]
=
0u
;
/* 2 */
CopyData
[
2
]
=
0u
;
/* 3 */
uint8_t
DTC_Clear_Request
=
0u
;
uint8_t
Req_0Point
=
0u
;
uint8_t
Ferry_Mode_Cancel
=
0u
;
uint8_t
System_Demonstration_Request
=
0u
;
DTC_Clear_Request
=
0u
;
Req_0Point
=
0u
;
Ferry_Mode_Cancel
=
0u
;
System_Demonstration_Request
=
0u
;
CopyData
[
0
]
=
(
uint8_t
)(
DTC_Clear_Request
&
0xFFu
)
;
/* 1 */
CopyData
[
1
]
=
(
uint8_t
)(
Req_0Point
&
0xFFu
)
;
/* 2 */
CopyData
[
2
]
=
(
uint8_t
)(((
Ferry_Mode_Cancel
<<
7u
)
&
0x80U
)
|
(
System_Demonstration_Request
&
0x7Fu
))
;
/* 3 */
CopyData
[
3
]
=
0u
;
/* 4 */
CopyData
[
4
]
=
0u
;
/* 5 */
CopyData
[
5
]
=
0u
;
/* 6 */
...
...
@@ -479,7 +509,7 @@ void Can_Set_Buff_18FFE517(uint8_t CopyData[])
/*-------------------------------------------------------------------------
* Function Name : Can_Set_Buff_18EF2D17
* Description :
* Input : None
* Input : None
18EF2D17 未见此报文
* Output : None
* Return : None
* onther : None
...
...
@@ -498,14 +528,18 @@ void Can_Set_Buff_18EF2D17(uint8_t CopyData[])
/*-------------------------------------------------------------------------
* Function Name : Can_Set_Buff_18033317
* Description :
* Input : None
* Input : None
18033317
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
void
Can_Set_Buff_18033317
(
uint8_t
CopyData
[])
{
CopyData
[
0
]
=
0u
;
/* 1 */
uint8_t
Pair_cmd
=
0u
;
Pair_cmd
=
0u
;
CopyData
[
0
]
=
(
uint8_t
)(
Pair_cmd
&
0xFFu
);
/* 1 */
CopyData
[
1
]
=
0u
;
/* 2 */
CopyData
[
2
]
=
0u
;
/* 3 */
CopyData
[
3
]
=
0u
;
/* 4 */
...
...
@@ -517,14 +551,18 @@ void Can_Set_Buff_18033317(uint8_t CopyData[])
/*-------------------------------------------------------------------------
* Function Name : Can_Set_Buff_180433A2
* Description :
* Input : None
* Input : None
180433A2
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
void
Can_Set_Buff_180433A2
(
uint8_t
CopyData
[])
{
CopyData
[
0
]
=
0u
;
/* 1 */
uint8_t
Setup_cmd
=
0u
;
Setup_cmd
=
0u
;
CopyData
[
0
]
=
(
uint8_t
)(
Setup_cmd
&
0xFFu
);
/* 1 */
CopyData
[
1
]
=
0u
;
/* 2 */
CopyData
[
2
]
=
0u
;
/* 3 */
CopyData
[
3
]
=
0u
;
/* 4 */
...
...
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