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
395f6416
Commit
395f6416
authored
Aug 20, 2024
by
王雅楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:【56087】修改燃油自检走格逻辑
parent
ec088745
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
124 additions
and
70 deletions
+124
-70
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+124
-70
No files found.
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
395f6416
...
...
@@ -2765,16 +2765,6 @@ static const uint16_t PICList_ESpeed_NIGHT[] = {
Pic_0716_782_125
,
};
static
const
uint16_t
PICList_Fuel
[]
=
{
Pic_0554_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_RED
[]
=
{
Pic_0562_315_473
,
Pic_0555_366_473
,
Pic_0556_426_473
,
...
...
@@ -2784,6 +2774,16 @@ static const uint16_t PICList_Fuel_RED[] = {
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
,
...
...
@@ -2960,23 +2960,31 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
// }
/*燃油显示函数*/
uint8_t
g_u16_GUI_PerFuelLevel
=
0
;
uint8_t
g_u16_GUI_PerFuelLevel
=
1
;
static
void
AMT630H_GUI_Fuel
(
uint8_t
Fuel
)
{
/*外部传参燃油处于数组第几格*/
/*R>83且处于非开路状态时 黄色燃油灯闪烁*/
/*R开路状态时 黄色燃油灯闪烁*/
/*以上两种情况黄色燃油灯闪烁的频率不同*/
static
uint8_t
s_FuelLowTime
=
0U
;
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
static
uint8_t
s_FuelLowTime
=
0U
;
if
(
Fuel
==
0
)
{
FuelLevel
=
1
;
}
else
{
;
}
if
(
g_u8Display_Mode
==
ModeDAY
)
{
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
(
Fuel
Level
==
0
)
/*
开路状态黄色燃油灯 1HZ
闪烁*/
if
(
Fuel
==
0
)
{
if
(
FLASH_SYNC_1Hz
)
{
...
...
@@ -2984,7 +2992,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
s_FuelLowTime
=
0
;
}
else
if
(
Fuel
Level
==
1
)
else
if
(
Fuel
==
1
)
{
s_FuelLowTime
++
;
if
(
s_FuelLowTime
<=
15
)
...
...
@@ -3007,7 +3015,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
if
(
Fuel
Level
==
0
)
if
(
Fuel
==
0
)
{
if
(
FLASH_SYNC_1Hz
)
{
...
...
@@ -3015,7 +3023,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
s_FuelLowTime
=
0
;
}
else
if
(
Fuel
Level
==
1
)
else
if
(
Fuel
==
1
)
{
s_FuelLowTime
++
;
if
(
s_FuelLowTime
<=
15
)
...
...
@@ -3034,13 +3042,12 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
}
/*燃油格数走格*/
if
(
FuelLevel
>
0
)
{
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
...
...
@@ -3058,27 +3065,60 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
=
FuelLevel
;
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
}
}
else
{
;
}
}
uint16_t
g_u16PerFuel_SelfCheck
=
0
;
/*燃油自检函数*/
static
void
AMT630H_GUI_Fuel_SelfCheck
(
uint8_t
Fuel
)
{
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
if
(
Fuel
==
1
)
{
FuelLevel
=
2
;
}
else
{
;
}
if
(
g_u8Display_Mode
==
ModeDAY
)
{
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*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0551_503_529
);
/*黑色燃油灯*/
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0661_503_529
);
/*白色燃油灯*/
}
/*开机自检燃油走格*/
if
(
FuelLevel
>
0
)
{
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_RED
[
i
]);
}
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
if
(
FuelLevel
>
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
++
;
...
...
@@ -3091,60 +3131,74 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
{
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
=
FuelLevel
;
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_RED
[
i
]);
}
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
}
}
}
/*燃油自检函数*/
static
void
AMT630H_GUI_Fuel_SelfCheck
(
uint8_t
Fuel
)
{
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
if
(
g_u8Display_Mode
==
ModeDAY
)
{
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*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0551_503_529
);
/*黑色燃油灯*/
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0661_503_529
);
/*白色燃油灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0562_315_473
);
/*燃油红区*/
}
/*燃油格数走格*/
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
{
;
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
// if (FuelLevel != g_u16PerFuel_SelfCheck)
// {
// if(g_u16PerFuel_SelfCheck == 0)
// {
// SetPagePic(GRAPHICS_PAGE_0, Pic_0562_315_473);
// }
// else
// {
// for (uint8_t i = 0; i < g_u16PerFuel_SelfCheck; i++)
// {
// SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
// }
// if (FuelLevel > g_u16PerFuel_SelfCheck)
// {
// g_u16PerFuel_SelfCheck++;
// }
// else
// {
// ;
// }
// }
// }
// else
// {
// for (uint8_t i = 0; i < g_u16_GUI_PerFuelLevel; i++)
// {
// SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[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
// {
// ;
// }
// for (uint8_t i = 0; i < g_u16_GUI_PerFuelLevel; i++)
// {
// SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
// }
}
...
...
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