Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
b0d02a3c
Commit
b0d02a3c
authored
Aug 15, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:增加水温数显格显同步策略
parent
1525e4dd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
225 additions
and
104 deletions
+225
-104
TianYing.sct
.../Project/Cmsemicon/BAT32A239/MDK_ARM/Objects/TianYing.sct
+2
-2
TianYing.uvprojx
...ware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
+11
-11
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+1
-1
Data_Coolant.c
Firmware/Source/Application/Data_Coolant/Data_Coolant.c
+204
-86
Data_Coolant.h
Firmware/Source/Application/Data_Coolant/Data_Coolant.h
+6
-3
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+1
-1
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/Objects/TianYing.sct
View file @
b0d02a3c
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
; *************************************************************
LR_IROM1 0x0000
8
000 0x00040000 { ; load region size_region
LR_IROM1 0x0000
0
000 0x00040000 { ; load region size_region
ER_IROM1 0x0000
8
000 0x00040000 { ; load address = execution address
ER_IROM1 0x0000
0
000 0x00040000 { ; load address = execution address
*.o (RESET, +First)
*.o (RESET, +First)
*(InRoot$$Sections)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+RO)
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
View file @
b0d02a3c
...
@@ -362,7 +362,7 @@
...
@@ -362,7 +362,7 @@
</Aads>
</Aads>
<LDads>
<LDads>
<umfTarg>
0
</umfTarg>
<umfTarg>
0
</umfTarg>
<Ropi>
1
</Ropi>
<Ropi>
0
</Ropi>
<Rwpi>
0
</Rwpi>
<Rwpi>
0
</Rwpi>
<noStLib>
0
</noStLib>
<noStLib>
0
</noStLib>
<RepFail>
1
</RepFail>
<RepFail>
1
</RepFail>
...
@@ -503,16 +503,6 @@
...
@@ -503,16 +503,6 @@
<FileType>
5
</FileType>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\CAN_User\Can_App.h
</FilePath>
<FilePath>
..\..\..\..\Source\Application\CAN_User\Can_App.h
</FilePath>
</File>
</File>
<File>
<FileName>
Data_Coolant.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.c
</FilePath>
</File>
<File>
<FileName>
Data_Coolant.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.h
</FilePath>
</File>
<File>
<File>
<FileName>
Data_TPMS.c
</FileName>
<FileName>
Data_TPMS.c
</FileName>
<FileType>
1
</FileType>
<FileType>
1
</FileType>
...
@@ -593,6 +583,16 @@
...
@@ -593,6 +583,16 @@
<FileType>
5
</FileType>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode\code.h
</FilePath>
<FilePath>
..\..\..\..\Source\Application\FaultCode\code.h
</FilePath>
</File>
</File>
<File>
<FileName>
Data_Coolant.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.c
</FilePath>
</File>
<File>
<FileName>
Data_Coolant.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.h
</FilePath>
</File>
</Files>
</Files>
</Group>
</Group>
<Group>
<Group>
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
b0d02a3c
...
@@ -14,7 +14,6 @@ SET CPU_CLOCK=0x00B71B00
...
@@ -14,7 +14,6 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\gui_display.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\gui_display.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_app.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_app.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_coolant.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_tpms.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_tpms.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\faultcode.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\faultcode.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_voltage.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_voltage.__i"
...
@@ -23,6 +22,7 @@ SET CPU_CLOCK=0x00B71B00
...
@@ -23,6 +22,7 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_lib.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_lib.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\code.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\code.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_coolant.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\bu98r10.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\bu98r10.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\services_mileage_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\services_mileage_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\eemanager_interface.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\eemanager_interface.__i"
...
...
Firmware/Source/Application/Data_Coolant/Data_Coolant.c
View file @
b0d02a3c
...
@@ -38,7 +38,120 @@ void Data_Coolant_Temp_KL15_Init ( void )
...
@@ -38,7 +38,120 @@ void Data_Coolant_Temp_KL15_Init ( void )
DataCoolantTemp_Dis
.
u8_Flg
=
0
;
DataCoolantTemp_Dis
.
u8_Flg
=
0
;
}
}
void
Data_Coolant_Temp_Processing_Service
(
void
)
#define COOLANT_NUM_TIME 5 // 数显多久变化一次,暂定100ms
typedef
struct
{
/*该段的下限值*/
uint16_t
u16HYSSegLow
;
/*该段的上限值*/
uint16_t
u16HYSSegHigh
;
}
HYS_Seg_Table_st_t
;
const
HYS_Seg_Table_st_t
stHYSSegTableTemp
[
7
]
=
{
{
0U
,
470U
},
// 0
{
500U
,
590U
},
// 1
{
620U
,
770U
},
// 2
{
800U
,
950U
},
// 3
{
980U
,
1120U
},
// 4
{
1150U
,
1990U
},
// 5
{
1990U
,
2000U
},
// 6
};
uint32_t
u32CoolantDataTimeCount
=
0UL
;
uint32_t
u32ColCurNum
=
0UL
;
/*阻尼数显*/
/*
u32CoolantDir:0:下行,1:上行 2:无变化
*/
uint32_t
Data_Coolant_Cal_Num
(
uint32_t
u32CoolantCurSeg
,
uint32_t
u32CoolantDir
,
uint32_t
u32CoolantRemTime
,
uint32_t
u32CoolantCurNum
,
uint32_t
u32CoolantDesNum
)
{
uint32_t
u32CoolantNum
=
u32CoolantCurNum
;
uint32_t
u32CoolantNumMax
=
0UL
;
uint32_t
u32CoolantNumMin
=
0UL
;
uint32_t
u32CoolantSegDesNum
=
0UL
;
uint32_t
u32CoolantCalBuf
=
0UL
;
uint32_t
u32CoolantCalBuf1
=
0UL
;
/*计算当前格对应的目标数值*/
/*当前格数对应的数值范围,目标数值是否在这个范围内,如果在就直接用目标值。如果不在就根据上下行选择该范围内的极大和极小值。*/
/*这样就找到了当前格对应的目标数值*/
u32CoolantNumMax
=
stHYSSegTableTemp
[
u32CoolantCurSeg
+
1
].
u16HYSSegLow
;
if
(
u32CoolantCurSeg
)
{
u32CoolantNumMin
=
stHYSSegTableTemp
[
u32CoolantCurSeg
-
1
].
u16HYSSegHigh
;
}
else
{
u32CoolantNumMin
=
stHYSSegTableTemp
[
u32CoolantCurSeg
].
u16HYSSegLow
;
}
if
((
u32CoolantDesNum
>=
u32CoolantNumMin
)
&&
(
u32CoolantDesNum
<=
u32CoolantNumMax
))
{
u32CoolantSegDesNum
=
u32CoolantDesNum
;
}
else
{
if
(
u32CoolantDir
==
1
)
// UP
{
u32CoolantSegDesNum
=
u32CoolantNumMax
;
}
else
if
(
u32CoolantDir
==
0
)
// down
{
u32CoolantSegDesNum
=
u32CoolantNumMin
;
}
else
{
u32CoolantSegDesNum
=
u32CoolantDesNum
;
}
}
if
(
u32CoolantDataTimeCount
<
COOLANT_NUM_TIME
)
{
u32CoolantDataTimeCount
++
;
}
else
{
u32CoolantDataTimeCount
=
0UL
;
u32CoolantCalBuf
=
u32CoolantRemTime
/
COOLANT_NUM_TIME
;
if
(
u32CoolantCalBuf
)
{
if
(
u32CoolantNum
<
u32CoolantSegDesNum
)
{
u32CoolantCalBuf1
=
u32CoolantSegDesNum
-
u32CoolantNum
;
u32CoolantCalBuf1
=
u32CoolantCalBuf1
/
u32CoolantCalBuf
;
u32CoolantNum
+=
u32CoolantCalBuf1
;
if
(
u32CoolantNum
>
u32CoolantSegDesNum
)
{
u32CoolantNum
=
u32CoolantSegDesNum
;
}
}
else
{
u32CoolantCalBuf1
=
u32CoolantNum
-
u32CoolantSegDesNum
;
u32CoolantCalBuf1
=
u32CoolantCalBuf1
/
u32CoolantCalBuf
;
u32CoolantNum
-=
u32CoolantCalBuf1
;
if
(
u32CoolantNum
<
u32CoolantSegDesNum
)
{
u32CoolantNum
=
u32CoolantSegDesNum
;
}
}
}
else
// 0
{
u32CoolantNum
=
u32CoolantSegDesNum
;
}
}
/*根据目标数值计算每个变化周期内数值变化的大小,*/
/*根据目标数值以及剩余时间,修改当前显示值*/
return
u32CoolantNum
;
}
void
Data_Coolant_Temp_Processing_Service
(
void
)
{
{
uint16_t
Coolant_Temperature
=
0
;
uint16_t
Coolant_Temperature
=
0
;
uint8_t
Coolant_Temperature_State
=
0
;
uint8_t
Coolant_Temperature_State
=
0
;
...
@@ -165,27 +278,45 @@ void Data_Coolant_Temp_Display ( void )
...
@@ -165,27 +278,45 @@ void Data_Coolant_Temp_Display ( void )
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
DataCoolantTemp_Dis
.
u8_DestSeg
)
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
DataCoolantTemp_Dis
.
u8_DestSeg
)
{
{
u32ColCurNum
=
Data_Coolant_Cal_Num
(
DataCoolantTemp_Dis
.
u8_CurSeg
,
0
,
(
DataCoolantTemp_Dis
.
u8_Downtimer
-
DataCoolantTemp_Dis
.
u8_DownFlashtimer
),
u32ColCurNum
,
DataCoolantTemp
.
Value
*
10
);
DataCoolantTemp_Dis
.
u8_UpFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_UpFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_Holdtimer
=
0
;
DataCoolantTemp_Dis
.
u8_DownFlashtimer
++
;
DataCoolantTemp_Dis
.
u8_DownFlashtimer
++
;
if
(
DataCoolantTemp_Dis
.
u8_DownFlashtimer
>=
DataCoolantTemp_Dis
.
u8_Downtimer
)
if
(
DataCoolantTemp_Dis
.
u8_DownFlashtimer
>=
DataCoolantTemp_Dis
.
u8_Downtimer
)
{
{
DataCoolantTemp_Dis
.
u8_DownFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_DownFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_CurSeg
--
;
DataCoolantTemp_Dis
.
u8_CurSeg
--
;
}
}
}
}
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
<
DataCoolantTemp_Dis
.
u8_DestSeg
)
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
<
DataCoolantTemp_Dis
.
u8_DestSeg
)
{
{
u32ColCurNum
=
Data_Coolant_Cal_Num
(
DataCoolantTemp_Dis
.
u8_CurSeg
,
1
,
(
DataCoolantTemp_Dis
.
u8_Uptimer
-
DataCoolantTemp_Dis
.
u8_UpFlashtimer
),
u32ColCurNum
,
DataCoolantTemp
.
Value
*
10
);
DataCoolantTemp_Dis
.
u8_DownFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_DownFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_Holdtimer
=
0
;
DataCoolantTemp_Dis
.
u8_UpFlashtimer
++
;
DataCoolantTemp_Dis
.
u8_UpFlashtimer
++
;
if
(
DataCoolantTemp_Dis
.
u8_UpFlashtimer
>=
DataCoolantTemp_Dis
.
u8_Uptimer
)
if
(
DataCoolantTemp_Dis
.
u8_UpFlashtimer
>=
DataCoolantTemp_Dis
.
u8_Uptimer
)
{
{
DataCoolantTemp_Dis
.
u8_UpFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_UpFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_CurSeg
++
;
DataCoolantTemp_Dis
.
u8_CurSeg
++
;
}
}
}
}
//warning
else
{
DataCoolantTemp_Dis
.
u8_DownFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_UpFlashtimer
=
0
;
DataCoolantTemp_Dis
.
u8_Holdtimer
++
;
if
(
DataCoolantTemp_Dis
.
u8_Holdtimer
>=
CoolantFlashtimer
)
{
DataCoolantTemp_Dis
.
u8_Holdtimer
=
CoolantFlashtimer
;
}
/*目标格和当前格一致时,数显如何处理*/
/*5S后更新为目标数值*/
u32ColCurNum
=
Data_Coolant_Cal_Num
(
DataCoolantTemp_Dis
.
u8_CurSeg
,
2
,
(
CoolantFlashtimer
-
DataCoolantTemp_Dis
.
u8_Holdtimer
),
u32ColCurNum
,
DataCoolantTemp
.
Value
*
10
);
}
if
(
DataCoolantTemp
.
Valid
==
0
)
// warning
if
(
DataCoolantTemp
.
Valid
==
0
)
{
{
DataCoolantTemp_Dis
.
u8_Warnflg
=
1
;
DataCoolantTemp_Dis
.
u8_Warnflg
=
1
;
}
}
...
@@ -195,7 +326,7 @@ void Data_Coolant_Temp_Display ( void )
...
@@ -195,7 +326,7 @@ void Data_Coolant_Temp_Display ( void )
{
{
DataCoolantTemp_Dis
.
u8_Warnflg
=
2
;
DataCoolantTemp_Dis
.
u8_Warnflg
=
2
;
}
}
else
if
(
DataCoolantTemp
.
Value
<=
112
)
else
if
(
DataCoolantTemp
.
Value
<=
112
)
{
{
DataCoolantTemp_Dis
.
u8_Warnflg
=
0
;
DataCoolantTemp_Dis
.
u8_Warnflg
=
0
;
}
}
...
@@ -203,11 +334,7 @@ void Data_Coolant_Temp_Display ( void )
...
@@ -203,11 +334,7 @@ void Data_Coolant_Temp_Display ( void )
{
{
;
;
}
}
}
}
}
}
else
else
{
{
...
@@ -217,25 +344,21 @@ void Data_Coolant_Temp_Display ( void )
...
@@ -217,25 +344,21 @@ void Data_Coolant_Temp_Display ( void )
DataCoolantTemp_Dis
.
u8_Warnflg
=
0
;
DataCoolantTemp_Dis
.
u8_Warnflg
=
0
;
DataCoolantTemp_Dis
.
u8_Flg
=
0
;
DataCoolantTemp_Dis
.
u8_Flg
=
0
;
}
}
}
}
uint8_t
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
)
void
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
)
{
{
//uint8_t TempSeg;
// uint8_t CurTempSeg;
//uint8_t CurTempSeg;
if
(
Temp_Value
<
50
)
if
(
Temp_Value
<
50
)
{
{
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
1
)
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
1
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
1
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
1
;
}
}
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
0
)
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
0
)
{
{
if
(
Temp_Value
<=
47
)
if
(
Temp_Value
<=
47
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
0
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
0
;
}
}
...
@@ -245,15 +368,15 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
...
@@ -245,15 +368,15 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
DataCoolantTemp_Dis
.
u8_DestSeg
=
0
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
0
;
}
}
}
}
else
if
((
Temp_Value
<
62
)
&&
(
Temp_Value
>=
50
))
else
if
((
Temp_Value
<
62
)
&&
(
Temp_Value
>=
50
))
{
{
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
2
)
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
2
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
2
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
2
;
}
}
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
1
)
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
1
)
{
{
if
(
Temp_Value
<=
59
)
if
(
Temp_Value
<=
59
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
1
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
1
;
}
}
...
@@ -263,15 +386,15 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
...
@@ -263,15 +386,15 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
DataCoolantTemp_Dis
.
u8_DestSeg
=
1
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
1
;
}
}
}
}
else
if
((
Temp_Value
<
80
)
&&
(
Temp_Value
>=
62
))
else
if
((
Temp_Value
<
80
)
&&
(
Temp_Value
>=
62
))
{
{
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
3
)
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
3
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
3
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
3
;
}
}
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
2
)
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
2
)
{
{
if
(
Temp_Value
<=
77
)
if
(
Temp_Value
<=
77
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
2
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
2
;
}
}
...
@@ -281,15 +404,15 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
...
@@ -281,15 +404,15 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
DataCoolantTemp_Dis
.
u8_DestSeg
=
2
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
2
;
}
}
}
}
else
if
((
Temp_Value
<
98
)
&&
(
Temp_Value
>=
80
))
else
if
((
Temp_Value
<
98
)
&&
(
Temp_Value
>=
80
))
{
{
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
4
)
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
4
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
4
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
4
;
}
}
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
3
)
else
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
3
)
{
{
if
(
Temp_Value
<=
95
)
if
(
Temp_Value
<=
95
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
3
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
3
;
}
}
...
@@ -299,11 +422,11 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
...
@@ -299,11 +422,11 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
DataCoolantTemp_Dis
.
u8_DestSeg
=
3
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
3
;
}
}
}
}
else
if
((
Temp_Value
<
115
)
&&
(
Temp_Value
>=
98
))
else
if
((
Temp_Value
<
115
)
&&
(
Temp_Value
>=
98
))
{
{
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
4
)
if
(
DataCoolantTemp_Dis
.
u8_CurSeg
>
4
)
{
{
if
(
Temp_Value
<=
112
)
if
(
Temp_Value
<=
112
)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
4
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
4
;
}
}
...
@@ -317,42 +440,37 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
...
@@ -317,42 +440,37 @@ void Get_Coolant_Temp_Seg(uint16_t Temp_Value)
{
{
DataCoolantTemp_Dis
.
u8_DestSeg
=
5
;
DataCoolantTemp_Dis
.
u8_DestSeg
=
5
;
}
}
return
DataCoolantTemp_Dis
.
u8_DestSeg
;
}
}
// 水温显示格数
//水温显示格数
uint8_t
GET_DataCoolantTempSegDisp
(
void
)
uint8_t
GET_DataCoolantTempSegDisp
(
void
)
{
{
return
DataCoolantTemp_Dis
.
u8_CurSeg
;
return
DataCoolantTemp_Dis
.
u8_CurSeg
;
}
}
//水温显示有效标志
//
水温显示有效标志
uint8_t
GET_DataCollantTempSegValid
(
void
)
uint8_t
GET_DataCollantTempSegValid
(
void
)
{
{
return
DataCoolantTemp_Dis
.
Dis_Valid
;
return
DataCoolantTemp_Dis
.
Dis_Valid
;
}
}
//水温数显。作为外发使用的时候+40
//
水温数显。作为外发使用的时候+40
uint16_t
GET_DataCoolantTempValueDisp
(
void
)
uint16_t
GET_DataCoolantTempValueDisp
(
void
)
{
{
return
DataCoolantTemp
.
Value
;
return
DataCoolantTemp
.
Value
;
}
uint16_t
GET_DataCoolantSegValue
(
void
)
{
return
u32ColCurNum
/
10
;
}
}
uint8_t
GET_DataCollantTempValueValid
(
void
)
uint8_t
GET_DataCollantTempValueValid
(
void
)
{
{
return
DataCoolantTemp
.
Valid
;
return
DataCoolantTemp
.
Valid
;
}
}
//水温灯及显示的报警信号 0:无报警,正常显示 1:掉线或者state无效,白色闪烁 2:高温,红色闪烁
//
水温灯及显示的报警信号 0:无报警,正常显示 1:掉线或者state无效,白色闪烁 2:高温,红色闪烁
uint8_t
GET_DataCollantTempWarnflg
(
void
)
uint8_t
GET_DataCollantTempWarnflg
(
void
)
{
{
return
DataCoolantTemp_Dis
.
u8_Warnflg
;
return
DataCoolantTemp_Dis
.
u8_Warnflg
;
}
}
Firmware/Source/Application/Data_Coolant/Data_Coolant.h
View file @
b0d02a3c
...
@@ -17,12 +17,14 @@ typedef struct __attribute__((aligned(4)))
...
@@ -17,12 +17,14 @@ typedef struct __attribute__((aligned(4)))
uint8_t
u8_DestSeg
;
uint8_t
u8_DestSeg
;
uint8_t
u8_CurSeg
;
uint8_t
u8_CurSeg
;
uint8_t
u8_UpFlashtimer
;
uint8_t
u8_UpFlashtimer
;
uint8_t
u8_Holdtimer
;
uint8_t
u8_DownFlashtimer
;
uint8_t
u8_DownFlashtimer
;
uint8_t
u8_Uptimer
;
uint8_t
u8_Uptimer
;
uint8_t
u8_Downtimer
;
uint8_t
u8_Downtimer
;
uint8_t
u8_Flashflg
;
uint8_t
u8_Flashflg
;
uint8_t
u8_Warnflg
;
uint8_t
u8_Warnflg
;
uint8_t
u8_Flg
;
uint8_t
u8_Flg
;
uint8_t
u8Reserved
;
}
DataCoolantTempDisStruct
;
}
DataCoolantTempDisStruct
;
...
@@ -43,15 +45,16 @@ typedef struct __attribute__((aligned(4)))
...
@@ -43,15 +45,16 @@ typedef struct __attribute__((aligned(4)))
void
Data_Coolant_Temp_KL30_Init
(
void
);
void
Data_Coolant_Temp_KL30_Init
(
void
);
void
Data_Coolant_Temp_KL15_Init
(
void
);
void
Data_Coolant_Temp_KL15_Init
(
void
);
void
Data_Coolant_Temp_Processing_Service
(
void
);
void
Data_Coolant_Temp_Processing_Service
(
void
);
void
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
);
uint8_t
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
);
void
Data_Coolant_Temp_Display
(
void
);
void
Data_Coolant_Temp_Display
(
void
);
uint8_t
GET_DataCollantTempSegValid
(
void
);
uint8_t
GET_DataCollantTempSegValid
(
void
);
uint8_t
GET_DataCoolantTempSegDisp
(
void
);
uint8_t
GET_DataCoolantTempSegDisp
(
void
);
uint16_t
GET_DataCoolantTempValueDisp
(
void
);
uint16_t
GET_DataCoolantTempValueDisp
(
void
);
uint8_t
GET_DataCollantTempWarnflg
(
void
);
uint8_t
GET_DataCollantTempWarnflg
(
void
);
uint16_t
GET_DataCoolantSegValue
(
void
);
extern
DataCoolantTempStruct
DataCoolantTemp
;
extern
DataCoolantTempStruct
DataCoolantTemp
;
#endif
#endif
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
b0d02a3c
...
@@ -119,7 +119,7 @@ void Gauge_Service(void)
...
@@ -119,7 +119,7 @@ void Gauge_Service(void)
Gauge_Clock_Display
();
Gauge_Clock_Display
();
SEG_SET_FuelDial
(
1
,
Get_CurFuelSetp
());
SEG_SET_FuelDial
(
1
,
Get_CurFuelSetp
());
SEG_SET_EspeedDial
(
1
,
Get_DispEngineSpeed
()
/
500
);
SEG_SET_EspeedDial
(
1
,
Get_DispEngineSpeed
()
/
500
);
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolant
TempValueDisp
(),
GET_DataCollantTempSegValid
());
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolant
SegValue
(),
GET_DataCollantTempSegValid
());
SEG_SET_Voltage_NUM
(
1
,
Get_Battery_Voltage
());
SEG_SET_Voltage_NUM
(
1
,
Get_Battery_Voltage
());
#if(IC_Current == TY200_080000b_ty)
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_DISPLAY
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
0
,
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
SEG_SET_TPMS_DISPLAY
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
0
,
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
...
...
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