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
07a9cd30
Commit
07a9cd30
authored
Aug 08, 2024
by
王雅楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增上电自检
parent
31721fa2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
168 additions
and
15 deletions
+168
-15
GpioUser.c
Firmware/Source/Application/GpioUser.c
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+159
-9
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+8
-5
No files found.
Firmware/Source/Application/GpioUser.c
View file @
07a9cd30
...
...
@@ -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_PIN02
,
GpioOut_High
);
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_PORT06_PIN00
,
GpioOut_Low
);
//存储SCL
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
07a9cd30
...
...
@@ -6,6 +6,17 @@ uint8_t g_u8Display_Mode = ModeDAY;
uint8_t
g_u8Language
=
CH
;
uint8_t
g_u8Backlight
=
Backlight_5
;
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
=
200
;
uint16_t
g_u16espeednumberup
=
0
;
uint16_t
g_u16espeednumberdown
=
12000
;
//自检函数
void
AMT630H_GUI_BACKGRAND_SelfCheck
(
void
);
// 菜单背景,菜单前必带
void
AMT630H_GUI_BACKGRAND
(
void
);
// 菜单调用函数
...
...
@@ -33,11 +44,19 @@ void AMT630H_GUI_Background()
{
if
(
SYS_OPR_STAT_IGN_ON
)
{
AMT630H_GUI_ReadPosittion_Display
();
if
(
g_u8SelfCheck
==
1
)
{
AMT630H_GUI_ReadPosittion_Display
();
}
else
{
AMT630H_GUI_BACKGRAND_SelfCheck
();
}
}
else
{
;
}
}
...
...
@@ -2554,7 +2573,7 @@ static void AMT630H_GUI_Light()
}
if
(
Get_TelltalesLedSts
(
em_LED_Efi_Fault
))
{
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0742_544_22
)
;
}
if
(
Get_TelltalesLedSts
(
em_LED_ABS
))
{
...
...
@@ -2562,21 +2581,25 @@ static void AMT630H_GUI_Light()
}
if
(
Get_TelltalesLedSts
(
em_LED_Auto_Start_Stop
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0745_341_21
);
}
if
(
Get_TelltalesLedSts
(
em_LED_Oil_Pressure_Alert
))
{
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
);
}
else
else
if
(
Get_TelltalesLedSts
(
em_LED_TCS
)
==
2
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0750_106_26
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0751_111_30
);
}
else
{
;
}
if
(
Get_TelltalesLedSts
(
em_LED_HEV
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0747_244_26
);
...
...
@@ -3248,7 +3271,7 @@ void AMT630H_GUI_BACKGRAND()
/*主界面函数*/
AMT630H_GUI_Light
();
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
/
* AMT630H_GUI_Telephone(Telephone); */
/
/ AMT630H_GUI_Telephone(Telephone);
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
{
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
...
...
@@ -3277,9 +3300,136 @@ 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_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
)
{
g_u16fuelnumberup
++
;
AMT630H_GUI_Fuel
(
g_u16fuelnumberup
);
/*初始化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
<
200
)
{
AMT630H_GUI_VSpeed
(
g_u16vspeednumberup
);
/*初始化g_u16vspeednumberup = 0*/
g_u16vspeednumberup
++
;
}
else
{
if
(
g_u16vspeednumberdown
>
0
)
{
g_u16vspeednumberdown
--
;
/*初始化g_u16vspeednumberup=200*/
AMT630H_GUI_VSpeed
(
g_u16vspeednumberdown
);
/*if g_u16vspeednumberup=0 车速自检结束*/
}
else
{
;
}
}
if
(
g_u16espeednumberup
<=
12000
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberup
);
/*初始化g_u16espeednumberup = 0*/
g_u16espeednumberup
+=
1000
;
}
else
{
if
(
g_u16espeednumberdown
>
0
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
);
/*初始化g_u16espeednumberdown = 12000*/
g_u16espeednumberdown
-=
1000
;
/*g_u16espeednumberdown = 0 转速自检结束*/
}
}
if
(
g_u16fuelnumberdown
==
0
)
{
AMT630H_GUI_Fuel
(
g_u16fuelnumberdown
);
}
if
(
g_u16vspeednumberdown
==
0
)
{
AMT630H_GUI_VSpeed
(
g_u16vspeednumberdown
);
}
if
(
g_u16espeednumberdown
==
0
)
{
AMT630H_GUI_ESpeed
(
g_u16espeednumberdown
);
}
if
((
g_u16fuelnumberdown
==
0
)
&&
(
g_u16vspeednumberdown
==
0
)
&&
(
g_u16espeednumberdown
==
0
))
{
g_u8SelfCheck
=
1
;
/*自检结束标志*/
}
else
{
;
}
}
void
AMT630H_GUI_SETTING
()
{
if
(
g_u8Display_Mode
==
ModeDAY
)
{
if
(
g_u8Language
==
CH
)
...
...
@@ -3317,7 +3467,7 @@ void AMT630H_GUI_DisplayProc(void)
SetPageGuid
(
GRAPHICS_PAGE_0
,
1
,
0
,
0
);
AMT630H_GUI_Background
();
PackedTransfer_Page
();
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
07a9cd30
...
...
@@ -134,18 +134,21 @@ static void LED_High_Beam_Execution(Tellib_uint16_t led_status)
}
uint8_t
test
=
0
;
/*硬线-P15 低电平点亮*/
static
Tellib_uint16_t
LED_Efi_Fault_Judgement
(
void
)
{
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
;
test
=
1
;
}
else
{
LED_STATE
=
0u
;
}
return
LED_STATE
;
}
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)
static
Tellib_uint16_t
LED_Auto_Start_Stop_Judgement
(
void
)
{
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
{
LED_STATE
=
0
;
LED_STATE
=
0
u
;
}
return
LED_STATE
;
}
...
...
@@ -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
)
{
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
;
}
...
...
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