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
2a5f4dfa
Commit
2a5f4dfa
authored
Jun 18, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:更改胎压显示策略
parent
657958d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
925 additions
and
262 deletions
+925
-262
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+1
-1
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+921
-260
SEG_DISPLAY.h
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
+3
-1
No files found.
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
2a5f4dfa
...
...
@@ -129,7 +129,7 @@ void Gauge_Service(void)
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolantTempValueDisp
(),
GET_DataCollantTempSegValid
());
SEG_SET_Voltage_NUM
(
1
,
Get_Battery_Voltage
());
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_
NUM
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
Get_Dis_Tpms_Unit
(),
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
(),
Get_Dis_Tpms_Unit
(),
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
#endif
SEG_SET_Navigation_STS
(
Get_Navigation_St_Dis
(),
Get_Navigation_Code_Dis
(),
Get_Navigation_Mileage_Dis
());
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
2a5f4dfa
...
...
@@ -2023,7 +2023,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
* @param[in] m_valid1 前轮有效标志 -0 无效,显示--
* @param[in] m_valid2 后轮有效标志 -0 无效,显示--
*/
void
SEG_SET_TPMS_
NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM1
,
uint16_t
m_NUM2
,
uint8_t
m_Unit
,
uint8_t
m_valid1
,
uint8_t
m_valid2
)
void
SEG_SET_TPMS_
DISPLAY
(
uint8_t
m_Flag
,
uint16_t
m_NUM1
,
uint16_t
m_NUM2
,
uint8_t
m_Unit
,
uint8_t
m_valid1
,
uint8_t
m_valid2
)
{
uint16_t
Num1
=
0
;
uint16_t
Num2
=
0
;
...
...
@@ -2070,13 +2070,46 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
}
else
{
if
(
m_Unit
==
0
)
{
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
if
((
Get_Current_PageType
()
==
Page_Front_Tpms
)
||
(
Get_Front_FirstLearn_Flag
()
==
1
)
||
(
Get_Front_FirstLearn_Flag
()
==
3
))
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG138
=
IC_SEG_ON
;
}
else
{
IC2_SEG138
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG138
=
IC_SEG_ON
;
}
if
((
Get_Current_PageType
()
==
Page_Rear_Tpms
)
||
(
Get_Rear_FirstLearn_Flag
()
==
1
)
||
(
Get_Rear_FirstLearn_Flag
()
==
3
))
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG118
=
IC_SEG_ON
;
}
else
{
IC2_SEG118
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG118
=
IC_SEG_ON
;
}
}
else
{
...
...
@@ -2084,9 +2117,13 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG110
=
IC_SEG_OFF
;
IC2_SEG118
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
}
}
SEG_SET_FRONT_TPMS_NUM
(
Get_Front_FirstLearn_Flag
(),
m_NUM1
,
m_valid1
);
SEG_SET_Rear_TPMS_NUM
(
Get_Rear_FirstLearn_Flag
(),
m_NUM2
,
m_valid2
);
}
else
...
...
@@ -2095,139 +2132,97 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG110
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
SEG_SET_FRONT_TPMS_NUM
(
2
,
m_NUM1
,
m_valid1
);
SEG_SET_Rear_TPMS_NUM
(
2
,
m_NUM2
,
m_valid2
);
}
if
(
m_valid1
==
1
)
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_OFF
;
IC2_SEG118
=
IC_SEG_OFF
;
IC2_SEG122
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
IC2_SEG142
=
IC_SEG_OFF
;
}
}
void
SEG_SET_FRONT_TPMS_NUM
(
uint8_t
learnflag
,
uint16_t
m_NUM1
,
uint8_t
m_valid1
)
{
uint16_t
Num1
=
0
;
uint16_t
Num2
=
0
;
uint8_t
m8
;
if
(
learnflag
==
0
)
{
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
{
Num1
=
m_NUM1
/
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num1
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG143
=
IC_SEG_ON
;
}
else
{
IC2_SEG143
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG141
=
IC_SEG_ON
;
}
else
{
IC2_SEG141
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG139
=
IC_SEG_ON
;
}
else
{
IC2_SEG139
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG146
=
IC_SEG_ON
;
}
else
{
IC2_SEG146
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG145
=
IC_SEG_ON
;
}
else
{
IC2_SEG145
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG144
=
IC_SEG_ON
;
}
else
{
IC2_SEG144
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG140
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
}
Num1
=
m_NUM1
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num1
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG135
=
IC_SEG_ON
;
}
else
{
IC2_SEG135
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG134
=
IC_SEG_ON
;
}
else
{
IC2_SEG134
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG132
=
IC_SEG_ON
;
}
else
{
IC2_SEG132
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG131
=
IC_SEG_ON
;
}
else
{
IC2_SEG131
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG137
=
IC_SEG_ON
;
}
else
{
IC2_SEG137
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG136
=
IC_SEG_ON
;
}
else
{
IC2_SEG136
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG133
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
}
}
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
else
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
...
...
@@ -2235,131 +2230,834 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
if
(
m_valid2
==
1
)
}
else
if
(
learnflag
==
1
)
{
if
(
FLASH_SYNC_1Hz
)
{
Num2
=
m_NUM2
/
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num2
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG123
=
IC_SEG_ON
;
}
else
{
IC2_SEG123
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG121
=
IC_SEG_ON
;
}
else
{
IC2_SEG121
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG119
=
IC_SEG_ON
;
}
else
{
IC2_SEG119
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG126
=
IC_SEG_ON
;
}
else
{
IC2_SEG126
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG125
=
IC_SEG_ON
;
}
else
{
IC2_SEG125
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG124
=
IC_SEG_ON
;
}
else
{
IC2_SEG124
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG120
=
IC_SEG_ON
;
}
else
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
}
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
else
if
(
learnflag
==
2
)
{
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG120
=
IC_SEG_OFF
;
}
if
(
m_valid1
==
1
)
{
Num1
=
m_NUM1
/
10u
;
if
(
Get_Dis_Tpms_Unit
()
==
0
)
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num1
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num1
];
}
Num2
=
m_NUM2
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num2
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG115
=
IC_SEG_ON
;
}
else
{
IC2_SEG115
=
IC_SEG_OFF
;
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG143
=
IC_SEG_ON
;
}
else
{
IC2_SEG143
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG141
=
IC_SEG_ON
;
}
else
{
IC2_SEG141
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG139
=
IC_SEG_ON
;
}
else
{
IC2_SEG139
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG146
=
IC_SEG_ON
;
}
else
{
IC2_SEG146
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG145
=
IC_SEG_ON
;
}
else
{
IC2_SEG145
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG144
=
IC_SEG_ON
;
}
else
{
IC2_SEG144
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG140
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
}
Num1
=
m_NUM1
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num1
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG135
=
IC_SEG_ON
;
}
else
{
IC2_SEG135
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG134
=
IC_SEG_ON
;
}
else
{
IC2_SEG134
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG132
=
IC_SEG_ON
;
}
else
{
IC2_SEG132
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG131
=
IC_SEG_ON
;
}
else
{
IC2_SEG131
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG137
=
IC_SEG_ON
;
}
else
{
IC2_SEG137
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG136
=
IC_SEG_ON
;
}
else
{
IC2_SEG136
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG133
=
IC_SEG_ON
;
}
else
{
IC2_SEG133
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
}
if
(
Bit_Is_Set
(
m8
,
1
))
else
{
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
}
else
{
if
(
m_valid1
==
1
)
{
Num1
=
m_NUM1
/
10u
;
if
(
Get_Dis_Tpms_Unit
()
==
0
)
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num1
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num1
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG143
=
IC_SEG_ON
;
}
else
{
IC2_SEG143
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG141
=
IC_SEG_ON
;
}
else
{
IC2_SEG141
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG139
=
IC_SEG_ON
;
}
else
{
IC2_SEG139
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG146
=
IC_SEG_ON
;
}
else
{
IC2_SEG146
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG145
=
IC_SEG_ON
;
}
else
{
IC2_SEG145
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG144
=
IC_SEG_ON
;
}
else
{
IC2_SEG144
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG140
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
}
Num1
=
m_NUM1
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num1
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG135
=
IC_SEG_ON
;
}
else
{
IC2_SEG135
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG134
=
IC_SEG_ON
;
}
else
{
IC2_SEG134
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG132
=
IC_SEG_ON
;
}
else
{
IC2_SEG132
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG131
=
IC_SEG_ON
;
}
else
{
IC2_SEG131
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG137
=
IC_SEG_ON
;
}
else
{
IC2_SEG137
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG136
=
IC_SEG_ON
;
}
else
{
IC2_SEG136
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG133
=
IC_SEG_ON
;
}
else
{
IC2_SEG133
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
}
}
else
if
(
learnflag
==
3
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG143
=
IC_SEG_ON
;
IC2_SEG141
=
IC_SEG_ON
;
IC2_SEG139
=
IC_SEG_ON
;
IC2_SEG146
=
IC_SEG_ON
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_ON
;
IC2_SEG135
=
IC_SEG_ON
;
IC2_SEG134
=
IC_SEG_ON
;
IC2_SEG132
=
IC_SEG_ON
;
IC2_SEG131
=
IC_SEG_ON
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
}
else
{
;
}
}
void
SEG_SET_Rear_TPMS_NUM
(
uint8_t
learnflag
,
uint16_t
m_NUM2
,
uint8_t
m_valid2
)
{
uint16_t
Num1
=
0
;
uint16_t
Num2
=
0
;
uint8_t
m8
;
if
(
learnflag
==
0
)
{
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
}
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
else
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
}
else
if
(
learnflag
==
1
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
}
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
else
if
(
learnflag
==
2
)
{
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG114
=
IC_SEG_ON
;
if
(
m_valid2
==
1
)
{
Num2
=
m_NUM2
/
10u
;
if
(
Get_Dis_Tpms_Unit
()
==
0
)
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num2
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num2
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG123
=
IC_SEG_ON
;
}
else
{
IC2_SEG123
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG121
=
IC_SEG_ON
;
}
else
{
IC2_SEG121
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG119
=
IC_SEG_ON
;
}
else
{
IC2_SEG119
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG126
=
IC_SEG_ON
;
}
else
{
IC2_SEG126
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG125
=
IC_SEG_ON
;
}
else
{
IC2_SEG125
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG124
=
IC_SEG_ON
;
}
else
{
IC2_SEG124
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG120
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
}
Num2
=
m_NUM2
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num2
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG115
=
IC_SEG_ON
;
}
else
{
IC2_SEG115
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG114
=
IC_SEG_ON
;
}
else
{
IC2_SEG114
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG112
=
IC_SEG_ON
;
}
else
{
IC2_SEG112
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG111
=
IC_SEG_ON
;
}
else
{
IC2_SEG111
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG117
=
IC_SEG_ON
;
}
else
{
IC2_SEG117
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG116
=
IC_SEG_ON
;
}
else
{
IC2_SEG116
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG113
=
IC_SEG_ON
;
}
else
{
IC2_SEG113
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
}
else
{
if
(
m_valid2
==
1
)
{
IC2_SEG112
=
IC_SEG_ON
;
Num2
=
m_NUM2
/
10u
;
if
(
Get_Dis_Tpms_Unit
()
==
0
)
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num2
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num2
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG123
=
IC_SEG_ON
;
}
else
{
IC2_SEG123
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG121
=
IC_SEG_ON
;
}
else
{
IC2_SEG121
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG119
=
IC_SEG_ON
;
}
else
{
IC2_SEG119
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG126
=
IC_SEG_ON
;
}
else
{
IC2_SEG126
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG125
=
IC_SEG_ON
;
}
else
{
IC2_SEG125
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG124
=
IC_SEG_ON
;
}
else
{
IC2_SEG124
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG120
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
}
Num2
=
m_NUM2
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num2
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC2_SEG115
=
IC_SEG_ON
;
}
else
{
IC2_SEG115
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC2_SEG114
=
IC_SEG_ON
;
}
else
{
IC2_SEG114
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC2_SEG112
=
IC_SEG_ON
;
}
else
{
IC2_SEG112
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG111
=
IC_SEG_ON
;
}
else
{
IC2_SEG111
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG117
=
IC_SEG_ON
;
}
else
{
IC2_SEG117
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG116
=
IC_SEG_ON
;
}
else
{
IC2_SEG116
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG113
=
IC_SEG_ON
;
}
else
{
IC2_SEG113
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC2_SEG111
=
IC_SEG_ON
;
}
else
{
IC2_SEG111
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC2_SEG117
=
IC_SEG_ON
;
}
else
{
IC2_SEG117
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC2_SEG116
=
IC_SEG_ON
;
}
else
{
IC2_SEG116
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC2_SEG113
=
IC_SEG_ON
;
}
else
{
IC2_SEG113
=
IC_SEG_OFF
;
}
}
else
}
else
if
(
learnflag
==
3
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG123
=
IC_SEG_ON
;
IC2_SEG121
=
IC_SEG_ON
;
IC2_SEG119
=
IC_SEG_ON
;
IC2_SEG126
=
IC_SEG_ON
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_ON
;
IC2_SEG115
=
IC_SEG_ON
;
IC2_SEG114
=
IC_SEG_ON
;
IC2_SEG112
=
IC_SEG_ON
;
IC2_SEG111
=
IC_SEG_ON
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
...
...
@@ -2375,48 +3073,11 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG116
=
IC_SEG_OFF
;
}
}
else
else
{
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
IC2_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_OFF
;
IC2_SEG118
=
IC_SEG_OFF
;
IC2_SEG122
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
IC2_SEG142
=
IC_SEG_OFF
;
;
}
}
/**@brief 总计里程显示函数
* @param[in] m_NUM_ODO 显示ODO数值 0 < m_NUM <= 199999
...
...
@@ -3587,7 +4248,7 @@ void Check_SEG_Display(void)
SEG_SET_Clock
(((
a
*
10u
)
+
a
),
((
a
*
10u
)
+
a
),
1u
,
1u
,
1u
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_
NUM
(
1
,
a
*
11
,
a
*
11
,
0
,
1
,
1
);
SEG_SET_TPMS_
DISPLAY
(
1
,
a
*
11
,
a
*
11
,
0
,
1
,
1
);
#endif
SEG_SET_Voltage_NUM
(
1
,
a
*
111
);
SEG_SET_Navigation_STS
(
1
,
3
,
a
*
111100
);
...
...
@@ -3656,7 +4317,7 @@ void Checkself_SEG_Display(void)
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
#if(IC_Current == TY200_080000b_ty)
TPMS
=
(
Checkself_SEG_step
/
3
)
*
11
;
SEG_SET_TPMS_
NUM
(
1
,
TPMS
,
TPMS
,
0
,
1
,
1
);
SEG_SET_TPMS_
DISPLAY
(
1
,
TPMS
,
TPMS
,
0
,
1
,
1
);
#endif
voltage
=
(
Checkself_SEG_step
/
3
)
*
111
;
SEG_SET_Voltage_NUM
(
1
,
voltage
);
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
View file @
2a5f4dfa
...
...
@@ -48,11 +48,13 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG);
void
SEG_SET_CoolantDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
,
uint16_t
m_Num
,
uint8_t
m_flash
);
void
SEG_SET_VSpeed_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
,
uint8_t
m_Unit
);
void
SEG_SET_Voltage_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
);
void
SEG_SET_TPMS_
NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM1
,
uint16_t
m_NUM2
,
uint8_t
m_Unit
,
uint8_t
m_valid1
,
uint8_t
m_valid2
);
void
SEG_SET_TPMS_
DISPLAY
(
uint8_t
m_Flag
,
uint16_t
m_NUM1
,
uint16_t
m_NUM2
,
uint8_t
m_Unit
,
uint8_t
m_valid1
,
uint8_t
m_valid2
);
void
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS
(
uint8_t
m_Uint
,
uint32_t
m_NUM_ODO
,
uint32_t
m_NUM_TRIP
);
void
SEG_SET_Clock
(
uint8_t
m_hour
,
uint8_t
m_minute
,
uint8_t
m_icon
,
uint8_t
m_Flag1
,
uint8_t
m_Flag2
);
void
SEG_SET_Navigation_STS
(
uint8_t
m_Flag
,
uint8_t
m_Code
,
uint32_t
m_Mileage
);
void
Check_SEG_Display
(
void
);
void
SEG_SET_FRONT_TPMS_NUM
(
uint8_t
learnflag
,
uint16_t
m_NUM1
,
uint8_t
m_valid1
);
void
SEG_SET_Rear_TPMS_NUM
(
uint8_t
learnflag
,
uint16_t
m_NUM2
,
uint8_t
m_valid2
);
extern
uint8_t
check_SEG_step
;
extern
uint8_t
Espeed_check_SEG_step
;
...
...
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