Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
IVECO_NS216
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
时昊
IVECO_NS216
Commits
d45f49fe
Commit
d45f49fe
authored
Aug 30, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改平均油耗问题
parent
0fe665f1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
Data_AvgFuel.c
source/Appliciation/Data_AvgFuel.c
+9
-9
Data_AvgFuel.h
source/Appliciation/Data_AvgFuel.h
+1
-1
FuelConfig.c
source/Appliciation/FuelConfig.c
+1
-1
Task.c
source/Appliciation/Task.c
+1
-0
No files found.
source/Appliciation/Data_AvgFuel.c
View file @
d45f49fe
...
@@ -39,18 +39,18 @@ void CAN_18FEF200_Receive(canlib_uint8_t CopyData [])
...
@@ -39,18 +39,18 @@ void CAN_18FEF200_Receive(canlib_uint8_t CopyData [])
g_aveFuel
.
Flg_18FEF200
=
1
;
g_aveFuel
.
Flg_18FEF200
=
1
;
Data_InsFuel
.
Flg_18FEF200
=
1
;
Data_InsFuel
.
Flg_18FEF200
=
1
;
FuelMeter
.
Flg_18FEF200
=
1
;
FuelMeter
.
Flg_18FEF200
=
1
;
Data_Fuel_Consumption_Count_ISR
(
CopyData
);
//
Data_Fuel_Consumption_Count_ISR(CopyData);
}
}
uint32_t
InsFuel_Cons
=
0
;
uint32_t
InsFuel_Cons
=
0
;
uint16_t
FuelRate
=
0
;
uint16_t
FuelRate
=
0
;
void
Data_Fuel_Consumption_Count_ISR
(
canlib_uint8_t
CopyData
[]
)
//100ms
uint32_t
FuelRate_Cons
=
0
;
uint16_t
InsFuelRate
=
0
;
void
Data_Fuel_Consumption_Count_ISR
(
void
)
//100ms
{
{
uint32_t
FuelRate_Cons
=
0
;
//FuelRate = ((uint16_t)CopyData [1]<< 8u)|CopyData [0];
uint16_t
InsFuelRate
=
0
;
FuelRate
=
Get_CAN_CH0_ID_18FEF200_Sig_EngFuelRate
();
FuelRate
=
((
uint16_t
)
CopyData
[
1
]
<<
8u
)
|
CopyData
[
0
];
if
(
FuelRate
<
0xFFFF
)
if
(
FuelRate
<
0xFFFF
)
{
{
...
@@ -83,7 +83,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms
...
@@ -83,7 +83,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms
if
(
Fuel_Remainder
>=
900
)
if
(
Fuel_Remainder
>=
900
)
{
{
Fuel_Remainder
=
0
;
Fuel_Remainder
=
0
;
}
}
FuelRate_Cons
++
;
FuelRate_Cons
++
;
}
}
...
@@ -94,7 +94,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms
...
@@ -94,7 +94,7 @@ void Data_Fuel_Consumption_Count_ISR(canlib_uint8_t CopyData [] )//100ms
{
{
if
(
g_aveFuel
.
RateSum
<
0x7FFFFFFF
)
if
(
g_aveFuel
.
RateSum
<
0x7FFFFFFF
)
{
{
g_aveFuel
.
RateSum
+
=
FuelRate_Cons
;
//add100ms 100p UL
g_aveFuel
.
RateSum
=
FuelRate_Cons
;
//add100ms 100p UL
}
}
else
else
{
{
...
@@ -157,7 +157,7 @@ void Data_AvgFuel_Processing_Service (void)
...
@@ -157,7 +157,7 @@ void Data_AvgFuel_Processing_Service (void)
if
(
g_aveFuel
.
ValueA
>
199
)
if
(
g_aveFuel
.
ValueA
>
199
)
{
{
g_aveFuel
.
ValueA
=
199
;
g_aveFuel
.
ValueA
=
199
;
}
}
g_aveFuel
.
ValueA_Last
=
g_aveFuel
.
ValueA
;
g_aveFuel
.
ValueA_Last
=
g_aveFuel
.
ValueA
;
}
}
...
...
source/Appliciation/Data_AvgFuel.h
View file @
d45f49fe
...
@@ -61,7 +61,7 @@ uint32_t GET_AvgFuel_ConsOf100msUL_Value(void);
...
@@ -61,7 +61,7 @@ uint32_t GET_AvgFuel_ConsOf100msUL_Value(void);
void
AvgFuel_ConsOf100msUL_Set
(
uint16_t
FuelCons
);
void
AvgFuel_ConsOf100msUL_Set
(
uint16_t
FuelCons
);
void
Data_Fuel_Consumption_Count_ISR
(
canlib_uint8_t
CopyData
[]
);
void
Data_Fuel_Consumption_Count_ISR
(
void
);
void
Data_AvgFuel_TripA_Clear
(
void
);
void
Data_AvgFuel_TripA_Clear
(
void
);
...
...
source/Appliciation/FuelConfig.c
View file @
d45f49fe
...
@@ -125,7 +125,7 @@ void GET_Data_For_YB(void)
...
@@ -125,7 +125,7 @@ void GET_Data_For_YB(void)
MinAFCPara
.
Speed
=
Common_Get_Act_V_Speed
();
MinAFCPara
.
Speed
=
Common_Get_Act_V_Speed
();
MinAFCPara
.
RPM
=
Get_DispEngineSpeed
();
MinAFCPara
.
RPM
=
Get_DispEngineSpeed
();
MinAFCPara
.
CurODO
=
Mile_Get_Index_Value
(
MILE_INDEX_ODO
)
*
100
;
MinAFCPara
.
CurODO
=
Mile_Get_Index_Value
(
MILE_INDEX_ODO
)
*
100
;
if
(
GET_AvgFuel_ConsOf100msUL_Value
()
>=
65
3
35
)
if
(
GET_AvgFuel_ConsOf100msUL_Value
()
>=
65
5
35
)
{
{
MinAFCPara
.
FuleConsume
=
65535
;
MinAFCPara
.
FuleConsume
=
65535
;
}
}
...
...
source/Appliciation/Task.c
View file @
d45f49fe
...
@@ -161,6 +161,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
...
@@ -161,6 +161,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
void
Sys_Run_Mode_100ms_Tasks_Group
(
void
)
void
Sys_Run_Mode_100ms_Tasks_Group
(
void
)
{
{
Data_Fuel_Consumption_Count_ISR
();
TPMS_Tyre_Lost
();
TPMS_Tyre_Lost
();
LED_Driver_Refresh_Example
();
LED_Driver_Refresh_Example
();
PoMa_Sleep_Delay_Time_Handle
();
PoMa_Sleep_Delay_Time_Handle
();
...
...
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