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
c384bd32
Commit
c384bd32
authored
1 year ago
by
王佳伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into wjw_dev
parents
222a0f70
006057f4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1120 additions
and
56 deletions
+1120
-56
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+10
-0
FaultCode.c
Firmware/Source/Application/FaultCode.c
+397
-0
FaultCode.h
Firmware/Source/Application/FaultCode.h
+60
-0
GpioUser.c
Firmware/Source/Application/GpioUser.c
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+628
-40
Line_In_user.c
Firmware/Source/Component/Line_In/Line_In_user.c
+10
-10
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+4
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+8
-5
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+2
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
c384bd32
...
...
@@ -718,6 +718,16 @@
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\Can_User.c
</FilePath>
</File>
<File>
<FileName>
FaultCode.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode.c
</FilePath>
</File>
<File>
<FileName>
FaultCode.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode.h
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/FaultCode.c
0 → 100644
View file @
c384bd32
#include "FaultCode.h"
static
_st_Init
FaultCodeInit
;
static
uint16_t
u16FaultCodeDtcCount
=
0
;
static
uint16_t
u16FaultCodeDtcCountBack
=
0
;
static
uint16_t
u16FaultCodeDtcCounttemp
=
0
;
static
_st_FaultCode
stFaultCode
[
MaxFaultCode
]
=
{
0
};
static
_st_FaultCode
stFaultCodeBack
[
MaxFaultCode
]
=
{
0
};
static
_st_FaultCode
stFaultCodetemp
[
MaxFaultCode
]
=
{
0
};
static
uint8_t
u8FaultCodeValid
=
0
;
uint32_t
Get_FaultCodeDtc1
(
void
)
{
uint32_t
u16FaultCode
=
0x0000
;
uint8_t
DTCH1
=
0
;
uint8_t
DTCM1
=
0
;
uint32_t
DTC1
=
0
;
DTCH1
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCH1
();
DTCM1
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCM1
();
if
(
DTCH1
>
0
)
{
DTC1
|=
(
DTCH1
&
0xFF
);
}
else
{
;
}
DTC1
<<=
8
;
if
(
DTCM1
>
0
)
{
DTC1
|=
(
DTCM1
&
0xFF
);
}
else
{
;
}
// if (((DTCH1 & 0xF0) >> 4) >= 0xA)
// {
// DTC1 |= ((DTCH1 & 0xF0) >> 4);
// }
// else
// {
// DTC1 |= (DTCH1 & 0xF0) >> 4;
// }
// DTC1 <<= 8;
// if ((DTCH1 & 0xF) >= 0xA)
// {
// DTC1 |= (DTCH1 & 0xF);
// }
// else
// {
// DTC1 |= DTCH1 & 0xF;
// }
// DTC1 <<= 8;
// if (((DTCM1 & 0xF0) >> 4) >= 0xA)
// {
// DTC1 |= ((DTCM1 & 0xF0) >> 4) + 3;
// }
// else
// {
// DTC1 |= (DTCM1 & 0xF0) >> 4;
// }
// DTC1 <<= 8;
// if ((DTCM1 & 0xF) >= 0xA)
// {
// DTC1 |= (DTCM1 & 0xF) ;
// }
// else
// {
// DTC1 |= DTCM1 & 0xF;
// }
if
(
DTC1
==
0
)
{
return
0XFFFF
;
}
u16FaultCode
=
DTC1
;
return
u16FaultCode
;
}
uint32_t
Get_FaultCodeDtc2
(
void
)
{
uint32_t
u16FaultCode
=
0x0000
;
uint8_t
DTCH2
=
0
;
uint8_t
DTCM2
=
0
;
uint32_t
DTC2
=
0
;
DTCH2
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCH2
();
DTCM2
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCM2
();
if
(
DTCH2
>
0
)
{
DTC2
|=
(
DTCH2
&
0xFF
);
}
else
{
;
}
DTC2
<<=
8
;
if
(
DTCM2
>
0
)
{
DTC2
|=
(
DTCM2
&
0xFF
);
}
else
{
;
}
// if (((DTCH2 & 0xF0) >> 4) >= 0xA)
// {
// DTC2 |= ((DTCH2 & 0xF0) >> 4) + 3;
// }
// else
// {
// DTC2 |= (DTCH2 & 0xF0) >> 4;
// }
// DTC2 <<= 8;
// if ((DTCH2 & 0xF) >= 0xA)
// {
// DTC2 |= (DTCH2 & 0xF) + 3;
// }
// else
// {
// DTC2 |= DTCH2 & 0xF;
// }
// DTC2 <<= 8;
// if (((DTCM2 & 0xF0) >> 4) >= 0xA)
// {
// DTC2 |= ((DTCM2 & 0xF0) >> 4) + 3;
// }
// else
// {
// DTC2 |= (DTCM2 & 0xF0) >> 4;
// }
// DTC2 <<= 8;
// if ((DTCM2 & 0xF) >= 0xA)
// {
// DTC2 |= (DTCM2 & 0xF) + 3;
// }
// else
// {
// DTC2 |= DTCM2 & 0xF;
// }
if
(
DTC2
==
0
)
{
return
0XFFFF
;
}
u16FaultCode
=
DTC2
;
return
u16FaultCode
;
}
uint16_t
Get_FaultCodeNum
(
void
)
{
uint16_t
u16FaultCode
=
0x0000
;
u16FaultCode
=
Get_CAN_CH0_ID_402_Sig_ECU_DTC1Amnt
();
return
u16FaultCode
;
}
uint16_t
Get_FaultCodeValid
(
void
)
{
return
1
;
}
/**
* @brief 故障码初始化函数
*/
void
FaultCode_Init
(
void
)
{
uint16_t
i
=
0
;
for
(
i
=
0
;
i
<
MaxFaultCode
;
i
++
)
{
stFaultCode
[
i
].
u16FaultCode
=
0
;
stFaultCode
[
i
].
u16FaultCodeCount
=
0
;
stFaultCodeBack
[
i
].
u16FaultCode
=
0
;
stFaultCodeBack
[
i
].
u16FaultCodeCount
=
0
;
stFaultCodetemp
[
i
].
u16FaultCode
=
0
;
stFaultCodetemp
[
i
].
u16FaultCodeCount
=
0
;
}
FaultCodeInit
.
callbacks
[
DTC1
]
=
Get_FaultCodeDtc1
;
FaultCodeInit
.
callbacks
[
DTC2
]
=
Get_FaultCodeDtc2
;
FaultCodeInit
.
callbacks
[
DTC3
]
=
NULL
;
FaultCodeInit
.
FaultCodeVaildCbk
=
Get_FaultCodeValid
;
FaultCodeInit
.
FaultCodeNumCbk
=
Get_FaultCodeNum
;
u16FaultCodeDtcCountBack
=
0
;
u8FaultCodeValid
=
0
;
}
/**
* @brief 查询当前故障码是否存在
* @param u32FaultCode 故障码
* @param FaultCodeGrpup 故障码组
* @param len 故障码组长度
* @return 0:存在 1:不存在 2:无效故障码不存储
*/
uint8_t
FaultCode_Check
(
const
uint32_t
u32FaultCode
,
const
_st_FaultCode
*
FaultCodeGrpup
,
const
uint16_t
len
)
{
uint16_t
i
=
0
;
uint8_t
Result
=
1
;
if
((
u32FaultCode
==
0XFFFF
)
||
(
u32FaultCode
==
0
))
{
return
2
;
}
if
(
len
==
1
)
{
return
1
;
}
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
u32FaultCode
==
FaultCodeGrpup
[
i
].
u16FaultCode
)
{
Result
=
0
;
return
Result
;
}
}
return
Result
;
}
/**
* 添加新的故障码到故障码数组中。
* @param faultCodes 指向故障码数组的指针。
* @param count 指向当前已添加故障码数量的指针。
* @param faultCode 要添加的故障码。
* @param len 实际故障码数量,用于检测数组中是否存在当前故障码
* @note 如果故障码数组已满或者新的故障码已存在,则不添加。
*/
void
AddNewFaultCode
(
_st_FaultCode
*
faultCodes
,
uint16_t
*
count
,
uint32_t
faultCode
,
uint16_t
len
)
{
if
(
*
count
>=
MaxFaultCode
||
FaultCode_Check
(
faultCode
,
faultCodes
,
len
)
!=
1
)
{
return
;
// 数组已满或故障码已存在,不进行添加
}
faultCodes
[
*
count
].
u16FaultCode
=
faultCode
;
(
*
count
)
++
;
}
/**
* @brief 故障码服务函数
* @param Cycle 建议10ms调用 防止故障码数量过多 接收缓慢
*/
void
FaultCode_Service
(
uint16_t
Cycle
)
{
uint32_t
Dtc1
=
0XFFFF
;
uint32_t
Dtc2
=
0XFFFF
;
uint32_t
Dtc3
=
0XFFFF
;
uint16_t
FaultCodeSum
=
0
;
uint16_t
i
=
0
;
uint32_t
tempFaultCode
=
0
;
uint16_t
Vaild
=
0
;
if
(
FaultCodeInit
.
callbacks
[
DTC1
]
!=
NULL
)
{
Dtc1
=
FaultCodeInit
.
callbacks
[
DTC1
]();
}
if
(
FaultCodeInit
.
callbacks
[
DTC2
]
!=
NULL
)
{
Dtc2
=
FaultCodeInit
.
callbacks
[
DTC2
]();
}
if
(
FaultCodeInit
.
callbacks
[
DTC3
]
!=
NULL
)
{
Dtc3
=
FaultCodeInit
.
callbacks
[
DTC3
]();
}
if
(
FaultCodeInit
.
FaultCodeVaildCbk
!=
NULL
)
{
Vaild
=
FaultCodeInit
.
FaultCodeVaildCbk
();
}
if
(
FaultCodeInit
.
FaultCodeNumCbk
!=
NULL
)
{
FaultCodeSum
=
FaultCodeInit
.
FaultCodeNumCbk
();
}
if
(
FaultCodeSum
>
MaxFaultCode
)
{
FaultCodeSum
=
MaxFaultCode
;
}
if
((
Vaild
)
&&
(
FaultCodeSum
>
0
))
{
if
(
u16FaultCodeDtcCountBack
<
FaultCodeSum
)
/* 当前存储故障码是否小于实际故障码数量 */
{
/* 存储故障码并检查数组中是否存在 */
AddNewFaultCode
(
stFaultCodeBack
,
&
u16FaultCodeDtcCountBack
,
Dtc1
,
FaultCodeSum
);
AddNewFaultCode
(
stFaultCodeBack
,
&
u16FaultCodeDtcCountBack
,
Dtc2
,
FaultCodeSum
);
}
/* 接收故障码大于0后进行显示 */
if
(
u16FaultCodeDtcCountBack
>
0
)
{
/* 当前存储故障码等于实际故障码数量 用于实时更新故障码*/
if
(
u16FaultCodeDtcCountBack
==
FaultCodeSum
)
{
u16FaultCodeDtcCountBack
=
0
;
}
/* 更新故障码显示 */
for
(
i
=
0
;
i
<
FaultCodeSum
;
i
++
)
{
if
(
stFaultCodetemp
[
i
].
u16FaultCode
!=
stFaultCodeBack
[
i
].
u16FaultCode
)
{
stFaultCodetemp
[
i
].
u16FaultCode
=
stFaultCodeBack
[
i
].
u16FaultCode
;
stFaultCode
[
i
].
u16FaultCode
=
stFaultCodetemp
[
i
].
u16FaultCode
;
}
}
u8FaultCodeValid
=
1
;
/* 大于故障码数量的数组进行清0处理 */
for
(
i
=
FaultCodeSum
;
i
<
MaxFaultCode
;
i
++
)
{
stFaultCode
[
i
].
u16FaultCode
=
0
;
stFaultCodetemp
[
i
].
u16FaultCode
=
0
;
stFaultCodeBack
[
i
].
u16FaultCode
=
0
;
}
}
if
(
stFaultCode
[
0
].
u16FaultCode
!=
0XFFFF
)
{
/* 故障码计时 */
if
(
stFaultCode
[
0
].
u16FaultCodeCount
<
FaultCodeCount
)
{
stFaultCode
[
0
].
u16FaultCodeCount
+=
Cycle
;
}
else
{
/* 计时结束 更新位置 */
stFaultCode
[
0
].
u16FaultCodeCount
=
0
;
tempFaultCode
=
stFaultCode
[
0
].
u16FaultCode
;
if
(
FaultCodeSum
>
1
)
{
for
(
i
=
0
;
i
<
FaultCodeSum
-
1
;
i
++
)
{
stFaultCode
[
i
].
u16FaultCode
=
stFaultCode
[
i
+
1
].
u16FaultCode
;
}
stFaultCode
[
FaultCodeSum
-
1
].
u16FaultCode
=
tempFaultCode
;
}
}
}
}
else
{
u8FaultCodeValid
=
0
;
for
(
i
=
0
;
i
<
MaxFaultCode
;
i
++
)
{
stFaultCode
[
i
].
u16FaultCode
=
0
;
stFaultCode
[
i
].
u16FaultCodeCount
=
0
;
stFaultCodeBack
[
i
].
u16FaultCode
=
0
;
stFaultCodeBack
[
i
].
u16FaultCodeCount
=
0
;
stFaultCodetemp
[
i
].
u16FaultCode
=
0
;
stFaultCodetemp
[
i
].
u16FaultCodeCount
=
0
;
}
u16FaultCodeDtcCountBack
=
0
;
}
}
/**
* @brief 获取当前故障码
*/
uint32_t
Get_Current_FaultCode
(
void
)
{
return
stFaultCode
[
0
].
u16FaultCode
;
}
uint8_t
Get_Current_Hight_FaultCode
(
void
)
{
uint8_t
u8FaultHight
=
0
;
u8FaultHight
=
((
stFaultCode
[
0
].
u16FaultCode
)
&
(
0xFF00
))
>>
8
;
return
u8FaultHight
;
}
uint8_t
Get_Current_Mid_FaultCode
(
void
)
{
uint8_t
u8FaultMid
=
0
;
u8FaultMid
=
((
stFaultCode
[
0
].
u16FaultCode
)
&
(
0x00FF
));
return
u8FaultMid
;
}
uint8_t
Get_FaultCode_Valid
(
void
)
{
return
u8FaultCodeValid
;
}
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/FaultCode.h
0 → 100644
View file @
c384bd32
#ifndef FAULTCODE_H
#define FAULTCODE_H
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/*故障码类型A can报文轮询发送方式*/
#define FaultCodeType_A 1
#define FaultCodeType FaultCodeType_A
#define MaxFaultCode 40
#define FaultCodeCount 5000
typedef
enum
{
DTC1
,
DTC2
,
DTC3
,
NUM_FAULT_TYPES
,
}
FaultCodeType_Num
;
typedef
uint32_t
(
*
FaultCodeCallback
)(
void
);
/* 故障码回调函数 */
typedef
uint16_t
(
*
FaultCodeNumback
)(
void
);
/* 故障码个数回调函数 */
typedef
uint16_t
(
*
FaultCodeValidback
)(
void
);
/* 故障码有效回调函数 */
typedef
struct
{
uint32_t
u16FaultCode
;
/* 故障码 */
uint16_t
u16FaultCodeCount
;
/* 故障码总数 */
}
_st_FaultCode
;
typedef
struct
{
FaultCodeCallback
callbacks
[
NUM_FAULT_TYPES
];
FaultCodeNumback
FaultCodeNumCbk
;
FaultCodeValidback
FaultCodeVaildCbk
;
}
_st_Init
;
extern
void
FaultCode_Service
(
uint16_t
Cycle
);
extern
void
FaultCode_Init
(
void
);
extern
uint32_t
Get_Current_FaultCode
(
void
);
extern
uint8_t
Get_Current_Hight_FaultCode
(
void
);
extern
uint8_t
Get_Current_Hight_FaultCode
(
void
);
extern
uint8_t
Get_FaultCode_Valid
(
void
);
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/GpioUser.c
View file @
c384bd32
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
c384bd32
...
...
@@ -6,6 +6,16 @@ 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_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
);
// 菜单调用函数
...
...
@@ -33,11 +43,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
{
;
}
}
...
...
@@ -62,10 +80,9 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0167_341_354
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0093_574_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0168_350_290
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0095_633_240
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0169_353_227
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0095_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0170_354_162
);
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());
}
else
if
(
g_u8Language
==
EN
)
{
...
...
@@ -79,10 +96,10 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0092_368_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0093_574_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0094_375_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0095_633_240
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0096_338_228
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_009
5_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0097_334_163
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0096_338_228
);
/*Fault history*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_009
7_334_163
);
/*current fault*/
//AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode()
);
}
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
...
...
@@ -99,10 +116,10 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0354_341_354
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0281_574_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0355_350_290
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0283_633_240
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0356_353_227
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0
283_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0357_354_162
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0356_353_227
);
/*历史故障*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0
357_354_162
);
/*当前故障*/
//AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode()
);
}
else
if
(
g_u8Language
==
EN
)
{
...
...
@@ -111,16 +128,136 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0276_193_488
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0277_728_486
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0278_435_519
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0279_567_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0280_368_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0281_574_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0282_375_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0283_633_240
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0284_338_228
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0283_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0285_334_163
);
//AMT630H_GUI_FaultCode(Get_FaultCode_Valid(),Get_Current_Hight_FaultCode(),Get_Current_Mid_FaultCode());
}
}
}
static
uint16_t
NumbeList_FaultCode_day
[]
=
{
Pic_0040_605_289
,
Pic_0041_606_290
,
Pic_0042_604_289
,
Pic_0043_604_289
,
Pic_0044_604_290
,
Pic_0045_604_290
,
Pic_0046_605_289
,
Pic_0047_605_290
,
Pic_0048_605_289
,
Pic_0049_605_289
,
};
static
uint16_t
NumbeList_FaultCode_night
[]
=
{
Pic_0225_605_289
,
Pic_0226_606_290
,
Pic_0227_604_289
,
Pic_0228_604_289
,
Pic_0229_604_290
,
Pic_0230_604_290
,
Pic_0231_605_289
,
Pic_0232_605_290
,
Pic_0233_605_289
,
Pic_0234_605_289
,
};
/*故障码显示函数*/
static
void
AMT630H_GUI_FaultCode
(
uint8_t
FaultCodevalid
,
uint8_t
FaultCode_hight
,
uint8_t
FaultCode_mid
)
{
/*数字只有两组 历史故障和故障信息纵坐标不同*/
DISPLAY_NUM_ST
DisplayNumPara
;
uint16_t
frontnumber
;
uint16_t
midnumber
;
frontnumber
=
FaultCode_hight
;
midnumber
=
FaultCode_mid
;
if
(
FaultCodevalid
==
1
)
{
if
(
g_u8Display_Mode
==
ModeDAY
)
{
//SetPagePicFree(GRAPHICS_PAGE_0, Pic_0876_639_293, 610, 164);//当前故障码的P
//SetPagePicFree(GRAPHICS_PAGE_0, Pic_0876_639_293, 610, 229);//历史故障码的P
/*当前故障码前两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_day
;
DisplayNumPara
.
x
=
639
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
164
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
frontnumber
);
/*当前故障码后两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_day
;
DisplayNumPara
.
x
=
667
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
164
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
midnumber
);
/*历史故障码前两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_day
;
DisplayNumPara
.
x
=
639
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
229
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
frontnumber
);
/*历史故障码后两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_day
;
DisplayNumPara
.
x
=
667
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
229
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
frontnumber
);
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
{
//SetPagePicFree(GRAPHICS_PAGE_0, Pic_0912_639_293, 610, 175);//当前故障码的P
//SetPagePicFree(GRAPHICS_PAGE_0, Pic_0912_639_293, 610, 240);//历史故障码的P
/*当前故障码前两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_night
;
DisplayNumPara
.
x
=
639
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
164
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
frontnumber
);
/*当前故障码后两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_night
;
DisplayNumPara
.
x
=
667
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
164
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
midnumber
);
/*历史故障码前两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_night
;
DisplayNumPara
.
x
=
639
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
229
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
frontnumber
);
/*历史故障码后两位显示*/
DisplayNumPara
.
NumList
=
NumbeList_FaultCode_night
;
DisplayNumPara
.
x
=
667
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
14
;
DisplayNumPara
.
y
=
229
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
2
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
midnumber
);
}
}
else
{
/*显示-----*/
;
}
}
/**
* @brief 显示模式信息 一级菜单
...
...
@@ -923,19 +1060,55 @@ static void AMT630H_GUI_Clock_Setting(uint8_t Clock_Hour, uint8_t Clock_Min, uin
break
;
case
MENU_ITEM_CLOCK_HOUR_TENB_SET
:
/*Cursor blinking*/
/*Digital changes*/
//Sava picked data and
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0020_408_209
);
}
else
{
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType);
break
;
case
MENU_ITEM_CLOCK_HOUR_BIT_SET
:
/*Cursor blinking*/
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0020_455_209
);
}
else
{
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Hour_Bit_Set(Menu_Key_en_t enKeyType);
break
;
case
MENU_ITEM_CLOCK_MIN_TENB_SET
:
/*Cursor blinking*/
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0020_525_209
);
}
else
{
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Min_Tenb_Set(Menu_Key_en_t enKeyType);
break
;
case
MENU_ITEM_CLOCK_MIN_BIT_SET
:
/*Cursor blinking*/
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0020_572_209
);
}
else
{
;
}
/*Digital changes*/
//Menu_Logic_Operation_Clock_Min_Bit_Set(Menu_Key_en_t enKeyType);
break
;
default:
break
;
...
...
@@ -2536,6 +2709,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
()
...
...
@@ -2554,7 +2737,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 +2745,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
);
...
...
@@ -2758,10 +2945,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
++
)
...
...
@@ -2775,6 +2964,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
)
{
...
...
@@ -2902,7 +3135,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
)
{
...
...
@@ -2920,37 +3153,79 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
{
DisplayNumPara
.
x
=
173
;
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
))
{
DisplayNumPara
.
x
=
149
;
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
))
{
DisplayNumPara
.
x
=
125
;
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
))
{
DisplayNumPara
.
x
=
101
;
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
))
{
DisplayNumPara
.
x
=
77
;
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
))
{
DisplayNumPara
.
x
=
53
;
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
{
...
...
@@ -2967,39 +3242,86 @@ static void AMT630H_GUI_ODO(uint32_t ODO, uint8_t mode)
uint16_t
ODONumber
;
ODONumber
=
ODO
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_NIGHT
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
0
;
if
((
ODONumber
<
1000000
)
&&
(
ODONumber
>=
100000
))
{
DisplayNumPara
.
x
=
173
;
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
))
{
DisplayNumPara
.
x
=
149
;
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
))
{
DisplayNumPara
.
x
=
125
;
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
))
{
DisplayNumPara
.
x
=
101
;
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
))
{
DisplayNumPara
.
x
=
77
;
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
))
{
DisplayNumPara
.
x
=
53
;
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
{
...
...
@@ -3013,6 +3335,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
)
{
...
...
@@ -3248,7 +3695,9 @@ void AMT630H_GUI_BACKGRAND()
/*主界面函数*/
AMT630H_GUI_Light
();
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
)
{
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
...
...
@@ -3257,8 +3706,16 @@ void AMT630H_GUI_BACKGRAND()
{
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
)
{
AMT630H_GUI_VSpeed
(
Get_DispVechileSpeed
()
/
10
);
...
...
@@ -3267,6 +3724,7 @@ void AMT630H_GUI_BACKGRAND()
{
AMT630H_GUI_VSpeed
(
0
);
}
/*转速*/
if
(
Get_EngineValid
()
==
1
)
{
AMT630H_GUI_ESpeed
(
Get_DispEngineSpeed
());
...
...
@@ -3277,9 +3735,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_SelfCheck
(
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_u8Language
==
CH
)
...
...
@@ -3317,7 +3905,7 @@ void AMT630H_GUI_DisplayProc(void)
SetPageGuid
(
GRAPHICS_PAGE_0
,
1
,
0
,
0
);
AMT630H_GUI_Background
();
PackedTransfer_Page
();
}
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/Line_In/Line_In_user.c
View file @
c384bd32
...
...
@@ -5,16 +5,16 @@
const
Line_In_Attribute_st
g_stLineInAttribute
[
LINE_IN_MAX
]
=
{
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Turn_Left
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Turn_Right
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
60U
,
20U
,
Get_LINE_IN_High_Beam
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Efi_Fault
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_ABS
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Oil_Pressure_Alert
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Voltage
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Fuel_Level_Low
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Coolant_Temperature
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Turn_Left
,
},
/*P10*/
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Turn_Right
,
},
/*P9*/
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
60U
,
20U
,
Get_LINE_IN_High_Beam
,
},
/*P18*/
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Efi_Fault
,
},
/*P15*/
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_ABS
,
},
/*P7*/
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
/*P12*/
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Oil_Pressure_Alert
,
},
/*P21*/
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Voltage
,
},
/*P19*/
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Fuel_Level_Low
,
},
/*P14*/
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Coolant_Temperature
},
/*P11*/
};
Linelib_uint8_t
Get_LINE_IN_Turn_Left
(
void
)
{
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
c384bd32
#include "PowerManagement.h"
#include "Components.h"
#include "FaultCode.h"
RTC_Information_st_t
g_stRTCInformation
;
...
...
@@ -68,6 +69,7 @@ static void Power_KL30_Init(void)
Can_Init
();
Protocol_KL30_Wakeup_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
}
static
void
Power_Wakeup_Init
(
void
)
...
...
@@ -93,6 +95,7 @@ static void Power_Wakeup_Init(void)
Can_Init
();
Protocol_KL30_Wakeup_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
}
static
void
Power_LVP_Init
(
void
)
...
...
@@ -117,6 +120,7 @@ static void Power_IG_ON_Init(void)
Telltales_KL15_Init
();
Fuel_KL15_Init
();
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
1
);
FaultCode_Init
();
}
static
void
Power_Sleep_Init
(
void
)
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
c384bd32
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/System/Sys_Task_List.c
View file @
c384bd32
...
...
@@ -4,6 +4,7 @@
//#include "CommonInterface.h"
#include "RTE.h"
#include "UDS_ISO14229_Server.h"
#include "FaultCode.h"
void
Sys_Pseudo_Real_Time_Tasks
(
void
)
{
...
...
@@ -30,6 +31,7 @@ void Sys_5ms_Tasks(void)
void
Sys_10ms_Tasks
(
void
)
{
FaultCode_Service
(
10u
);
Line_In_Debounce_Service
(
10u
);
Key_Service
();
Data_Mileage_Write_EEPROM
();
...
...
This diff is collapsed.
Click to expand it.
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