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
1aa1c506
Commit
1aa1c506
authored
Oct 12, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增导航界面水温表和灯的功能
parent
14123428
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
15 deletions
+113
-15
Data_Coolant.c
Firmware/Source/Application/Data_Coolant.c
+23
-4
Data_Coolant.h
Firmware/Source/Application/Data_Coolant.h
+2
-0
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+88
-11
No files found.
Firmware/Source/Application/Data_Coolant.c
View file @
1aa1c506
#include "Data_Coolant.h"
#include "Components.h"
#include "Hysteresis.h"
#define FAST_TIME
20
//20*20 400ms变化一格
#define FAST_TIME
15
//20*20 400ms变化一格
#define NORMAL_TIME 500 //500*20 10s变化一格
#define Disconnected_TIME 25 //掉线时间
#pragma ghs section bss = ".myNonInitArea"
...
...
@@ -46,7 +46,7 @@ const HYS_Seg_Table_st_t stHYSSegTablePWM[3] =
const
HYS_Attribute_st_t
stHysAttribute
[
HYS_NUM_MAX
]
=
{
{
stHYSSegTableCng
,
0U
,
7
U
,
1U
},
{
stHYSSegTableCng
,
0U
,
9
U
,
1U
},
{
stHYSSegTablePWM
,
0U
,
3U
,
1U
},
/*为了过QAC用的,实际完全不会使用*/
};
...
...
@@ -113,6 +113,7 @@ void TEMP_KL30_Init ( void )
DataCoolantTemp
.
TEMPMode
=
0
;
DataCoolantTemp_Dis
.
u8_CurSeg
=
0
;
DataCoolantTemp
.
TEMPSetp
=
0
;
DataCoolantTemp
.
u8_ResStatus
=
0
;
TEMP_SPEED
=
0
;
time_power_on
=
0
;
time_lost
=
0
;
...
...
@@ -131,6 +132,7 @@ void TEMP_KL15_Init ( void )
DataCoolantTemp
.
u8Res_Valid
=
0
;
DataCoolantTemp
.
u16Res_ADValue
=
0
;
DataCoolantTemp
.
u8Res_ADValid
=
0
;
DataCoolantTemp
.
u8_ResStatus
=
0
;
DataCoolantTemp_Dis
.
u8_CurSeg
=
0
;
DataResCoolantTempSampler
.
Cnt
=
0
;
DataCoolantTemp
.
TEMPMode
=
0
;
...
...
@@ -247,6 +249,7 @@ void Data_Coolant_Temp_Processing_Service ( void )
}
else
{
DataCoolantTemp
.
u8_ResStatus
=
3
;
//当前状态为开路
DataCoolantTemp
.
u8Res_Valid
=
0
;
DataCoolantTemp
.
u16Res_Actual
=
0
;
DataResCoolantTempSampler
.
ResOpen_InActTimer
=
0
;
...
...
@@ -269,16 +272,28 @@ void Data_Coolant_Temp_Processing_Service ( void )
}
}
}
if
(
DataCoolantTemp
.
u8Can_Valid
==
1
)
if
(
DataCoolantTemp
.
u8Can_Valid
||
DataCoolantTemp
.
u8Res_Valid
)
{
DataCoolantTemp
.
u8_ResStatus
=
1
;
//当前状态正常
}
if
(
DataCoolantTemp
.
u8Can_Valid
==
1
)
{
DataCoolantTemp
.
Temp_Value
=
DataCoolantTemp
.
u16Can_Actual
;
}
else
if
(
DataCoolantTemp
.
u8Res_Valid
==
1
)
else
if
(
DataCoolantTemp
.
u8Res_Valid
==
1
)
{
DataCoolantTemp
.
Temp_Value
=
DataCoolantTemp
.
u16Res_Actual
;
if
(
DataCoolantTemp
.
u16Res_ADValue
<
40
)
{
DataCoolantTemp
.
u8_ResStatus
=
2
;
//当前状态为短路
}
}
else
{
if
(
DataCoolantTemp
.
u8_ResStatus
!=
3
)
{
DataCoolantTemp
.
u8_ResStatus
=
0
;
}
DataCoolantTemp
.
Temp_Value
=
0
;
}
...
...
@@ -444,3 +459,7 @@ uint16_t GET_DataCollantTempSegValid(void)
{
return
DataCoolantTemp
.
u16Res_ADValue
;
//DataCoolantTemp_Dis.Dis_Valid;
}
uint16_t
GET_DataCollantTempSegStatus
(
void
)
{
return
DataCoolantTemp
.
u8_ResStatus
;
//DataCoolantTemp_Dis.Dis_Valid;
}
Firmware/Source/Application/Data_Coolant.h
View file @
1aa1c506
...
...
@@ -31,6 +31,7 @@ typedef struct
uint8_t
TEMPSetp
;
uint8_t
TEMPMode
;
uint16_t
TEMP_Fastime
;
uint8_t
u8_ResStatus
//
}
DataCoolantTempStruct
;
//水温数据结构
...
...
@@ -52,6 +53,7 @@ uint16_t Get_Coolant_Res_To_Temp(uint16_t Temp_Res);
void
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
);
void
Data_Coolant_Temp_Display
(
void
);
extern
uint16_t
GET_DataCollantTempSegValid
(
void
);
extern
uint16_t
GET_DataCollantTempSegStatus
(
void
);
extern
void
TEMP_KL30_Init
(
void
);
extern
void
TEMP_KL15_Init
(
void
);
extern
uint8_t
GET_DataCoolantTempSegDisp
(
void
);
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
1aa1c506
...
...
@@ -20,6 +20,7 @@ uint16_t g_u16voltagenumberup = 0;
uint16_t
g_u16voltagenumberdown
=
160
;
uint8_t
Voltage_Selfcheck
=
1
;
uint8_t
TFT_SelfCheck
=
0
;
uint8_t
CoolantOpenShortCirTimeCnt
=
0
;
//自检函数
void
AMT630H_GUI_BACKGRAND_SelfCheck
(
void
);
...
...
@@ -2939,14 +2940,14 @@ static void AMT630H_GUI_PhoneConnect_Light()
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0468_819_486
);
}
if
(
Get_TelltalesLedSts
(
em_LED_Coolant_Temperature
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0436_981_528
);
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0435_981_528
);
}
//
if(Get_TelltalesLedSts(em_LED_Coolant_Temperature))
//
{
//
SetPagePic(GRAPHICS_PAGE_0, Pic_0436_981_528);
//
}
//
else
//
{
//
SetPagePic(GRAPHICS_PAGE_0, Pic_0435_981_528);
//
}
}
/*
*NAME : AMT630H_GUI_TIME()
...
...
@@ -3559,11 +3560,87 @@ void AMT630H_GUI_PhoneConnect_Coolant(uint8_t Coolant)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0947_709_533
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0948_967_533
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0413_727_533
);
if
(
Coolant
>
0
)
if
(
GET_DataCollantTempSegStatus
()
==
1
)
//正常模式下
{
for
(
uint8_t
i
=
0
;
i
<
Coolant
;
i
++
)
if
((
Coolant
>
0
)
&&
(
Coolant
<=
8
))
{
for
(
uint8_t
i
=
0
;
i
<
Coolant
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0427_729_536
+
i
);
}
}
if
(
Coolant
<
8
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0435_981_528
);
//水温灯(黑)
}
else
{
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0436_981_528
);
/*水温灯(红)报警闪烁1HZ*/
}
else
{
;
}
}
}
else
if
(
GET_DataCollantTempSegStatus
()
==
2
)
//短路
{
if
((
Coolant
>
0
)
&&
(
Coolant
<=
8
))
{
for
(
uint8_t
i
=
0
;
i
<
Coolant
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0427_729_536
+
i
);
}
}
if
(
Coolant
==
8
)
{
CoolantOpenShortCirTimeCnt
++
;
if
(
CoolantOpenShortCirTimeCnt
<=
15
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0436_981_528
);
/*水温灯(红)报警闪烁0.75ms*/
}
else
if
(
CoolantOpenShortCirTimeCnt
<=
20
)
{
;
}
else
{
CoolantOpenShortCirTimeCnt
=
0
;
}
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0435_981_528
);
//水温灯(黑)
CoolantOpenShortCirTimeCnt
=
0
;
}
}
else
if
(
GET_DataCollantTempSegStatus
()
==
3
)
//开路
{
if
((
Coolant
>
0
)
&&
(
Coolant
<=
8
))
{
for
(
uint8_t
i
=
0
;
i
<
Coolant
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0427_729_536
+
i
);
}
}
if
(
Coolant
==
0
)
{
if
((
FLASH_SYNC_1Hz
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0436_981_528
);
/*水温灯(红)报警闪烁1HZ*/
}
else
{
;
}
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_04
27_729_536
+
i
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_04
35_981_528
);
//水温灯(黑)
}
}
...
...
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