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
af81c159
Commit
af81c159
authored
Jun 24, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:47978,自检期间IGOFF,关闭导航背光
parent
af4184b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
622 additions
and
640 deletions
+622
-640
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+3
-1
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+619
-639
No files found.
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
af81c159
...
@@ -152,7 +152,9 @@ void Gauge_Service(void)
...
@@ -152,7 +152,9 @@ void Gauge_Service(void)
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_19_Navigator2
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_19_Navigator2
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_17_Length2
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_17_Length2
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_18_Length1
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_18_Length1
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_14_ARRIVED_SERVICE_AREA
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_15_ARRIVED_TOLLGATE
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_16_ARRIVED_TUNNEL
,
LED_OFF
);
}
}
}
}
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
af81c159
...
@@ -364,7 +364,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -364,7 +364,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
}
}
else
else
{
{
switch
(
m_Code
)
switch
(
m_Code
)
{
{
case
EC_NAVI_ICON_LEFT
:
case
EC_NAVI_ICON_LEFT
:
case
EC_NAVI_ICON_ENTRY_RING_LEFT
:
case
EC_NAVI_ICON_ENTRY_RING_LEFT
:
...
@@ -677,7 +677,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -677,7 +677,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
break
;
break
;
}
}
}
}
if
(
m_Flag
)
if
(
m_Flag
)
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_17_Length2
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_17_Length2
,
LED_ON
);
...
@@ -690,7 +690,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -690,7 +690,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
}
}
else
else
{
{
if
(
m_Mileage
<
1000
)
if
(
m_Mileage
<
1000
)
{
{
IC1_SEG030
=
IC_SEG_OFF
;
IC1_SEG030
=
IC_SEG_OFF
;
IC1_SEG130
=
IC_SEG_ON
;
IC1_SEG130
=
IC_SEG_ON
;
...
@@ -702,7 +702,6 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -702,7 +702,6 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
IC1_SEG130
=
IC_SEG_OFF
;
IC1_SEG130
=
IC_SEG_OFF
;
IC1_SEG129
=
IC_SEG_ON
;
IC1_SEG129
=
IC_SEG_ON
;
}
}
}
}
{
{
...
@@ -783,12 +782,19 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -783,12 +782,19 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
if
(
m_Mileage
<
1000
)
if
(
m_Mileage
<
1000
)
{
{
Num
=
m_Mileage
/
100
;
Num
=
m_Mileage
/
100
;
if
((
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
))
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
}
}
}
else
else
{
{
Num
=
((
m_Mileage
+
50
)
/
100
)
%
1000
/
100
;
Num
=
((
m_Mileage
+
50
)
/
100
)
%
1000
/
100
;
if
(
m_Mileage
>=
10000
)
if
(
(
m_Mileage
>=
10000
)
||
(
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
)
)
{
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
...
@@ -797,11 +803,6 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -797,11 +803,6 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
}
}
}
}
if
((
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
))
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
0
))
{
{
...
@@ -862,7 +863,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -862,7 +863,7 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
if
(
m_Mileage
<
1000
)
if
(
m_Mileage
<
1000
)
{
{
Num
=
(
m_Mileage
/
10
)
%
10
;
Num
=
(
m_Mileage
/
10
)
%
10
;
if
(
m_Mileage
>=
10
)
if
((
m_Mileage
>=
10
)
||
(
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
)
)
{
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
...
@@ -870,17 +871,13 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -870,17 +871,13 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
{
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
}
}
}
}
else
else
{
{
Num
=
(((
m_Mileage
+
50
)
/
100
)
/
10
)
%
10
;
Num
=
(((
m_Mileage
+
50
)
/
100
)
/
10
)
%
10
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
if
((
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
))
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
0
))
{
{
IC1_SEG133
=
IC_SEG_ON
;
IC1_SEG133
=
IC_SEG_ON
;
...
@@ -942,18 +939,13 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -942,18 +939,13 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
Num
=
m_Mileage
%
10
;
Num
=
m_Mileage
%
10
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
else
else
{
{
Num
=
((
m_Mileage
+
50
)
/
100
)
%
10
;
Num
=
((
m_Mileage
+
50
)
/
100
)
%
10
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
if
((
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
))
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
0
))
{
{
IC1_SEG132
=
IC_SEG_ON
;
IC1_SEG132
=
IC_SEG_ON
;
...
@@ -1059,6 +1051,8 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
...
@@ -1059,6 +1051,8 @@ void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage)
}
}
}
}
/**@brief 燃油表显示函数
/**@brief 燃油表显示函数
* @param[in] m_Flag 段与数字是否显示 -1 显示 -0 不显示
* @param[in] m_Flag 段与数字是否显示 -1 显示 -0 不显示
* @param[in] m_SEG 燃油表盘段数0<=m_SEG<=5
* @param[in] m_SEG 燃油表盘段数0<=m_SEG<=5
...
@@ -1075,7 +1069,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
...
@@ -1075,7 +1069,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
IC2_SEG102
=
IC_SEG_GREY
;
IC2_SEG102
=
IC_SEG_GREY
;
IC2_SEG101
=
IC_SEG_GREY
;
IC2_SEG101
=
IC_SEG_GREY
;
if
(((
Get_Fuel_Sensor_State
()
==
2
)
||
(
Get_Fuel_Sensor_State
()
==
1
))
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
if
(((
Get_Fuel_Sensor_State
()
==
2
)
||
(
Get_Fuel_Sensor_State
()
==
1
))
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
...
@@ -1103,7 +1097,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
...
@@ -1103,7 +1097,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
else
else
{
{
if
((
Get_CurFuelSetp
()
==
0
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
if
((
Get_CurFuelSetp
()
==
0
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
...
@@ -1154,7 +1148,6 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
...
@@ -1154,7 +1148,6 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
break
;
break
;
}
}
}
}
}
}
}
}
else
else
...
@@ -1168,7 +1161,6 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
...
@@ -1168,7 +1161,6 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
IC2_SEG107
=
IC_SEG_OFF
;
IC2_SEG107
=
IC_SEG_OFF
;
IC2_SEG100
=
IC_SEG_OFF
;
IC2_SEG100
=
IC_SEG_OFF
;
}
}
}
}
/**@brief 转速表盘显示函数
/**@brief 转速表盘显示函数
...
@@ -1291,8 +1283,6 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG)
...
@@ -1291,8 +1283,6 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG)
default:
default:
break
;
break
;
}
}
}
}
else
else
{
{
...
@@ -1352,7 +1342,6 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG)
...
@@ -1352,7 +1342,6 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG)
IC1_SEG140
=
IC_SEG_OFF
;
IC1_SEG140
=
IC_SEG_OFF
;
IC1_SEG144
=
IC_SEG_OFF
;
IC1_SEG144
=
IC_SEG_OFF
;
}
}
}
}
/**@brief 水温表显示函数
/**@brief 水温表显示函数
* @param[in] m_Flag 段与数字是否显示 -1 显示 -0 不显示
* @param[in] m_Flag 段与数字是否显示 -1 显示 -0 不显示
...
@@ -1366,7 +1355,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
...
@@ -1366,7 +1355,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
uint8_t
m8
;
uint8_t
m8
;
if
(
m_Flag
==
1u
)
if
(
m_Flag
==
1u
)
{
{
if
((
m_flash
==
0
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
if
((
m_flash
==
0
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
...
@@ -1411,7 +1400,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
...
@@ -1411,7 +1400,7 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
default:
default:
break
;
break
;
}
}
if
((
m_flash
==
0
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
if
((
m_flash
==
0
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
{
IC1_SEG128
=
IC_SEG_OFF
;
IC1_SEG128
=
IC_SEG_OFF
;
IC1_SEG125
=
IC_SEG_OFF
;
IC1_SEG125
=
IC_SEG_OFF
;
...
@@ -1564,8 +1553,6 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
...
@@ -1564,8 +1553,6 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
IC1_SEG116
=
IC_SEG_OFF
;
IC1_SEG116
=
IC_SEG_OFF
;
}
}
}
}
}
}
else
else
{
{
...
@@ -1595,15 +1582,13 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
...
@@ -1595,15 +1582,13 @@ void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t
IC1_SEG120
=
IC_SEG_OFF
;
IC1_SEG120
=
IC_SEG_OFF
;
IC1_SEG116
=
IC_SEG_OFF
;
IC1_SEG116
=
IC_SEG_OFF
;
}
}
}
}
/**@brief 车速数字显示函数
/**@brief 车速数字显示函数
* @param[in] m_Flag 车速是否显示 -1 显示 -0 不显示
* @param[in] m_Flag 车速是否显示 -1 显示 -0 不显示
* @param[in] m_NUM 车速数值
* @param[in] m_NUM 车速数值
* @param[in] m_Unit 车速单位 -0 Km -1 mile
* @param[in] m_Unit 车速单位 -0 Km -1 mile
*/
*/
void
SEG_SET_VSpeed_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
,
uint8_t
m_Unit
)
void
SEG_SET_VSpeed_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
,
uint8_t
m_Unit
)
{
{
uint16_t
Num
=
0
;
uint16_t
Num
=
0
;
...
@@ -1627,14 +1612,13 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
...
@@ -1627,14 +1612,13 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
RTE_GPIO_Set_Level
(
VSpeed_Hundreds
,
0
);
RTE_GPIO_Set_Level
(
VSpeed_Hundreds
,
0
);
}
}
if
((
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
if
((
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
{
if
(
Get_Current_PageType
()
==
Page_Km_Unit
)
if
(
Get_Current_PageType
()
==
Page_Km_Unit
)
{
{
if
(
m_Unit
==
0
)
if
(
m_Unit
==
0
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG156
=
IC_SEG_OFF
;
IC2_SEG156
=
IC_SEG_OFF
;
IC2_SEG159
=
IC_SEG_ON
;
IC2_SEG159
=
IC_SEG_ON
;
...
@@ -1648,11 +1632,10 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
...
@@ -1648,11 +1632,10 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
}
}
}
}
else
else
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG156
=
IC_SEG_ON
;
IC2_SEG156
=
IC_SEG_ON
;
IC2_SEG159
=
IC_SEG_OFF
;
IC2_SEG159
=
IC_SEG_OFF
;
...
@@ -1667,7 +1650,6 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
...
@@ -1667,7 +1650,6 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
}
}
}
}
}
}
else
else
{
{
...
@@ -1686,7 +1668,6 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
...
@@ -1686,7 +1668,6 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_ON
);
}
}
}
}
}
}
else
else
{
{
...
@@ -1828,7 +1809,6 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
...
@@ -1828,7 +1809,6 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
{
{
IC2_SEG150
=
IC_SEG_OFF
;
IC2_SEG150
=
IC_SEG_OFF
;
}
}
}
}
else
else
{
{
...
@@ -1856,18 +1836,18 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
...
@@ -1856,18 +1836,18 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
}
}
}
}
/**@brief 电压数字显示函数
/**@brief 电压数字显示函数
* @param[in] m_Flag 电压是否显示 -1 显示 -0 不显示
* @param[in] m_Flag 电压是否显示 -1 显示 -0 不显示
* @param[in] m_NUM 电压数值
* @param[in] m_NUM 电压数值
*/
*/
void
SEG_SET_Voltage_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
)
void
SEG_SET_Voltage_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
)
{
{
uint16_t
Num
=
0
;
uint16_t
Num
=
0
;
uint8_t
m8
;
uint8_t
m8
;
if
(
m_Flag
)
if
(
m_Flag
)
{
{
IC1_SEG079
=
IC_SEG_ON
;
IC1_SEG079
=
IC_SEG_ON
;
IC1_SEG086
=
IC_SEG_ON
;
IC1_SEG086
=
IC_SEG_ON
;
if
((
Get_Battery_Voltage_Valid
()
!=
1
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>
3000
))
if
((
Get_Battery_Voltage_Valid
()
!=
1
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
{
IC1_SEG088
=
IC_SEG_ON
;
IC1_SEG088
=
IC_SEG_ON
;
...
@@ -1896,7 +1876,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
...
@@ -1896,7 +1876,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
else
else
{
{
Num
=
m_NUM
/
100
;
Num
=
m_NUM
/
100
;
if
((
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<=
3000
))
if
((
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<=
3000
))
{
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
}
...
@@ -1905,7 +1885,6 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
...
@@ -1905,7 +1885,6 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
}
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
0
))
{
{
IC1_SEG096
=
IC_SEG_ON
;
IC1_SEG096
=
IC_SEG_ON
;
...
@@ -2088,25 +2067,23 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
...
@@ -2088,25 +2067,23 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
IC1_SEG081
=
IC_SEG_OFF
;
IC1_SEG081
=
IC_SEG_OFF
;
}
}
}
}
}
}
}
}
/**@brief 胎压数字显示函数
/**@brief 胎压数字显示函数
* @param[in] m_Flag 胎压是否显示 -1 显示 -0 不显示
* @param[in] m_Flag 胎压是否显示 -1 显示 -0 不显示
* @param[in] m_NUM1 前轮胎压数值
* @param[in] m_NUM1 前轮胎压数值
* @param[in] m_NUM2 后轮胎压数值
* @param[in] m_NUM2 后轮胎压数值
* @param[in] m_Unit 胎压单位 -1 Psi -0 Bar
* @param[in] m_Unit 胎压单位 -1 Psi -0 Bar
* @param[in] m_valid1 前轮有效标志 -0 无效,显示--
* @param[in] m_valid1 前轮有效标志 -0 无效,显示--
* @param[in] m_valid2 后轮有效标志 -0 无效,显示--
* @param[in] m_valid2 后轮有效标志 -0 无效,显示--
*/
*/
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_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
Num1
=
0
;
uint16_t
Num2
=
0
;
uint16_t
Num2
=
0
;
uint8_t
m8
;
uint8_t
m8
;
if
(
m_Flag
)
if
(
m_Flag
)
{
{
IC2_SEG142
=
IC_SEG_ON
;
IC2_SEG142
=
IC_SEG_ON
;
IC2_SEG122
=
IC_SEG_ON
;
IC2_SEG122
=
IC_SEG_ON
;
...
@@ -2118,7 +2095,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2118,7 +2095,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
{
{
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_ON
;
IC2_SEG110
=
IC_SEG_ON
;
...
@@ -2133,7 +2110,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2133,7 +2110,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
{
{
IC2_SEG118
=
IC_SEG_OFF
;
IC2_SEG118
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG109
=
IC_SEG_ON
;
IC2_SEG109
=
IC_SEG_ON
;
IC2_SEG110
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_OFF
;
...
@@ -2144,21 +2121,18 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2144,21 +2121,18 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG110
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_OFF
;
}
}
}
}
}
}
else
else
{
{
if
(
m_Unit
==
0
)
if
(
m_Unit
==
0
)
{
{
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_ON
;
IC2_SEG110
=
IC_SEG_ON
;
if
((
Get_Current_PageType
()
==
Page_Front_Tpms
)
||
(
Get_Front_FirstLearn_Flag
()
==
1
)
||
(
Get_Front_FirstLearn_Flag
()
==
3
))
if
((
Get_Current_PageType
()
==
Page_Front_Tpms
)
||
(
Get_Front_FirstLearn_Flag
()
==
1
)
||
(
Get_Front_FirstLearn_Flag
()
==
3
))
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG138
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
}
}
...
@@ -2174,7 +2148,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2174,7 +2148,7 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
if
((
Get_Current_PageType
()
==
Page_Rear_Tpms
)
||
(
Get_Rear_FirstLearn_Flag
()
==
1
)
||
(
Get_Rear_FirstLearn_Flag
()
==
3
))
if
((
Get_Current_PageType
()
==
Page_Rear_Tpms
)
||
(
Get_Rear_FirstLearn_Flag
()
==
1
)
||
(
Get_Rear_FirstLearn_Flag
()
==
3
))
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
}
}
...
@@ -2187,7 +2161,6 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2187,7 +2161,6 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
{
{
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
}
}
}
}
else
else
{
{
...
@@ -2196,13 +2169,10 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2196,13 +2169,10 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG118
=
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_FRONT_TPMS_NUM
(
Get_Front_FirstLearn_Flag
(),
m_NUM1
,
m_valid1
);
SEG_SET_Rear_TPMS_NUM
(
Get_Rear_FirstLearn_Flag
(),
m_NUM2
,
m_valid2
);
SEG_SET_Rear_TPMS_NUM
(
Get_Rear_FirstLearn_Flag
(),
m_NUM2
,
m_valid2
);
}
}
else
else
{
{
...
@@ -2210,13 +2180,9 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2210,13 +2180,9 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG110
=
IC_SEG_ON
;
IC2_SEG110
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
SEG_SET_FRONT_TPMS_NUM
(
2
,
m_NUM1
,
m_valid1
);
SEG_SET_FRONT_TPMS_NUM
(
2
,
m_NUM1
,
m_valid1
);
SEG_SET_Rear_TPMS_NUM
(
2
,
m_NUM2
,
m_valid2
);
SEG_SET_Rear_TPMS_NUM
(
2
,
m_NUM2
,
m_valid2
);
}
}
}
}
else
else
{
{
...
@@ -2255,11 +2221,10 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
...
@@ -2255,11 +2221,10 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG122
=
IC_SEG_OFF
;
IC2_SEG122
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
IC2_SEG142
=
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
)
void
SEG_SET_FRONT_TPMS_NUM
(
uint8_t
learnflag
,
uint16_t
m_NUM1
,
uint8_t
m_valid1
)
{
{
uint16_t
Num1
=
0
;
uint16_t
Num1
=
0
;
uint16_t
Num2
=
0
;
uint16_t
Num2
=
0
;
...
@@ -2268,7 +2233,7 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
...
@@ -2268,7 +2233,7 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
{
{
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
...
@@ -2308,11 +2273,10 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
...
@@ -2308,11 +2273,10 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
}
}
}
else
if
(
learnflag
==
1
)
else
if
(
learnflag
==
1
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
...
@@ -2339,7 +2303,7 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
...
@@ -2339,7 +2303,7 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
{
{
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
if
(
m_valid1
==
1
)
if
(
m_valid1
==
1
)
{
{
...
@@ -2655,11 +2619,10 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
...
@@ -2655,11 +2619,10 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
IC2_SEG136
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
}
}
}
}
}
else
if
(
learnflag
==
3
)
else
if
(
learnflag
==
3
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
...
@@ -2703,7 +2666,7 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
...
@@ -2703,7 +2666,7 @@ 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
)
void
SEG_SET_Rear_TPMS_NUM
(
uint8_t
learnflag
,
uint16_t
m_NUM2
,
uint8_t
m_valid2
)
{
{
uint16_t
Num1
=
0
;
uint16_t
Num1
=
0
;
uint16_t
Num2
=
0
;
uint16_t
Num2
=
0
;
...
@@ -2712,7 +2675,7 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
...
@@ -2712,7 +2675,7 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
{
{
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
...
@@ -2756,11 +2719,10 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
...
@@ -2756,11 +2719,10 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
}
}
}
else
if
(
learnflag
==
1
)
else
if
(
learnflag
==
1
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
...
@@ -2782,13 +2744,12 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
...
@@ -2782,13 +2744,12 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
}
else
if
(
learnflag
==
2
)
else
if
(
learnflag
==
2
)
{
{
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
if
(
m_valid2
==
1
)
if
(
m_valid2
==
1
)
{
{
...
@@ -3108,11 +3069,10 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
...
@@ -3108,11 +3069,10 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
IC2_SEG116
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
}
}
}
}
}
else
if
(
learnflag
==
3
)
else
if
(
learnflag
==
3
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
...
@@ -3174,7 +3134,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3174,7 +3134,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
{
{
if
(
m_Uint
==
0
)
if
(
m_Uint
==
0
)
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC1_SEG036
=
IC_SEG_OFF
;
IC1_SEG036
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_ON
;
IC1_SEG037
=
IC_SEG_ON
;
...
@@ -3187,7 +3147,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3187,7 +3147,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
}
}
else
else
{
{
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
{
IC1_SEG036
=
IC_SEG_ON
;
IC1_SEG036
=
IC_SEG_ON
;
IC1_SEG037
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_OFF
;
...
@@ -3198,11 +3158,10 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3198,11 +3158,10 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
IC1_SEG037
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_OFF
;
}
}
}
}
}
}
else
else
{
{
if
((
Get_Current_PageMenu
()
==
Page_Odo
)
||
(
Get_Current_PageMenu
()
==
Page_Trip
))
if
((
Get_Current_PageMenu
()
==
Page_Odo
)
||
(
Get_Current_PageMenu
()
==
Page_Trip
))
{
{
if
(
m_Uint
==
0
)
if
(
m_Uint
==
0
)
{
{
...
@@ -3215,7 +3174,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3215,7 +3174,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
IC1_SEG037
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_OFF
;
}
}
if
(
Get_Current_PageMenu
()
==
Page_Odo
)
if
(
Get_Current_PageMenu
()
==
Page_Odo
)
{
{
IC1_SEG072
=
IC_SEG_ON
;
IC1_SEG072
=
IC_SEG_ON
;
IC1_SEG045
=
IC_SEG_OFF
;
IC1_SEG045
=
IC_SEG_OFF
;
...
@@ -3246,9 +3205,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3246,9 +3205,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_35_ODO
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_35_ODO
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_34_TRIP
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_34_TRIP
,
LED_OFF
);
}
}
}
}
}
}
else
else
{
{
...
@@ -3261,9 +3218,9 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3261,9 +3218,9 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_34_TRIP
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_34_TRIP
,
LED_ON
);
}
}
if
((
Get_Current_PageMenu
()
==
Page_Odo
)
||
(
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
))
if
((
Get_Current_PageMenu
()
==
Page_Odo
)
||
(
ClearODO_Flag
==
1
)
||
(
Common_GetIgnOnTime
()
<
3000
))
{
{
if
(
m_NUM_ODO
>
99999
)
if
(
m_NUM_ODO
>
99999
)
{
{
IC1_SEG076
=
IC_SEG_ON
;
IC1_SEG076
=
IC_SEG_ON
;
}
}
...
@@ -3727,11 +3684,11 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3727,11 +3684,11 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
IC1_SEG055
=
IC_SEG_OFF
;
IC1_SEG055
=
IC_SEG_OFF
;
}
}
Num
=
(
m_NUM_TRIP
/
10
)
%
10
;
Num
=
(
m_NUM_TRIP
/
10
)
%
10
;
//if ((m_NUM_TRIP >= 100) || (m_NUM_TRIP == 0))
//
if ((m_NUM_TRIP >= 100) || (m_NUM_TRIP == 0))
//{
//{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
//}
//}
//else
//
else
//{
//{
// m8 = SEG_UNDISPLAY_NUMBER0[Num];
// m8 = SEG_UNDISPLAY_NUMBER0[Num];
//}
//}
...
@@ -3854,7 +3811,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3854,7 +3811,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
else
if
(
Get_Current_PageMenu
()
==
Page_DTC
)
else
if
(
Get_Current_PageMenu
()
==
Page_DTC
)
{
{
IC1_SEG076
=
IC_SEG_OFF
;
IC1_SEG076
=
IC_SEG_OFF
;
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x402_Msg_Count
)
==
CAN_SIG_LOST
)
//|| (Get_FaultCode_Valid() == 0))
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x402_Msg_Count
)
==
CAN_SIG_LOST
)
//|| (Get_FaultCode_Valid() == 0))
{
{
SEG_SET_DTC_NUM
(
0x0B0B0B0B
);
SEG_SET_DTC_NUM
(
0x0B0B0B0B
);
IC1_SEG071
=
IC_SEG_OFF
;
IC1_SEG071
=
IC_SEG_OFF
;
...
@@ -3867,22 +3824,22 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3867,22 +3824,22 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
}
}
else
else
{
{
//DTC_DISTimer ++;
//
DTC_DISTimer ++;
//IC1_SEG071 = IC_SEG_ON;
//
IC1_SEG071 = IC_SEG_ON;
//IC1_SEG070 = IC_SEG_ON;
//
IC1_SEG070 = IC_SEG_ON;
//IC1_SEG068 = IC_SEG_OFF;
//
IC1_SEG068 = IC_SEG_OFF;
//IC1_SEG075 = IC_SEG_OFF;
//
IC1_SEG075 = IC_SEG_OFF;
//IC1_SEG074 = IC_SEG_ON;
//
IC1_SEG074 = IC_SEG_ON;
//IC1_SEG073 = IC_SEG_ON;
//
IC1_SEG073 = IC_SEG_ON;
//IC1_SEG069 = IC_SEG_ON;
//
IC1_SEG069 = IC_SEG_ON;
//if((FaultCode_Number == 0) && (FaultCode_Data[0] == 0))
//
if((FaultCode_Number == 0) && (FaultCode_Data[0] == 0))
//{
//{
// SEG_SET_DTC_NUM(0);
// SEG_SET_DTC_NUM(0);
// DTC_DISTimer = 0;
// DTC_DISTimer = 0;
// Current_DTC_CODE = 0;
// Current_DTC_CODE = 0;
// Current_DTC_CODE_BACK = 0;
// Current_DTC_CODE_BACK = 0;
//}
//
}
//else
//
else
//{
//{
// if(DTC_DISTimer < 100)
// if(DTC_DISTimer < 100)
// {
// {
...
@@ -3913,7 +3870,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3913,7 +3870,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
// }
// }
// }
// }
// SEG_SET_DTC_NUM(Current_DTC_CODE);
// SEG_SET_DTC_NUM(Current_DTC_CODE);
//}
//
}
IC1_SEG071
=
IC_SEG_ON
;
IC1_SEG071
=
IC_SEG_ON
;
IC1_SEG070
=
IC_SEG_ON
;
IC1_SEG070
=
IC_SEG_ON
;
IC1_SEG068
=
IC_SEG_OFF
;
IC1_SEG068
=
IC_SEG_OFF
;
...
@@ -3952,9 +3909,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3952,9 +3909,7 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
IC1_SEG058
=
IC_SEG_ON
;
IC1_SEG058
=
IC_SEG_ON
;
IC1_SEG055
=
IC_SEG_OFF
;
IC1_SEG055
=
IC_SEG_OFF
;
if
(
Get_Dis_Tcs_Val
()
==
0
)
if
(
Get_Dis_Tcs_Val
()
==
0
)
{
{
IC1_SEG050
=
IC_SEG_ON
;
IC1_SEG050
=
IC_SEG_ON
;
IC1_SEG049
=
IC_SEG_OFF
;
IC1_SEG049
=
IC_SEG_OFF
;
...
@@ -3991,11 +3946,12 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
...
@@ -3991,11 +3946,12 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
IC1_SEG040
=
IC_SEG_OFF
;
IC1_SEG040
=
IC_SEG_OFF
;
}
}
}
}
else
{;}
else
{
;
}
}
}
/**@brief 时间显示函数
/**@brief 时间显示函数
* @param[in] m_hour 小时
* @param[in] m_hour 小时
* @param[in] m_minute 分钟
* @param[in] m_minute 分钟
...
@@ -4288,7 +4244,6 @@ void SEG_SET_Clock(uint8_t m_hour, uint8_t m_minute, uint8_t m_icon, uint8_t m_F
...
@@ -4288,7 +4244,6 @@ void SEG_SET_Clock(uint8_t m_hour, uint8_t m_minute, uint8_t m_icon, uint8_t m_F
IC2_SEG025
=
IC_SEG_OFF
;
IC2_SEG025
=
IC_SEG_OFF
;
IC2_SEG048
=
IC_SEG_OFF
;
IC2_SEG048
=
IC_SEG_OFF
;
}
}
}
}
uint8_t
fuel_check_SEG_step
=
0
;
uint8_t
fuel_check_SEG_step
=
0
;
...
@@ -4308,7 +4263,6 @@ void SEG_Scan_SET_Fuel_Coolant_Dial(uint8_t coolant)
...
@@ -4308,7 +4263,6 @@ void SEG_Scan_SET_Fuel_Coolant_Dial(uint8_t coolant)
}
}
}
}
uint8_t
Espeed_check_SEG_step
=
0
;
uint8_t
Espeed_check_SEG_step
=
0
;
void
SEG_Scan_SET_EspeedDial
(
void
)
void
SEG_Scan_SET_EspeedDial
(
void
)
{
{
...
@@ -4318,7 +4272,6 @@ void SEG_Scan_SET_EspeedDial(void)
...
@@ -4318,7 +4272,6 @@ void SEG_Scan_SET_EspeedDial(void)
SEG_SET_EspeedDial
(
1
,
a
/
500
);
SEG_SET_EspeedDial
(
1
,
a
/
500
);
}
}
uint8_t
check_SEG_step
=
0
;
uint8_t
check_SEG_step
=
0
;
/*仪表段码扫描函数*/
/*仪表段码扫描函数*/
...
@@ -4333,7 +4286,7 @@ void Check_SEG_Display(void)
...
@@ -4333,7 +4286,7 @@ void Check_SEG_Display(void)
SEG_SET_VSpeed_NUM
(
1u
,
(
100u
+
(
a
*
10u
)
+
a
),
0
);
SEG_SET_VSpeed_NUM
(
1u
,
(
100u
+
(
a
*
10u
)
+
a
),
0
);
SEG_SET_Clock
(((
a
*
10u
)
+
a
),
((
a
*
10u
)
+
a
),
1u
,
1u
,
1u
);
SEG_SET_Clock
(((
a
*
10u
)
+
a
),
((
a
*
10u
)
+
a
),
1u
,
1u
,
1u
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
#if
(IC_Current == TY200_080000b_ty)
#if
(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_DISPLAY
(
1
,
a
*
11
,
a
*
11
,
0
,
1
,
1
);
SEG_SET_TPMS_DISPLAY
(
1
,
a
*
11
,
a
*
11
,
0
,
1
,
1
);
#endif
#endif
SEG_SET_Voltage_NUM
(
1
,
a
*
111
);
SEG_SET_Voltage_NUM
(
1
,
a
*
111
);
...
@@ -4344,10 +4297,8 @@ void Check_SEG_Display(void)
...
@@ -4344,10 +4297,8 @@ void Check_SEG_Display(void)
SEG_SET_LED_STS
(
i
,
1
);
SEG_SET_LED_STS
(
i
,
1
);
}
}
SEG_Scan_SET_Fuel_Coolant_Dial
((
a
*
11
)
+
100
);
SEG_Scan_SET_Fuel_Coolant_Dial
((
a
*
11
)
+
100
);
SEG_Scan_SET_EspeedDial
();
SEG_Scan_SET_EspeedDial
();
}
}
uint8_t
Checkself_SEG_step
=
0
;
uint8_t
Checkself_SEG_step
=
0
;
...
@@ -4360,7 +4311,9 @@ void Checkself_Init(void)
...
@@ -4360,7 +4311,9 @@ void Checkself_Init(void)
Espeed_check_SEG_step
=
0
;
Espeed_check_SEG_step
=
0
;
fuel_check_SEG_step
=
0
;
fuel_check_SEG_step
=
0
;
}
}
//uint32_t u32NavigationCount = 0;
//uint32_t u32NavigationCount00 = 0;
//uint32_t u32NavigationCount11 = 1;
void
Checkself_SEG_Display
(
void
)
void
Checkself_SEG_Display
(
void
)
{
{
uint16_t
Vspeed
=
0
;
uint16_t
Vspeed
=
0
;
...
@@ -4373,41 +4326,41 @@ void Checkself_SEG_Display(void)
...
@@ -4373,41 +4326,41 @@ void Checkself_SEG_Display(void)
uint16_t
min
=
0
;
uint16_t
min
=
0
;
uint32_t
ODO
=
0
;
uint32_t
ODO
=
0
;
uint32_t
Mileage
=
0
;
uint32_t
Mileage
=
0
;
//uint32_t i = 0;
// uint32_t i = 0;
//SEG_SET_Navigation_Checkself(u32YZHDCount * 1111,u32YZHDCount22);
//for(i = 0; i < BU98R10_DDRAM_SIZE; i ++)
//u32NavigationCount00++;
//if (u32NavigationCount00 >= 3) // 500ms
//{
//{
// BU98R10Chip0DDRAM.Byte[i] = 1;
// u32NavigationCount00 = 0;
// BU98R10Chip1DDRAM.Byte[i] = 1;
// if (u32NavigationCount11 == 1)
// {
// u32NavigationCount++;
// if (u32NavigationCount >= 9)
// {
// u32NavigationCount11 = 0;
// }
// }
// else
// {
// if (u32NavigationCount)
// {
// u32NavigationCount--;
// }
// else
// {
// u32NavigationCount11 = 1;
// //u32YZHDCount22 = 0;
// }
// }
//}
//}
Mileage
=
((
Checkself_SEG_step
/
3
)
*
111100
);
SEG_SET_Navigation_STS
(
1
,
3
,
Mileage
);
Fuel
=
Checkself_SEG_step
/
5u
;
SEG_SET_FuelDial
(
1
,
Fuel
);
collant
=
100
+
((
Checkself_SEG_step
/
3
)
*
11
);
SEG_SET_CoolantDial
(
1
,
Fuel
,
collant
,
1
);
Espeed
=
(
Checkself_SEG_step
*
5
/
6
)
*
500
;
SEG_SET_EspeedDial
(
1
,
Espeed
/
500
);
Vspeed
=
((
Checkself_SEG_step
/
3
)
*
11
)
+
100
;
SEG_SET_VSpeed_NUM
(
1
,
Vspeed
,
0
);
ODO
=
((
Checkself_SEG_step
/
3
)
*
11111
)
+
100000
;
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS
(
1
,
ODO
,
0
);
hour
=
(
Checkself_SEG_step
/
3
)
*
11
;
min
=
(
Checkself_SEG_step
/
3
)
*
11
;
SEG_SET_Clock
(
hour
,
min
,
1
,
1
,
1
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
#if(IC_Current == TY200_080000b_ty)
TPMS_dis
=
(
Checkself_SEG_step
/
3
)
*
11
;
SEG_SET_TPMS_DISPLAY
(
1
,
TPMS_dis
,
TPMS_dis
,
0
,
1
,
1
);
#endif
voltage
=
(
Checkself_SEG_step
/
3
)
*
111
;
SEG_SET_Voltage_NUM
(
1
,
voltage
);
// for(i = 0; i < BU98R10_DDRAM_SIZE; i ++)
//{
// BU98R10Chip0DDRAM.Byte[i] = 1;
// BU98R10Chip1DDRAM.Byte[i] = 1;
// }
#if (1)
if
(
Checkself_SEG_step_count
<
60
)
if
(
Checkself_SEG_step_count
<
60
)
{
{
Checkself_SEG_step_count
++
;
Checkself_SEG_step_count
++
;
...
@@ -4432,11 +4385,38 @@ void Checkself_SEG_Display(void)
...
@@ -4432,11 +4385,38 @@ void Checkself_SEG_Display(void)
Checkself_SEG_step
--
;
Checkself_SEG_step
--
;
}
}
}
}
Mileage
=
((
Checkself_SEG_step
/
3
)
*
111100
);
Fuel
=
Checkself_SEG_step
/
5u
;
collant
=
100
+
((
Checkself_SEG_step
/
3
)
*
11
);
Espeed
=
(
Checkself_SEG_step
*
5
/
6
)
*
500
;
Vspeed
=
((
Checkself_SEG_step
/
3
)
*
11
)
+
100
;
ODO
=
((
Checkself_SEG_step
/
3
)
*
11111
)
+
100000
;
hour
=
(
Checkself_SEG_step
/
3
)
*
11
;
min
=
(
Checkself_SEG_step
/
3
)
*
11
;
voltage
=
(
Checkself_SEG_step
/
3
)
*
111
;
SEG_SET_Navigation_STS
(
1
,
3
,
Mileage
);
SEG_SET_FuelDial
(
1
,
Fuel
);
SEG_SET_CoolantDial
(
1
,
Fuel
,
collant
,
1
);
SEG_SET_EspeedDial
(
1
,
Espeed
/
500
);
SEG_SET_VSpeed_NUM
(
1
,
Vspeed
,
0
);
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS
(
1
,
ODO
,
0
);
SEG_SET_Voltage_NUM
(
1
,
voltage
);
SEG_SET_Clock
(
hour
,
min
,
1
,
1
,
1
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
#if (IC_Current == TY200_080000b_ty)
TPMS_dis
=
(
Checkself_SEG_step
/
3
)
*
11
;
SEG_SET_TPMS_DISPLAY
(
1
,
TPMS_dis
,
TPMS_dis
,
0
,
1
,
1
);
#endif
#endif
}
}
void
TYW_Check_Count
(
void
)
void
TYW_Check_Count
(
void
)
{
{
if
((
ClearODO_Flag
==
1
)
&&
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
))
if
((
ClearODO_Flag
==
1
)
&&
(
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
))
{
{
if
(
check_SEG_step
<
249u
)
if
(
check_SEG_step
<
249u
)
{
{
...
...
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