Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
c072d0ac
Commit
c072d0ac
authored
Aug 16, 2024
by
王雅楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangyanan' into 'dev'
🦄
refactor:优化燃油走格函数 See merge request
!37
parents
7a111b47
01a1ab4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
19 deletions
+81
-19
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+81
-19
No files found.
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
c072d0ac
...
...
@@ -24,6 +24,7 @@ void AMT630H_GUI_SETTING(void);
void
AMT630H_GUI_Quit
(
void
);
void
AMT630H_GUI_Phone_Connect
(
void
);
void
AMT630H_GUI_Fault_Information
(
void
);
void
AMT630H_GUI_FaultCode
(
uint8_t
FaultCodevalid
,
uint8_t
FaultCode_hight
,
uint8_t
FaultCode_mid
);
void
AMT630H_GUI_Language_Information
(
void
);
void
AMT630H_GUI_Unit_Information
(
void
);
void
AMT630H_GUI_Display_Mode_Information
(
void
);
...
...
@@ -82,7 +83,7 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0168_350_290
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0169_353_227
);
/*历史故障*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0170_354_162
);
/*当前故障*/
//
AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode());
AMT630H_GUI_FaultCode
(
Get_FaultCode_Valid
(),
Get_Current_Hight_FaultCode
(),
Get_Current_Mid_FaultCode
());
}
else
if
(
g_u8Language
==
EN
)
{
...
...
@@ -99,7 +100,7 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0096_338_228
);
/*Fault history*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0097_334_163
);
/*current fault*/
//
AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode());
AMT630H_GUI_FaultCode
(
Get_FaultCode_Valid
(),
Get_Current_Hight_FaultCode
(),
Get_Current_Mid_FaultCode
());
}
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
...
...
@@ -119,7 +120,7 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0356_353_227
);
/*历史故障*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0357_354_162
);
/*当前故障*/
//
AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode());
AMT630H_GUI_FaultCode
(
Get_FaultCode_Valid
(),
Get_Current_Hight_FaultCode
(),
Get_Current_Mid_FaultCode
());
}
else
if
(
g_u8Language
==
EN
)
{
...
...
@@ -136,7 +137,7 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0284_338_228
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0285_334_163
);
//
AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode());
AMT630H_GUI_FaultCode
(
Get_FaultCode_Valid
(),
Get_Current_Hight_FaultCode
(),
Get_Current_Mid_FaultCode
());
}
}
}
...
...
@@ -2709,6 +2710,16 @@ static const uint16_t PICList_Fuel[] = {
Pic_0560_586_473
,
Pic_0561_623_473
,
};
static
const
uint16_t
PICList_Fuel_RED
[]
=
{
Pic_0562_315_473
,
Pic_0555_366_473
,
Pic_0556_426_473
,
Pic_0557_469_473
,
Pic_0558_514_473
,
Pic_0559_550_473
,
Pic_0560_586_473
,
Pic_0561_623_473
,
};
static
const
uint16_t
PICList_Fuel_SelfCheck
[]
=
{
Pic_0554_315_473
,
Pic_0555_366_473
,
...
...
@@ -2871,7 +2882,7 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
// }
/*燃油显示函数*/
uint8_t
g_u16_GUI_PerFuelLevel
=
1
;
uint8_t
g_u16_GUI_PerFuelLevel
=
0
;
static
void
AMT630H_GUI_Fuel
(
uint8_t
Fuel
)
{
/*外部传参燃油处于数组第几格*/
...
...
@@ -2886,6 +2897,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0553_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0550_715_533
);
/*F*/
/*燃油桶闪烁*/
if
(
FuelLevel
==
0
)
{
if
(
FLASH_SYNC_1Hz
)
...
...
@@ -2923,6 +2935,19 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
}
s_FuelLowTime
=
0
;
}
else
if
(
FuelLevel
==
1
)
{
s_FuelLowTime
++
;
if
(
s_FuelLowTime
<
15
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
}
if
(
s_FuelLowTime
==
20
)
{
s_FuelLowTime
=
0
;
}
}
else
{
...
...
@@ -2931,10 +2956,15 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
/*燃油格数走格*/
if
(
FuelLevel
>
1
)
if
(
FuelLevel
>
0
)
{
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
for
(
uint8_t
i
=
0
;
i
<=
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
if
(
FuelLevel
>
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
++
;
...
...
@@ -2943,25 +2973,57 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
{
g_u16_GUI_PerFuelLevel
--
;
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
else
{
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
=
FuelLevel
;
for
(
uint8_t
i
=
0
;
i
<=
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0562_315_473
);
}
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
for
(
uint8_t
i
=
0
;
i
<=
g_u16_GUI_PerFuelLevel
;
i
++
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_RED
[
i
]);
}
}
if
(
FuelLevel
>
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
++
;
}
else
if
((
FuelLevel
<
g_u16_GUI_PerFuelLevel
)
&&
(
g_u16_GUI_PerFuelLevel
!=
0
))
{
g_u16_GUI_PerFuelLevel
--
;
}
else
{
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
=
FuelLevel
;
for
(
uint8_t
i
=
0
;
i
<=
g_u16_GUI_PerFuelLevel
;
i
++
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_RED
[
i
]);
}
}
}
}
}
...
...
@@ -2999,10 +3061,10 @@ static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel)
{
;
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
}
...
...
@@ -3804,7 +3866,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
/*燃油自检*/
if
(
g_u16fuelnumberup
<
1200
)
{
g_u16fuelnumberup
+=
6
;
g_u16fuelnumberup
+=
6
;
AMT630H_GUI_Fuel_SelfCheck
(
g_u16fuelnumberup
/
150
);
/*初始化g_u16fuelnumberup = 0*/
}
else
...
...
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