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
aaa123ee
Commit
aaa123ee
authored
Aug 08, 2024
by
王雅楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎈
perf:优化车速、转速、燃油同时结束自检
parent
12a6fe03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
29 deletions
+91
-29
userdefine.h
...BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+90
-28
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
View file @
aaa123ee
...
...
@@ -20,7 +20,7 @@ User definitions
typedef
unsigned
short
MD_STATUS
;
#define HAS_BOOTLOADER (
1
u) // 仅仿真App时设置为0
#define HAS_BOOTLOADER (
0
u) // 仅仿真App时设置为0
#define APP_BASE (0x0000C400ul)
/* Status list definition */
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
aaa123ee
...
...
@@ -9,11 +9,10 @@ uint8_t g_u8UnitSetting = Metric ;
uint8_t
g_u8SelfCheck
=
0
;
/*自检*/
uint16_t
g_u16fuelnumberup
=
0
;
uint16_t
g_u16fuelnumberdown
=
7
;
uint16_t
g_u16vspeednumberup
=
0
;
uint16_t
g_u16vspeednumberdown
=
2
00
;
uint16_t
g_u16vspeednumberdown
=
6
00
;
uint16_t
g_u16espeednumberup
=
0
;
uint16_t
g_u16espeednumberdown
=
120
00
;
uint16_t
g_u16espeednumberdown
=
6
00
;
//自检函数
void
AMT630H_GUI_BACKGRAND_SelfCheck
(
void
);
...
...
@@ -2555,6 +2554,16 @@ static const uint16_t PICList_Fuel[] = {
Pic_0560_586_473
,
Pic_0561_623_473
,
};
static
const
uint16_t
PICList_Fuel_SelfCheck
[]
=
{
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
void
AMT630H_GUI_Light
()
...
...
@@ -2781,10 +2790,12 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
...
...
@@ -2798,6 +2809,65 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
}
/*燃油自检函数*/
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
)
{
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
>
1
)
{
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
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
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0554_315_473
);
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
}
else
{
;
}
}
/*电压显示函数*/
static
void
AMT630H_GUI_Voltage
(
uint16_t
Voltage
)
{
...
...
@@ -3355,35 +3425,27 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
// AMT630H_GUI_Telephone(Telephone);
AMT630H_GUI_Voltage
((
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
))
/
10
);
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
0
);
if
(
g_u16fuelnumberup
<
7
)
if
(
g_u16fuelnumberup
<
1200
)
{
g_u16fuelnumberup
+
+
;
AMT630H_GUI_Fuel
(
g_u16fuelnumberup
);
/*初始化g_u16fuelnumberup = 0*/
g_u16fuelnumberup
+
=
6
;
AMT630H_GUI_Fuel
_SelfCheck
(
g_u16fuelnumberup
/
150
);
/*初始化g_u16fuelnumberup = 0*/
}
else
{
if
(
g_u16fuelnumberdown
>=
1
)
{
AMT630H_GUI_Fuel
(
g_u16fuelnumberdown
);
/*初始化g_u16fuelnumberdown = 7*/
g_u16fuelnumberdown
--
;
/*g_u16fuelnumberdown=0燃油自检结束*/
}
else
{
;
}
;
}
if
(
g_u16vspeednumberup
<
2
00
)
if
(
g_u16vspeednumberup
<
6
00
)
{
AMT630H_GUI_VSpeed
(
g_u16vspeednumberup
);
/*初始化g_u16vspeednumberup = 0*/
g_u16vspeednumberup
+
+
;
AMT630H_GUI_VSpeed
(
g_u16vspeednumberup
/
3
);
/*初始化g_u16vspeednumberup = 0*/
g_u16vspeednumberup
+
=
6
;
}
else
{
if
(
g_u16vspeednumberdown
>
0
)
{
g_u16vspeednumberdown
-
-
;
/*初始化g_u16vspeednumberup=
200*/
AMT630H_GUI_VSpeed
(
g_u16vspeednumberdown
);
/*if g_u16vspeednumberup=0 车速自检结束*/
g_u16vspeednumberdown
-
=
6
;
/*初始化g_u16vspeednumberup=1
200*/
AMT630H_GUI_VSpeed
(
g_u16vspeednumberdown
/
3
);
/*if g_u16vspeednumberup=0 车速自检结束*/
}
else
{
...
...
@@ -3391,23 +3453,23 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
}
}
if
(
g_u16espeednumberup
<=
120
00
)
if
(
g_u16espeednumberup
<=
6
00
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberup
);
/*初始化g_u16espeednumberup = 0*/
g_u16espeednumberup
+=
1000
;
AMT630H_GUI_ESpeed
(
g_u16espeednumberup
*
20
);
/*初始化g_u16espeednumberup = 0*/
g_u16espeednumberup
+=
6
;
}
else
{
if
(
g_u16espeednumberdown
>
0
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
);
/*初始化g_u16espeednumberdown = 120
00*/
g_u16espeednumberdown
-=
1000
;
/*g_u16espeednumberdown = 0 转速自检结束*/
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
*
20
);
/*初始化g_u16espeednumberdown = 6
00*/
g_u16espeednumberdown
-=
6
;
/*g_u16espeednumberdown = 0 转速自检结束*/
}
}
if
(
g_u16fuelnumber
down
==
0
)
if
(
g_u16fuelnumber
up
==
120
0
)
{
AMT630H_GUI_Fuel
(
g_u16fuelnumberdown
);
AMT630H_GUI_Fuel
(
8
);
}
if
(
g_u16vspeednumberdown
==
0
)
{
...
...
@@ -3417,7 +3479,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
);
}
if
((
g_u16fuelnumber
down
==
0
)
&&
(
g_u16vspeednumberdown
==
0
)
&&
(
g_u16espeednumberdown
==
0
))
if
((
g_u16fuelnumber
up
==
120
0
)
&&
(
g_u16vspeednumberdown
==
0
)
&&
(
g_u16espeednumberdown
==
0
))
{
g_u8SelfCheck
=
1
;
/*自检结束标志*/
}
...
...
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