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
d865896e
Commit
d865896e
authored
Sep 12, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改瞬时油耗的单位和数值同步显示,2s更新一次
parent
3d2498bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
8 deletions
+27
-8
DataProcess.c
source/Appliciation/DataProcess.c
+22
-6
GUI.c
source/Appliciation/Display/GUI.c
+2
-2
FuelConfig.h
source/Appliciation/FuelConfig.h
+3
-0
No files found.
source/Appliciation/DataProcess.c
View file @
d865896e
...
...
@@ -1067,11 +1067,27 @@ void Data_Instantaneous_Fuel_Display_Service(void)
{
if
(
Data_InsFuel
.
Valid
)
{
//if(Data_InsFuel.Value_Last != Data_InsFuel.Value)
//{
// Data_InsFuel.FreshTime = 0;
// Data_InsFuel.Value_Last = Data_InsFuel.Value;
//}
if
(
Data_InsFuel
.
Value_Last
!=
Data_InsFuel
.
Value
)
{
Data_InsFuel
.
FreshTime
=
0
;
Data_InsFuel
.
Value_Last
=
Data_InsFuel
.
Value
;
}
if
(
Data_InsFuel
.
V_Speed_backup
!=
Common_Get_Act_V_Speed
(
))
{
if
((
Common_Get_Act_V_Speed
(
)
>=
50
)
&&
(
Data_InsFuel
.
V_Speed_backup
<
50
))
{
Data_InsFuel
.
FreshTime
=
0
;
Data_InsFuel
.
Display_Flag
=
1
;
}
if
((
Common_Get_Act_V_Speed
(
)
<
50
)
&&
(
Data_InsFuel
.
V_Speed_backup
>=
50
))
{
Data_InsFuel
.
FreshTime
=
0
;
Data_InsFuel
.
Display_Flag
=
0
;
}
Data_InsFuel
.
V_Speed_backup
=
Common_Get_Act_V_Speed
(
);
}
Data_InsFuel
.
FreshTime
++
;
if
(
Data_InsFuel
.
FreshTime
>=
20
)
//2s
...
...
@@ -1080,7 +1096,7 @@ void Data_Instantaneous_Fuel_Display_Service(void)
Data_InsFuel
.
Display_Value
=
Data_InsFuel
.
Value
;
//100p
Data_InsFuel
.
Display_Value
/=
10
;
//10p
Data_InsFuel
.
Display_Unit
=
Data_InsFuel
.
Display_Flag
;
}
...
...
source/Appliciation/Display/GUI.c
View file @
d865896e
...
...
@@ -1014,7 +1014,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon)
{
if
(
InstantOilCon
>
99
)
{
if
(
Data
VSpeed
>=
50
)
if
(
Data
_InsFuel
.
Display_Unit
==
1
)
{
Draw_Image_Local_Digit_Draw
(
InstantOilCon
,
Number_18_white_List
,
3
,
1
,
InstantOilCon22Digits18PosX
,
171
);
Draw_Image_Local
((
uint8_t
*
)
ECU_Unit_Lkm_01_X0_Y0
,
102
,
171
);
...
...
@@ -1029,7 +1029,7 @@ void Gui_InstantOilCon(uint8_t Valid, uint8_t InstantOilCon)
}
else
{
if
(
Data
VSpeed
>=
50
)
if
(
Data
_InsFuel
.
Display_Unit
==
1
)
{
Draw_Image_Local_Digit_Draw
(
InstantOilCon
,
Number_18_white_List
,
2
,
0
,
InstantOilCon11Digits18PosX
,
171
);
Draw_Image_Local
((
uint8_t
*
)
ECU_Unit_Lkm_01_X0_Y0
,
97
,
171
);
...
...
source/Appliciation/FuelConfig.h
View file @
d865896e
...
...
@@ -222,6 +222,9 @@ typedef struct
uint32_t
RateSum
;
uint8_t
Flg_18FEF200
;
uint32_t
Value_Last
;
uint16_t
V_Speed_backup
;
uint8_t
Display_Flag
;
uint8_t
Display_Unit
;
}
_Data_InsFuel_Struct
;
extern
_Data_InsFuel_Struct
Data_InsFuel
;
#endif
...
...
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