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
019819c8
Commit
019819c8
authored
Aug 09, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into jinshuo
parents
591f6495
1a87a582
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
467 additions
and
31 deletions
+467
-31
GpioUser.c
Firmware/Source/Application/GpioUser.c
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+458
-25
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+8
-5
No files found.
Firmware/Source/Application/GpioUser.c
View file @
019819c8
...
@@ -50,7 +50,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
...
@@ -50,7 +50,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN01
,
GpioOut_Low
);
//切电控制-MCU-OUT-1
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN01
,
GpioOut_Low
);
//切电控制-MCU-OUT-1
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN02
,
GpioOut_High
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN02
,
GpioOut_High
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN03
,
RTE_GPIO_DIR_IN
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN03
,
RTE_GPIO_DIR_IN
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN05
,
RTE_GPIO_DIR_IN
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN05
,
RTE_GPIO_DIR_IN
);
RTE_GPIO_Config
(
RTE_GPIO_PORT06_PIN00
,
GpioOut_Low
);
//存储SCL
RTE_GPIO_Config
(
RTE_GPIO_PORT06_PIN00
,
GpioOut_Low
);
//存储SCL
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
019819c8
...
@@ -6,6 +6,16 @@ uint8_t g_u8Display_Mode = ModeDAY;
...
@@ -6,6 +6,16 @@ uint8_t g_u8Display_Mode = ModeDAY;
uint8_t
g_u8Language
=
CH
;
uint8_t
g_u8Language
=
CH
;
uint8_t
g_u8Backlight
=
Backlight_5
;
uint8_t
g_u8Backlight
=
Backlight_5
;
uint8_t
g_u8UnitSetting
=
Metric
;
uint8_t
g_u8UnitSetting
=
Metric
;
uint8_t
g_u8SelfCheck
=
0
;
/*自检*/
uint16_t
g_u16fuelnumberup
=
0
;
uint16_t
g_u16vspeednumberup
=
0
;
uint16_t
g_u16vspeednumberdown
=
600
;
uint16_t
g_u16espeednumberup
=
0
;
uint16_t
g_u16espeednumberdown
=
600
;
//自检函数
void
AMT630H_GUI_BACKGRAND_SelfCheck
(
void
);
// 菜单背景,菜单前必带
// 菜单背景,菜单前必带
void
AMT630H_GUI_BACKGRAND
(
void
);
void
AMT630H_GUI_BACKGRAND
(
void
);
// 菜单调用函数
// 菜单调用函数
...
@@ -33,11 +43,19 @@ void AMT630H_GUI_Background()
...
@@ -33,11 +43,19 @@ void AMT630H_GUI_Background()
{
{
if
(
SYS_OPR_STAT_IGN_ON
)
if
(
SYS_OPR_STAT_IGN_ON
)
{
{
AMT630H_GUI_ReadPosittion_Display
();
if
(
g_u8SelfCheck
==
1
)
{
AMT630H_GUI_ReadPosittion_Display
();
}
else
{
AMT630H_GUI_BACKGRAND_SelfCheck
();
}
}
}
else
else
{
{
;
}
}
}
}
...
@@ -2536,6 +2554,16 @@ static const uint16_t PICList_Fuel[] = {
...
@@ -2536,6 +2554,16 @@ static const uint16_t PICList_Fuel[] = {
Pic_0560_586_473
,
Pic_0560_586_473
,
Pic_0561_623_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
()
static
void
AMT630H_GUI_Light
()
...
@@ -2554,7 +2582,7 @@ static void AMT630H_GUI_Light()
...
@@ -2554,7 +2582,7 @@ static void AMT630H_GUI_Light()
}
}
if
(
Get_TelltalesLedSts
(
em_LED_Efi_Fault
))
if
(
Get_TelltalesLedSts
(
em_LED_Efi_Fault
))
{
{
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0742_544_22
)
;
}
}
if
(
Get_TelltalesLedSts
(
em_LED_ABS
))
if
(
Get_TelltalesLedSts
(
em_LED_ABS
))
{
{
...
@@ -2562,21 +2590,25 @@ static void AMT630H_GUI_Light()
...
@@ -2562,21 +2590,25 @@ static void AMT630H_GUI_Light()
}
}
if
(
Get_TelltalesLedSts
(
em_LED_Auto_Start_Stop
))
if
(
Get_TelltalesLedSts
(
em_LED_Auto_Start_Stop
))
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0745_341_21
);
}
}
if
(
Get_TelltalesLedSts
(
em_LED_Oil_Pressure_Alert
))
if
(
Get_TelltalesLedSts
(
em_LED_Oil_Pressure_Alert
))
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0738_792_25
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0738_792_25
);
}
}
if
(
Get_TelltalesLedSts
(
em_LED_TCS
))
if
(
Get_TelltalesLedSts
(
em_LED_TCS
)
==
1
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0750_106_26
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0750_106_26
);
}
}
else
else
if
(
Get_TelltalesLedSts
(
em_LED_TCS
)
==
2
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0750_106_26
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0750_106_26
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0751_111_30
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0751_111_30
);
}
}
else
{
;
}
if
(
Get_TelltalesLedSts
(
em_LED_HEV
))
if
(
Get_TelltalesLedSts
(
em_LED_HEV
))
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0747_244_26
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0747_244_26
);
...
@@ -2758,10 +2790,12 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
...
@@ -2758,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
)
{
{
;
}
}
}
}
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
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
...
@@ -2775,6 +2809,50 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
...
@@ -2775,6 +2809,50 @@ 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
>
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
]);
}
}
/*电压显示函数*/
/*电压显示函数*/
static
void
AMT630H_GUI_Voltage
(
uint16_t
Voltage
)
static
void
AMT630H_GUI_Voltage
(
uint16_t
Voltage
)
{
{
...
@@ -2902,7 +2980,7 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
...
@@ -2902,7 +2980,7 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
}
}
/*大计里程显示函数*/
/*大计里程显示函数*/
static
void
AMT630H_GUI_ODO
(
uint32_t
ODO
,
uint8_t
mode
)
static
void
AMT630H_GUI_ODO
(
uint32_t
ODO
,
uint8_t
Uint
)
{
{
if
(
g_u8Display_Mode
==
ModeDAY
)
if
(
g_u8Display_Mode
==
ModeDAY
)
{
{
...
@@ -2920,37 +2998,79 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
...
@@ -2920,37 +2998,79 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
{
{
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
MinDigits
=
6
;
DisplayNumPara
.
MinDigits
=
6
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_211_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_211_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_211_324
);
/*mile*/
}
}
}
else
if
((
ODONumber
<
100000
)
&&
(
ODONumber
>=
10000
))
else
if
((
ODONumber
<
100000
)
&&
(
ODONumber
>=
10000
))
{
{
DisplayNumPara
.
x
=
149
;
DisplayNumPara
.
x
=
149
;
DisplayNumPara
.
MinDigits
=
5
;
DisplayNumPara
.
MinDigits
=
5
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_187_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_187_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_187_324
);
/*mile*/
}
}
}
else
if
((
ODONumber
<
10000
)
&&
(
ODONumber
>=
1000
))
else
if
((
ODONumber
<
10000
)
&&
(
ODONumber
>=
1000
))
{
{
DisplayNumPara
.
x
=
125
;
DisplayNumPara
.
x
=
125
;
DisplayNumPara
.
MinDigits
=
4
;
DisplayNumPara
.
MinDigits
=
4
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_163_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_163_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_163_324
);
/*mile*/
}
}
}
else
if
((
ODONumber
<
1000
)
&&
(
ODONumber
>=
100
))
else
if
((
ODONumber
<
1000
)
&&
(
ODONumber
>=
100
))
{
{
DisplayNumPara
.
x
=
101
;
DisplayNumPara
.
x
=
101
;
DisplayNumPara
.
MinDigits
=
3
;
DisplayNumPara
.
MinDigits
=
3
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_139_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_139_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_139_324
);
/*mile*/
}
}
}
else
if
((
ODONumber
<
100
)
&&
(
ODONumber
>=
10
))
else
if
((
ODONumber
<
100
)
&&
(
ODONumber
>=
10
))
{
{
DisplayNumPara
.
x
=
77
;
DisplayNumPara
.
x
=
77
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNumPara
.
MinDigits
=
2
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_115_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_115_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_115_324
);
/*mile*/
}
}
}
else
if
((
ODONumber
<
10
)
&&
(
ODONumber
>=
0
))
else
if
((
ODONumber
<
10
)
&&
(
ODONumber
>=
0
))
{
{
DisplayNumPara
.
x
=
53
;
DisplayNumPara
.
x
=
53
;
DisplayNumPara
.
MinDigits
=
1
;
DisplayNumPara
.
MinDigits
=
1
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_91_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_91_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_91_324
);
/*mile*/
}
}
}
else
else
{
{
...
@@ -2967,39 +3087,86 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
...
@@ -2967,39 +3087,86 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
uint16_t
ODONumber
;
uint16_t
ODONumber
;
ODONumber
=
ODO
;
ODONumber
=
ODO
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_NIGHT
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_NIGHT
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
DecimalNum
=
0
;
if
((
ODONumber
<
1000000
)
&&
(
ODONumber
>=
100000
))
if
((
ODONumber
<
1000000
)
&&
(
ODONumber
>=
100000
))
{
{
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
MinDigits
=
6
;
DisplayNumPara
.
MinDigits
=
6
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_211_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_211_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_211_324
);
/*单位mile*/
}
}
}
else
if
((
ODONumber
<
100000
)
&&
(
ODONumber
>=
10000
))
else
if
((
ODONumber
<
100000
)
&&
(
ODONumber
>=
10000
))
{
{
DisplayNumPara
.
x
=
149
;
DisplayNumPara
.
MinDigits
=
5
;
DisplayNumPara
.
MinDigits
=
5
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_187_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_187_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_187_324
);
/*单位mile*/
}
}
}
else
if
((
ODONumber
<
10000
)
&&
(
ODONumber
>=
1000
))
else
if
((
ODONumber
<
10000
)
&&
(
ODONumber
>=
1000
))
{
{
DisplayNumPara
.
x
=
125
;
DisplayNumPara
.
MinDigits
=
4
;
DisplayNumPara
.
MinDigits
=
4
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_163_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_163_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_163_324
);
/*单位mile*/
}
}
}
else
if
((
ODONumber
<
1000
)
&&
(
ODONumber
>=
100
))
else
if
((
ODONumber
<
1000
)
&&
(
ODONumber
>=
100
))
{
{
DisplayNumPara
.
x
=
101
;
DisplayNumPara
.
MinDigits
=
3
;
DisplayNumPara
.
MinDigits
=
3
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_139_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_139_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_139_324
);
/*单位mile*/
}
}
}
else
if
((
ODONumber
<
100
)
&&
(
ODONumber
>=
10
))
else
if
((
ODONumber
<
100
)
&&
(
ODONumber
>=
10
))
{
{
DisplayNumPara
.
x
=
77
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNumPara
.
MinDigits
=
2
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_115_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_115_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_115_324
);
/*单位mile*/
}
}
}
else
if
((
ODONumber
<
10
)
&&
(
ODONumber
>=
0
))
else
if
((
ODONumber
<
10
)
&&
(
ODONumber
>=
0
))
{
{
DisplayNumPara
.
x
=
53
;
DisplayNumPara
.
MinDigits
=
1
;
DisplayNumPara
.
MinDigits
=
1
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_91_324
);
/*KM*/
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_91_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_91_324
);
/*单位mile*/
}
}
}
else
else
{
{
...
@@ -3013,6 +3180,131 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
...
@@ -3013,6 +3180,131 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
}
}
}
}
/*小计里程显示函数*/
static
void
AMT630H_GUI_Trip
(
uint32_t
Trip
,
uint8_t
Uint
)
{
DISPLAY_NUM_ST
DisplayNumPara
;
uint32_t
Tripnumber
;
Tripnumber
=
Trip
;
if
(
g_u8Display_Mode
==
ModeDAY
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0577_48_272
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0862_54_297
);
/*TRIP图标*/
DisplayNumPara
.
NumList
=
NumbeList_ODO_DAY
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
1
;
/*小数点后一位*/
if
((
Tripnumber
<
10000
)
&&
(
Tripnumber
>=
1000
))
{
DisplayNumPara
.
x
=
125
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_163_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_163_324
);
/*单位mile*/
}
}
else
if
((
Tripnumber
<
1000
)
&&
(
Tripnumber
>=
100
))
{
DisplayNumPara
.
x
=
101
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_139_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_139_324
);
/*单位mile*/
}
}
else
if
((
Tripnumber
<
100
)
&&
(
Tripnumber
>=
10
))
{
DisplayNumPara
.
x
=
77
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_115_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_115_324
);
/*单位mile*/
}
}
else
if
((
Tripnumber
<
10
)
&&
(
Tripnumber
>=
0
))
{
DisplayNumPara
.
x
=
53
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_91_324
);
/*单位KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0861_91_324
);
/*单位mile*/
}
}
}
else
if
(
g_u8Display_Mode
==
ModeDAY
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0685_48_272
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0864_54_297
);
/*TRIP图标*/
DisplayNumPara
.
NumList
=
NumbeList_ODO_NIGHT
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
1
;
/*小数点后一位*/
if
((
Tripnumber
<
10000
)
&&
(
Tripnumber
>=
1000
))
{
DisplayNumPara
.
x
=
125
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_163_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_163_324
);
/*单位mile*/
}
}
else
if
((
Tripnumber
<
1000
)
&&
(
Tripnumber
>=
100
))
{
DisplayNumPara
.
x
=
101
;
DisplayNumPara
.
MinDigits
=
4
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_139_324
);
/*KM*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_139_324
);
/*单位mile*/
}
else
if
((
Tripnumber
<
100
)
&&
(
Tripnumber
>=
10
))
{
DisplayNumPara
.
x
=
77
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_115_324
);
/*KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_115_324
);
/*单位mile*/
}
}
else
if
((
Tripnumber
<
10
)
&&
(
Tripnumber
>=
0
))
{
DisplayNumPara
.
x
=
53
;
DisplayNumPara
.
MinDigits
=
4
;
if
(
Uint
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_91_324
);
/*单位KM*/
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0863_91_324
);
/*单位mile*/
}
}
}
}
/*车速显示函数*/
/*车速显示函数*/
static
void
AMT630H_GUI_VSpeed
(
uint16_t
VSpeed
)
static
void
AMT630H_GUI_VSpeed
(
uint16_t
VSpeed
)
{
{
...
@@ -3248,7 +3540,9 @@ void AMT630H_GUI_BACKGRAND()
...
@@ -3248,7 +3540,9 @@ void AMT630H_GUI_BACKGRAND()
/*主界面函数*/
/*主界面函数*/
AMT630H_GUI_Light
();
AMT630H_GUI_Light
();
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
/* AMT630H_GUI_Telephone(Telephone); */
AMT630H_GUI_Voltage
((
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
))
/
10
);
// AMT630H_GUI_Telephone(Telephone);
/*燃油*/
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
{
{
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
...
@@ -3257,8 +3551,16 @@ void AMT630H_GUI_BACKGRAND()
...
@@ -3257,8 +3551,16 @@ void AMT630H_GUI_BACKGRAND()
{
{
AMT630H_GUI_Fuel
(
0
);
AMT630H_GUI_Fuel
(
0
);
}
}
AMT630H_GUI_Voltage
((
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
))
/
10
);
/*里程*/
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
0
);
if
(
Get_Dis_OdoAndTrip
()
==
0
)
{
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
Get_Dis_Unit
());
}
else
{
AMT630H_GUI_Trip
(
Get_Trip_Value
(),
Get_Dis_Unit
());
}
/*车速*/
if
(
Get_VechileSpeedValid
()
==
1
)
if
(
Get_VechileSpeedValid
()
==
1
)
{
{
AMT630H_GUI_VSpeed
(
Get_DispVechileSpeed
()
/
10
);
AMT630H_GUI_VSpeed
(
Get_DispVechileSpeed
()
/
10
);
...
@@ -3267,6 +3569,7 @@ void AMT630H_GUI_BACKGRAND()
...
@@ -3267,6 +3569,7 @@ void AMT630H_GUI_BACKGRAND()
{
{
AMT630H_GUI_VSpeed
(
0
);
AMT630H_GUI_VSpeed
(
0
);
}
}
/*转速*/
if
(
Get_EngineValid
()
==
1
)
if
(
Get_EngineValid
()
==
1
)
{
{
AMT630H_GUI_ESpeed
(
Get_DispEngineSpeed
());
AMT630H_GUI_ESpeed
(
Get_DispEngineSpeed
());
...
@@ -3277,9 +3580,139 @@ void AMT630H_GUI_BACKGRAND()
...
@@ -3277,9 +3580,139 @@ void AMT630H_GUI_BACKGRAND()
}
}
}
}
void
AMT630H_GUI_SETTING
()
/*自检*/
void
AMT630H_GUI_BACKGRAND_SelfCheck
()
{
{
/*背景图*/
if
(
g_u8Display_Mode
==
ModeDAY
)
{
if
(
g_u8Language
==
CH
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0382_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0753_109_331
);
}
else
if
(
g_u8Language
==
EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0382_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0753_109_331
);
}
}
if
(
g_u8Display_Mode
==
ModeNIGHT
)
{
if
(
g_u8Language
==
CH
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0001_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0754_109_347
);
}
else
if
(
g_u8Language
==
EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0001_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0754_109_347
);
}
}
/*指示灯显示*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0752_28_13
);
/*左转向*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0736_941_13
);
/*右转向*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0744_402_21
);
/*远光灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0742_544_22
);
/*电喷故障指示灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0743_476_20
);
/*ABS*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0745_341_21
);
/*自动启停灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0738_792_25
);
/*机油压力灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0750_106_26
);
/*TCS*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0751_111_30
);
/* / */
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0747_244_26
);
/*HEV*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0741_616_20
);
/*水温灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0737_875_23
);
/*WIFI*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0740_682_21
);
/*蓝牙*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0748_194_26
);
/*E*/
//SetPagePic(GRAPHICS_PAGE_0, Pic_0749_192_26);/*S*/
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
AMT630H_GUI_Voltage
((
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
))
/
10
);
// AMT630H_GUI_Telephone(Telephone);
/*里程 无自检*/
if
(
Get_Dis_OdoAndTrip
()
==
0
)
{
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
Get_Dis_Unit
());
}
else
{
AMT630H_GUI_Trip
(
Get_Trip_Value
(),
Get_Dis_Unit
());
}
/*燃油自检*/
if
(
g_u16fuelnumberup
<
1200
)
{
g_u16fuelnumberup
+=
6
;
AMT630H_GUI_Fuel_SelfCheck
(
g_u16fuelnumberup
/
150
);
/*初始化g_u16fuelnumberup = 0*/
}
else
{
;
}
/*车速自检*/
if
(
g_u16vspeednumberup
<
600
)
{
AMT630H_GUI_VSpeed
(
g_u16vspeednumberup
/
3
);
/*初始化g_u16vspeednumberup = 0*/
g_u16vspeednumberup
+=
6
;
}
else
{
if
(
g_u16vspeednumberdown
>
0
)
{
g_u16vspeednumberdown
-=
6
;
/*初始化g_u16vspeednumberup=1200*/
AMT630H_GUI_VSpeed
(
g_u16vspeednumberdown
/
3
);
/*if g_u16vspeednumberup=0 车速自检结束*/
}
else
{
;
}
}
/*转速自检*/
if
(
g_u16espeednumberup
<=
600
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberup
*
20
);
/*初始化g_u16espeednumberup = 0*/
g_u16espeednumberup
+=
6
;
}
else
{
if
(
g_u16espeednumberdown
>
0
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
*
20
);
/*初始化g_u16espeednumberdown = 600*/
g_u16espeednumberdown
-=
6
;
/*g_u16espeednumberdown = 0 转速自检结束*/
}
}
/*结束状态*/
if
(
g_u16fuelnumberup
==
1200
)
{
AMT630H_GUI_Fuel
(
8
);
}
if
(
g_u16vspeednumberdown
==
0
)
{
AMT630H_GUI_VSpeed
(
g_u16vspeednumberdown
);
}
if
(
g_u16espeednumberdown
==
0
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
);
}
/*结束自检*/
if
((
g_u16fuelnumberup
==
1200
)
&&
(
g_u16vspeednumberdown
==
0
)
&&
(
g_u16espeednumberdown
==
0
))
{
g_u8SelfCheck
=
1
;
/*自检结束标志*/
}
else
{
;
}
}
void
AMT630H_GUI_SETTING
()
{
if
(
g_u8Display_Mode
==
ModeDAY
)
if
(
g_u8Display_Mode
==
ModeDAY
)
{
{
if
(
g_u8Language
==
CH
)
if
(
g_u8Language
==
CH
)
...
@@ -3317,7 +3750,7 @@ void AMT630H_GUI_DisplayProc(void)
...
@@ -3317,7 +3750,7 @@ void AMT630H_GUI_DisplayProc(void)
SetPageGuid
(
GRAPHICS_PAGE_0
,
1
,
0
,
0
);
SetPageGuid
(
GRAPHICS_PAGE_0
,
1
,
0
,
0
);
AMT630H_GUI_Background
();
AMT630H_GUI_Background
();
PackedTransfer_Page
();
PackedTransfer_Page
();
}
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
019819c8
...
@@ -134,18 +134,21 @@ static void LED_High_Beam_Execution(Tellib_uint16_t led_status)
...
@@ -134,18 +134,21 @@ static void LED_High_Beam_Execution(Tellib_uint16_t led_status)
}
}
uint8_t
test
=
0
;
/*硬线-P15 低电平点亮*/
/*硬线-P15 低电平点亮*/
static
Tellib_uint16_t
LED_Efi_Fault_Judgement
(
void
)
static
Tellib_uint16_t
LED_Efi_Fault_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Line_In_Get_Status
(
LINE_IN_Efi_Fault
)
==
0u
)
if
(
Line_In_Get_Status
(
LINE_IN_Efi_Fault
))
{
{
LED_STATE
=
1u
;
LED_STATE
=
1u
;
test
=
1
;
}
}
else
else
{
{
LED_STATE
=
0u
;
LED_STATE
=
0u
;
}
}
return
LED_STATE
;
return
LED_STATE
;
}
}
static
void
LED_Efi_Fault_Execution
(
Tellib_uint16_t
led_status
)
static
void
LED_Efi_Fault_Execution
(
Tellib_uint16_t
led_status
)
...
@@ -177,13 +180,13 @@ static void LED_ABS_Execution(Tellib_uint16_t led_status)
...
@@ -177,13 +180,13 @@ static void LED_ABS_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Auto_Start_Stop_Judgement
(
void
)
static
Tellib_uint16_t
LED_Auto_Start_Stop_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Line_In_Get_Status
(
LINE_IN_Auto_Start_Stop
)
==
0
)
if
(
Line_In_Get_Status
(
LINE_IN_Auto_Start_Stop
))
{
{
LED_STATE
=
1
;
LED_STATE
=
1
u
;
}
}
else
else
{
{
LED_STATE
=
0
;
LED_STATE
=
0
u
;
}
}
return
LED_STATE
;
return
LED_STATE
;
}
}
...
@@ -197,7 +200,7 @@ static void LED_Auto_Start_Stop_Execution(Tellib_uint16_t led_status)
...
@@ -197,7 +200,7 @@ static void LED_Auto_Start_Stop_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Oil_Pressure_Alert_Judgement
(
void
)
static
Tellib_uint16_t
LED_Oil_Pressure_Alert_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Line_In_Get_Status
(
LINE_IN_Oil_Pressure_Alert
)
==
0
)
if
(
Line_In_Get_Status
(
LINE_IN_Oil_Pressure_Alert
))
{
{
LED_STATE
=
1
;
LED_STATE
=
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