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
9ff4e1b6
Commit
9ff4e1b6
authored
Feb 20, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加0x22F报文回调函数,混动车型增加发动机工作指示灯工作逻辑
parent
170872f7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
20 deletions
+95
-20
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+1
-1
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+43
-0
Can_RX_User.h
Firmware/Source/Application/CAN_User/Can_RX_User.h
+1
-0
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+48
-18
Telltales_user.h
Firmware/Source/Component/Telltales/Telltales_user.h
+2
-1
No files found.
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
9ff4e1b6
...
...
@@ -677,7 +677,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
1000ul
,
0x22Ful
,
((
void
*
)
0
),
(
(
void
*
)
0
),
(
CAN_0x22F_Receive
),
((
void
*
)
0
),
},
{
...
...
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
9ff4e1b6
...
...
@@ -502,3 +502,46 @@ void CAN_0x16B_Receive(uint8_t CopyData [])
#endif
}
void
CAN_0x22F_Receive
(
uint8_t
CopyData
[])
{
#if (PART_NUMBER == G54_A01)
uint8_t
u8Signal
=
Get_CAN_CH0_ID_22F_Sig_EMS_WorkSts
();
if
((
u8Signal
==
2U
)
&&
(
g_WorkStatus
!=
2U
))
{
if
(
g_WorkCount
<
3U
)
{
g_WorkCount
++
;
}
}
else
if
((
u8Signal
==
3U
)
&&
(
g_WorkStatus
!=
3U
))
{
if
(
g_WorkCount
<
3U
)
{
g_WorkCount
++
;
}
}
else
if
((
u8Signal
==
4U
)
&&
(
g_WorkStatus
!=
4U
))
{
if
(
g_WorkCount
<
3U
)
{
g_WorkCount
++
;
}
}
else
if
((
u8Signal
!=
2U
)
&&
(
u8Signal
!=
3U
)
&&
(
u8Signal
!=
4U
)
&&
(
g_WorkStatus
!=
0U
))
{
if
(
g_WorkCount
<
3U
)
{
g_WorkCount
++
;
}
}
else
{
g_WorkCount
=
0U
;
}
#endif
}
Firmware/Source/Application/CAN_User/Can_RX_User.h
View file @
9ff4e1b6
...
...
@@ -43,5 +43,6 @@ extern void CAN_0x234_Receive(uint8_t CopyData []);
extern
void
CAN_0x38E_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x220_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x16B_Receive
(
uint8_t
CopyData
[]);
extern
void
CAN_0x22F_Receive
(
uint8_t
CopyData
[]);
#endif
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
9ff4e1b6
...
...
@@ -80,6 +80,8 @@ uint8_t g_ReadyStatus = 0U;
uint8_t
g_ReadyCount
=
0U
;
uint8_t
g_ChgModeStatus
=
0U
;
uint8_t
g_ChgModeCount
=
0U
;
uint8_t
g_WorkStatus
=
0U
;
uint8_t
g_WorkCount
=
0U
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
...
@@ -138,6 +140,8 @@ void Telltales_Init(void)
g_ReadyCount
=
0U
;
g_ChgModeStatus
=
0U
;
g_ChgModeCount
=
0U
;
g_WorkStatus
=
0U
;
g_WorkCount
=
0U
;
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
}
...
...
@@ -706,28 +710,54 @@ static void LED_External_Discharge_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Engine_Works_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
// }
// else
// {
// LED_STATE = 0;
// }
#if (PART_NUMBER == G54_A01)
if
((
g_WorkStatus
!=
2U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
2U
;
}
else
if
((
g_WorkStatus
!=
3U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
3U
;
}
else
if
((
g_WorkStatus
!=
4U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
4U
;
}
else
if
((
g_WorkStatus
!=
0U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
0U
;
}
if
((
g_WorkStatus
==
2U
)
||
(
g_WorkStatus
==
3U
)
||
(
g_WorkStatus
==
4U
))
{
LED_STATE
=
1U
;
}
else
{
LED_STATE
=
0U
;
}
#endif
return
LED_STATE
;
}
static
void
LED_Engine_Works_Execution
(
Tellib_uint16_t
led_status
)
{
if
(
led_status
==
1u
)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
#if (PART_NUMBER == G54_A01)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_16_Engine_Works_W
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_engine_Burn
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_16_Engine_Works_W
,
LED_OFF
);
SEG_SET_LED_STS
(
SEG_LED_engine_Burn
,
0
);
}
#endif
}
static
Tellib_uint16_t
LED_Bluetooth_Connection_Judgement
(
void
)
{
...
...
Firmware/Source/Component/Telltales/Telltales_user.h
View file @
9ff4e1b6
...
...
@@ -61,7 +61,8 @@ extern uint8_t g_ReadyStatus;
extern
uint8_t
g_ReadyCount
;
extern
uint8_t
g_ChgModeStatus
;
extern
uint8_t
g_ChgModeCount
;
extern
uint8_t
g_WorkStatus
;
extern
uint8_t
g_WorkCount
;
// extern Tellib_uint8_t Auto_Start_Stop ;
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