Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
c5d63a95
Commit
c5d63a95
authored
Feb 20, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:混动车型增加刀盘开关指示灯功能逻辑
parent
9ff4e1b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
10 deletions
+50
-10
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+19
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+29
-10
Telltales_user.h
Firmware/Source/Component/Telltales/Telltales_user.h
+2
-0
No files found.
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
c5d63a95
...
@@ -464,6 +464,25 @@ void CAN_0x220_Receive(uint8_t CopyData [])
...
@@ -464,6 +464,25 @@ void CAN_0x220_Receive(uint8_t CopyData [])
g_ReadyCount
=
0U
;
g_ReadyCount
=
0U
;
}
}
if
((
Get_CAN_CH0_ID_220_Sig_VCU_PtoSwSts
()
==
1U
)
&&
(
g_PtoSwStatus
==
0U
))
{
if
(
g_PtoSwCount
<
3U
)
{
g_PtoSwCount
++
;
}
}
else
if
((
Get_CAN_CH0_ID_220_Sig_VCU_PtoSwSts
()
==
0U
)
&&
(
g_PtoSwStatus
==
1U
))
{
if
(
g_PtoSwCount
<
3U
)
{
g_PtoSwCount
++
;
}
}
else
{
g_PtoSwCount
=
0U
;
}
#endif
#endif
}
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
c5d63a95
...
@@ -82,6 +82,8 @@ uint8_t g_ChgModeStatus = 0U;
...
@@ -82,6 +82,8 @@ uint8_t g_ChgModeStatus = 0U;
uint8_t
g_ChgModeCount
=
0U
;
uint8_t
g_ChgModeCount
=
0U
;
uint8_t
g_WorkStatus
=
0U
;
uint8_t
g_WorkStatus
=
0U
;
uint8_t
g_WorkCount
=
0U
;
uint8_t
g_WorkCount
=
0U
;
uint8_t
g_PtoSwStatus
=
0U
;
uint8_t
g_PtoSwCount
=
0U
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
@@ -142,6 +144,8 @@ void Telltales_Init(void)
...
@@ -142,6 +144,8 @@ void Telltales_Init(void)
g_ChgModeCount
=
0U
;
g_ChgModeCount
=
0U
;
g_WorkStatus
=
0U
;
g_WorkStatus
=
0U
;
g_WorkCount
=
0U
;
g_WorkCount
=
0U
;
g_PtoSwStatus
=
0U
;
g_PtoSwCount
=
0U
;
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
}
}
...
@@ -633,15 +637,30 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status)
...
@@ -633,15 +637,30 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Cutterhead_Switch_Judgement
(
void
)
static
Tellib_uint16_t
LED_Cutterhead_Switch_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_Num_BMCU_PTOSwicthState
();
#if (PART_NUMBER == RMR42E_60)
if
((
Signal1
==
0x1
)
&&
openLED_flag
)
Tellib_uint8_t
Signal1
=
Get_CAN_Num_BMCU_PTOSwicthState
();
{
if
((
Signal1
==
0x1
)
&&
openLED_flag
)
LED_STATE
=
1
;
{
}
LED_STATE
=
1
;
else
}
{
else
LED_STATE
=
0
;
{
}
LED_STATE
=
0
;
}
#else
if
((
g_PtoSwStatus
==
0U
)
&&
(
g_PtoSwCount
>=
3U
))
{
g_PtoSwStatus
=
1U
;
}
else
if
((
g_PtoSwStatus
==
1U
)
&&
(
g_PtoSwCount
>=
3U
))
{
g_PtoSwStatus
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_PtoSwStatus
;
#endif
return
LED_STATE
;
return
LED_STATE
;
}
}
static
void
LED_Cutterhead_Switch_Execution
(
Tellib_uint16_t
led_status
)
static
void
LED_Cutterhead_Switch_Execution
(
Tellib_uint16_t
led_status
)
...
@@ -745,7 +764,7 @@ static Tellib_uint16_t LED_Engine_Works_Judgement(void)
...
@@ -745,7 +764,7 @@ static Tellib_uint16_t LED_Engine_Works_Judgement(void)
static
void
LED_Engine_Works_Execution
(
Tellib_uint16_t
led_status
)
static
void
LED_Engine_Works_Execution
(
Tellib_uint16_t
led_status
)
{
{
#if (PART_NUMBER == G54_A01)
#if (PART_NUMBER == G54_A01)
if
(
led_status
==
1u
)
if
(
led_status
==
1u
)
{
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_16_Engine_Works_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_16_Engine_Works_W
,
LED_ON
);
...
...
Firmware/Source/Component/Telltales/Telltales_user.h
View file @
c5d63a95
...
@@ -63,6 +63,8 @@ extern uint8_t g_ChgModeStatus;
...
@@ -63,6 +63,8 @@ extern uint8_t g_ChgModeStatus;
extern
uint8_t
g_ChgModeCount
;
extern
uint8_t
g_ChgModeCount
;
extern
uint8_t
g_WorkStatus
;
extern
uint8_t
g_WorkStatus
;
extern
uint8_t
g_WorkCount
;
extern
uint8_t
g_WorkCount
;
extern
uint8_t
g_PtoSwStatus
;
extern
uint8_t
g_PtoSwCount
;
// extern Tellib_uint8_t Auto_Start_Stop ;
// extern Tellib_uint8_t Auto_Start_Stop ;
void
Telltales_Init
(
void
);
void
Telltales_Init
(
void
);
...
...
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