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
3a204048
Commit
3a204048
authored
May 20, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修改单位转换时显示样式
parent
4247e53f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
244 additions
and
176 deletions
+244
-176
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+244
-176
No files found.
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
3a204048
...
...
@@ -896,20 +896,42 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
{
if
(
Get_Current_PageType
()
==
Page_Km_Unit
)
{
if
(
FLASH_SYNC_1Hz
)
if
(
m_Unit
==
0
)
{
IC2_SEG156
=
IC_SEG_ON
;
IC2_SEG159
=
IC_SEG_ON
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_ON
);
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG156
=
IC_SEG_OFF
;
IC2_SEG159
=
IC_SEG_ON
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
}
else
{
IC2_SEG156
=
IC_SEG_OFF
;
IC2_SEG159
=
IC_SEG_OFF
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
}
}
else
{
IC2_SEG156
=
IC_SEG_OFF
;
IC2_SEG159
=
IC_SEG_OFF
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG156
=
IC_SEG_ON
;
IC2_SEG159
=
IC_SEG_OFF
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_ON
);
}
else
{
IC2_SEG156
=
IC_SEG_OFF
;
IC2_SEG159
=
IC_SEG_OFF
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_08_KMH
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_MPH
,
LED_OFF
);
}
}
}
else
{
...
...
@@ -1109,192 +1131,221 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
{
IC1_SEG079
=
IC_SEG_ON
;
IC1_SEG086
=
IC_SEG_ON
;
Num
=
m_NUM
/
100
;
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Get_Battery_Voltage_Valid
()
==
1
)
{
IC1_SEG096
=
IC_SEG_ON
;
Num
=
m_NUM
/
100
;
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC1_SEG096
=
IC_SEG_ON
;
}
else
{
IC1_SEG096
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC1_SEG095
=
IC_SEG_ON
;
}
else
{
IC1_SEG095
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC1_SEG093
=
IC_SEG_ON
;
}
else
{
IC1_SEG093
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC1_SEG099
=
IC_SEG_ON
;
}
else
{
IC1_SEG099
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC1_SEG098
=
IC_SEG_ON
;
}
else
{
IC1_SEG098
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC1_SEG097
=
IC_SEG_ON
;
}
else
{
IC1_SEG097
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC1_SEG094
=
IC_SEG_ON
;
}
else
{
IC1_SEG094
=
IC_SEG_OFF
;
}
/*十位*/
Num
=
(
m_NUM
/
10u
)
%
10u
;
if
((
m_NUM
>=
100u
)
||
(
m_NUM
==
0
))
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC1_SEG090
=
IC_SEG_ON
;
}
else
{
IC1_SEG090
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC1_SEG089
=
IC_SEG_ON
;
}
else
{
IC1_SEG089
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC1_SEG087
=
IC_SEG_ON
;
}
else
{
IC1_SEG087
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC1_SEG100
=
IC_SEG_ON
;
}
else
{
IC1_SEG100
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC1_SEG092
=
IC_SEG_ON
;
}
else
{
IC1_SEG092
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC1_SEG091
=
IC_SEG_ON
;
}
else
{
IC1_SEG091
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC1_SEG088
=
IC_SEG_ON
;
}
else
{
IC1_SEG088
=
IC_SEG_OFF
;
}
/*个位*/
Num
=
m_NUM
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC1_SEG083
=
IC_SEG_ON
;
}
else
{
IC1_SEG083
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC1_SEG082
=
IC_SEG_ON
;
}
else
{
IC1_SEG082
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC1_SEG080
=
IC_SEG_ON
;
}
else
{
IC1_SEG080
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC1_SEG101
=
IC_SEG_ON
;
}
else
{
IC1_SEG101
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC1_SEG085
=
IC_SEG_ON
;
}
else
{
IC1_SEG085
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC1_SEG084
=
IC_SEG_ON
;
}
else
{
IC1_SEG084
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC1_SEG081
=
IC_SEG_ON
;
}
else
{
IC1_SEG081
=
IC_SEG_OFF
;
}
}
else
{
IC1_SEG088
=
IC_SEG_ON
;
IC1_SEG081
=
IC_SEG_ON
;
IC1_SEG096
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC1_SEG095
=
IC_SEG_ON
;
}
else
{
IC1_SEG095
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC1_SEG093
=
IC_SEG_ON
;
}
else
{
IC1_SEG093
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC1_SEG099
=
IC_SEG_ON
;
}
else
{
IC1_SEG099
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC1_SEG098
=
IC_SEG_ON
;
}
else
{
IC1_SEG098
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC1_SEG097
=
IC_SEG_ON
;
}
else
{
IC1_SEG097
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC1_SEG094
=
IC_SEG_ON
;
}
else
{
IC1_SEG094
=
IC_SEG_OFF
;
}
/*十位*/
Num
=
(
m_NUM
/
10u
)
%
10u
;
if
((
m_NUM
>=
100u
)
||
(
m_NUM
==
0
))
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
else
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
}
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC1_SEG090
=
IC_SEG_ON
;
}
else
{
IC1_SEG090
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC1_SEG089
=
IC_SEG_ON
;
}
else
{
IC1_SEG089
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC1_SEG087
=
IC_SEG_ON
;
}
else
{
IC1_SEG087
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC1_SEG100
=
IC_SEG_ON
;
}
else
{
IC1_SEG100
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC1_SEG092
=
IC_SEG_ON
;
}
else
{
IC1_SEG092
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC1_SEG091
=
IC_SEG_ON
;
}
else
{
IC1_SEG091
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC1_SEG088
=
IC_SEG_ON
;
}
else
{
IC1_SEG088
=
IC_SEG_OFF
;
}
/*个位*/
Num
=
m_NUM
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
if
(
Bit_Is_Set
(
m8
,
0
))
{
IC1_SEG083
=
IC_SEG_ON
;
}
else
{
IC1_SEG083
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
1
))
{
IC1_SEG082
=
IC_SEG_ON
;
}
else
{
IC1_SEG082
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
2
))
{
IC1_SEG080
=
IC_SEG_ON
;
}
else
{
IC1_SEG080
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
3
))
{
IC1_SEG101
=
IC_SEG_ON
;
}
else
{
IC1_SEG101
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
4
))
{
IC1_SEG085
=
IC_SEG_ON
;
}
else
{
IC1_SEG085
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
5
))
{
IC1_SEG084
=
IC_SEG_ON
;
}
else
{
IC1_SEG084
=
IC_SEG_OFF
;
}
if
(
Bit_Is_Set
(
m8
,
6
))
{
IC1_SEG081
=
IC_SEG_ON
;
}
else
{
IC1_SEG081
=
IC_SEG_OFF
;
}
}
}
...
...
@@ -1693,18 +1744,35 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
RTE_GPIO_Set_Level
(
ODO_Thousand
,
1
);
if
((
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
if
(
Get_Current_PageType
()
==
Page_Km_Unit
)
if
(
(
Get_Current_PageType
()
==
Page_Km_Unit
)
&&
((
Get_Current_PageMenu
()
==
Page_Odo
)
||
(
Get_Current_PageMenu
()
==
Page_Trip
))
)
{
if
(
FLASH_SYNC_1Hz
)
if
(
m_Uint
==
0
)
{
IC1_SEG036
=
IC_SEG_ON
;
IC1_SEG037
=
IC_SEG_ON
;
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG036
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_ON
;
}
else
{
IC1_SEG036
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_OFF
;
}
}
else
{
IC1_SEG036
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_OFF
;
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG036
=
IC_SEG_ON
;
IC1_SEG037
=
IC_SEG_OFF
;
}
else
{
IC1_SEG036
=
IC_SEG_OFF
;
IC1_SEG037
=
IC_SEG_OFF
;
}
}
}
else
{
...
...
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