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
f299cc3a
Commit
f299cc3a
authored
Aug 15, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:55788 从闪烁到常亮应该把闪烁亮灭周期执行完,在进行常亮显示
parent
e7149627
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+77
-0
No files found.
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
f299cc3a
...
...
@@ -44,6 +44,9 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
//Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t
LED_Battery_Voltage
=
0
;
Tellib_uint16_t
Battery_Voltage_valid
=
0
;
Tellib_uint8_t
LED_TCS_STATE
=
0
;
Tellib_uint8_t
LED_TCS_CUR_STATE
=
0
;
Tellib_uint8_t
LED_TCS_VALUE
=
0
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
...
@@ -380,6 +383,78 @@ static void LED_Bluetooth_Execution(Tellib_uint16_t led_status)
}
}
static
Tellib_uint16_t
LED_TCS_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Get_Dis_Tcs_Val
()
==
1
)
{
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x120_Msg_Count
)
==
CAN_SIG_LOST
))
{
LED_TCS_STATE
=
1
;
}
else
{
if
((
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
1
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
2
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
3
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
5
))
{
LED_TCS_STATE
=
1
;
}
else
if
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
4
)
{
LED_TCS_STATE
=
2
;
}
else
if
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
6
)
{
LED_TCS_STATE
=
3
;
}
else
if
((
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
0
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
7
))
{
LED_TCS_STATE
=
0
;
}
}
}
else
{
LED_TCS_STATE
=
0
;
}
if
((
LED_TCS_CUR_STATE
==
2
))
{
if
((
LED_TCS_VALUE
==
0
)
&&
(
FLASH_SYNC_1Hz
))
{
LED_TCS_CUR_STATE
=
LED_TCS_STATE
;
}
LED_TCS_VALUE
=
FLASH_SYNC_1Hz
;
LED_STATE
=
FLASH_SYNC_1Hz
;
}
else
if
(
LED_TCS_CUR_STATE
==
3
)
{
if
((
LED_TCS_VALUE
==
0
)
&&
(
FLASH_SYNC_2Hz
))
{
LED_TCS_CUR_STATE
=
LED_TCS_STATE
;
}
LED_TCS_VALUE
=
FLASH_SYNC_2Hz
;
LED_STATE
=
FLASH_SYNC_2Hz
;
}
if
((
LED_TCS_CUR_STATE
!=
2
)
&&
(
LED_TCS_CUR_STATE
!=
3
))
{
LED_TCS_CUR_STATE
=
LED_TCS_STATE
;
if
(
LED_TCS_CUR_STATE
)
{
LED_STATE
=
1
;
}
else
{
LED_STATE
=
0
;
}
}
return
LED_STATE
;
}
#if 0
static Tellib_uint16_t LED_TCS_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
...
...
@@ -419,6 +494,8 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
return LED_STATE;
}
#endif
static
void
LED_TCS_Execution
(
Tellib_uint16_t
led_status
)
{
if
(
led_status
==
1u
)
...
...
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