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
2d108d58
Commit
2d108d58
authored
Feb 27, 2025
by
高士达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lgh_from_dev' into 'dev'
Lgh from dev See merge request
!23
parents
c46b3612
2193e866
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
34 deletions
+124
-34
CommonInterface.c
...ware/Source/Application/CommonInterface/CommonInterface.c
+63
-26
System_Monitor_User.c
...are/Source/Component/System_Monitor/System_Monitor_User.c
+30
-8
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+31
-0
No files found.
Firmware/Source/Application/CommonInterface/CommonInterface.c
View file @
2d108d58
...
...
@@ -51,26 +51,67 @@ void Common_Set_IG_Sts_Valid(DataValid_t Val)
void
Common_Input_Para
(
void
)
{
if
(
SYS_OPR_STAT_IGN_ON
)
{
if
((
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
System_Indicator_CANFlag
!=
1
))
#if (PART_NUMBER == RMR42E_60)
if
(
SYS_OPR_STAT_IGN_ON
)
{
Common_Set_IG_Sts
(
COMMON_POWER_ON
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
if
((
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
System_Indicator_CANFlag
!=
1
))
{
Common_Set_IG_Sts
(
COMMON_POWER_ON
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
PowerIgnOffTimeLine
=
0ul
;
PowerIgnOffTimeLine
=
0ul
;
if
(
PowerIgnOnTimeLine
<
0x7ffffffful
&&
(
Get_CAN_Power_State
()
!=
PKEY_ON
))
if
(
PowerIgnOnTimeLine
<
0x7ffffffful
&&
(
Get_CAN_Power_State
()
!=
PKEY_ON
))
{
PowerIgnOnTimeLine
+=
2u
;
}
}
else
if
(
System_Indicator_CANFlag
==
1
)
{
PowerIgnOnTimeLine
+=
2u
;
Common_Set_IG_Sts
(
COMMON_POWER_ON
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
PowerIgnOffTimeLine
=
0ul
;
PowerIgnOnTimeLine
=
0ul
;
}
else
{
PowerIgnOnTimeLine
=
0ul
;
if
(
PowerIgnOffTimeLine
<
0x7ffffffful
)
{
PowerIgnOffTimeLine
+=
2u
;
}
Common_Set_IG_Sts
(
COMMON_POWER_OFF
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
}
if
((
Get_CAN_Power_State
()
==
PKEY_ON
)
||
(
Power_Stay_Flag
==
1
))
{
PowerIgnOnTimeLine
=
0ul
;
Power_Stay_Flag
=
0
;
}
}
else
{
PowerIgnOnTimeLine
=
0ul
;
if
(
PowerIgnOffTimeLine
<
0x7ffffffful
)
{
PowerIgnOffTimeLine
+=
2u
;
}
Common_Set_IG_Sts
(
COMMON_POWER_OFF
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
}
else
if
(
System_Indicator_CANFlag
==
1
)
#else
if
(
SYS_OPR_STAT_IGN_ON
)
{
Common_Set_IG_Sts
(
COMMON_POWER_ON
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
PowerIgnOffTimeLine
=
0ul
;
PowerIgnOnTimeLine
=
0ul
;
// g_PowerWakeupLineLow = 0UL;
if
(
PowerIgnOnTimeLine
<
0x7ffffffful
)
{
PowerIgnOnTimeLine
+=
2u
;
}
}
else
{
...
...
@@ -79,25 +120,21 @@ void Common_Input_Para(void)
{
PowerIgnOffTimeLine
+=
2u
;
}
// if ((RTE_GPIO_Get_Level(WAKEUP_KL15_IN) == 0U) && (g_PowerWakeupLineLow < 0x7ffffffful))
// {
// g_PowerWakeupLineLow += 2UL;
// }
// else if(RTE_GPIO_Get_Level(WAKEUP_KL15_IN) == 1U)
// {
// g_PowerWakeupLineLow = 0UL;
// }
Common_Set_IG_Sts
(
COMMON_POWER_OFF
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
}
if
((
Get_CAN_Power_State
()
==
PKEY_ON
)
||
(
Power_Stay_Flag
==
1
))
{
PowerIgnOnTimeLine
=
0ul
;
Power_Stay_Flag
=
0
;
}
}
else
{
PowerIgnOnTimeLine
=
0ul
;
if
(
PowerIgnOffTimeLine
<
0x7ffffffful
)
{
PowerIgnOffTimeLine
+=
2u
;
}
Common_Set_IG_Sts
(
COMMON_POWER_OFF
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
}
#endif
}
uint32_t
Common_GetIgnOnTime
(
void
)
...
...
Firmware/Source/Component/System_Monitor/System_Monitor_User.c
View file @
2d108d58
...
...
@@ -104,14 +104,36 @@ monitorlib_uint8_t Sys_Read_KL15_Valid(void)
monitorlib_uint8_t
System_LINE_KL15
(
void
)
{
static
monitorlib_uint8_t
u8KL15
=
0
;
if
((
Get_CAN_Num_MMCU_PowerMode
()
!=
0x0
)
||
(
System_Indicator_CANFlag
==
1
)
)
{
u8KL15
=
1u
;
}
else
{
u8KL15
=
0u
;
}
#if (PART_NUMBER == RMR42E_60)
if
((
Get_CAN_Num_MMCU_PowerMode
()
!=
0x0
)
||
(
System_Indicator_CANFlag
==
1
)
)
{
u8KL15
=
1u
;
}
else
{
u8KL15
=
0u
;
}
#else
if
((
Sys_Read_KL15_Voltage
()
>=
5500u
)
&&
(
Sys_Read_KL30_Voltage
()
>=
5500u
))
{
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x220_Msg
))
==
CAN_SIG_NORMAL
)
&&
(
Get_CAN_CH0_ID_220_Sig_VCU_KeySts
()
==
1U
))
{
u8KL15
=
1U
;
}
else
{
u8KL15
=
0U
;
}
}
else
{
u8KL15
=
0U
;
}
#endif
return
u8KL15
;
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
2d108d58
...
...
@@ -167,10 +167,12 @@ static Tellib_uint16_t LED_EFI_failure_Judgement(void)
if
((
g_EngineMalfunctionStatus
==
0U
)
&&
(
g_u8EmsFltLv3Count
>=
3U
))
{
g_EngineMalfunctionStatus
=
1U
;
g_u8EmsFltLv3Count
=
0U
;
}
else
if
((
g_EngineMalfunctionStatus
==
1U
)
&&
(
g_u8EmsFltLv3Count
>=
3U
))
{
g_EngineMalfunctionStatus
=
0U
;
g_u8EmsFltLv3Count
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_EngineMalfunctionStatus
;
...
...
@@ -248,10 +250,12 @@ static Tellib_uint16_t LED_Lead_Acid_Battery_Failure_Judgement(void)
if
((
g_VoltLowStatus
==
0U
)
&&
(
g_VoltLowCount
>=
3U
))
{
g_VoltLowStatus
=
1U
;
g_VoltLowCount
=
0U
;
}
else
if
((
g_VoltLowStatus
==
1U
)
&&
(
g_VoltLowCount
>=
3U
))
{
g_VoltLowStatus
=
0U
;
g_VoltLowCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_VoltLowStatus
;
...
...
@@ -280,10 +284,12 @@ static Tellib_uint16_t LED_Oil_Pressure_Judgement(void)
if
((
g_EngineOilLowStatus
==
0U
)
&&
(
g_EngineOilLowCount
>=
3U
))
{
g_EngineOilLowStatus
=
1U
;
g_EngineOilLowCount
=
0U
;
}
else
if
((
g_EngineOilLowStatus
==
1U
)
&&
(
g_EngineOilLowCount
>=
3U
))
{
g_EngineOilLowStatus
=
0U
;
g_EngineOilLowCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_EngineOilLowStatus
;
...
...
@@ -321,10 +327,12 @@ static Tellib_uint16_t LED_Grass_Full_Judgement(void)
if
((
g_GrassSwStatus
==
0U
)
&&
(
g_GrassSwCount
>=
3U
))
{
g_GrassSwStatus
=
1U
;
g_GrassSwCount
=
0U
;
}
else
if
((
g_GrassSwStatus
==
1U
)
&&
(
g_GrassSwCount
>=
3U
))
{
g_GrassSwStatus
=
0U
;
g_GrassSwCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_GrassSwStatus
;
...
...
@@ -366,10 +374,12 @@ static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
if
((
g_OverLoadStatus
[
i
]
==
0U
)
&&
(
g_OverLoadCount
[
i
]
>=
3U
))
{
g_OverLoadStatus
[
i
]
=
1U
;
g_OverLoadCount
[
i
]
=
0U
;
}
else
if
((
g_OverLoadStatus
[
i
]
==
1U
)
&&
(
g_OverLoadCount
[
i
]
>=
3U
))
{
g_OverLoadStatus
[
i
]
=
0U
;
g_OverLoadCount
[
i
]
=
0U
;
}
}
...
...
@@ -417,10 +427,12 @@ static Tellib_uint16_t LED_READY_Judgement(void)
if
((
g_ReadyStatus
==
0U
)
&&
(
g_ReadyCount
>=
3U
))
{
g_ReadyStatus
=
1U
;
g_ReadyCount
=
0U
;
}
else
if
((
g_ReadyStatus
==
1U
)
&&
(
g_ReadyCount
>=
3U
))
{
g_ReadyStatus
=
0U
;
g_ReadyCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_ReadyStatus
;
...
...
@@ -458,10 +470,12 @@ static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
if
((
g_SeatStatus
==
0U
)
&&
(
g_SeatCount
>=
3U
))
{
g_SeatStatus
=
1U
;
g_SeatCount
=
0U
;
}
else
if
((
g_SeatStatus
==
1U
)
&&
(
g_SeatCount
>=
3U
))
{
g_SeatStatus
=
0U
;
g_SeatCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_SeatStatus
;
...
...
@@ -509,10 +523,12 @@ static Tellib_uint16_t LED_Key_Access_Judgement(void)
if
((
g_KeyStatus
==
0U
)
&&
(
g_KeyCount
>=
3U
))
{
g_KeyStatus
=
1U
;
g_KeyCount
=
0U
;
}
else
if
((
g_KeyStatus
==
1U
)
&&
(
g_KeyCount
>=
3U
))
{
g_KeyStatus
=
0U
;
g_KeyCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_KeyStatus
;
...
...
@@ -567,14 +583,17 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
if
((
g_ChgModeStatus
!=
1U
)
&&
(
g_ChgModeCount
>=
3U
))
{
g_ChgModeStatus
=
1U
;
g_ChgModeCount
=
0U
;
}
else
if
((
g_ChgModeStatus
!=
2U
)
&&
(
g_ChgModeCount
>=
3U
))
{
g_ChgModeStatus
=
2U
;
g_ChgModeCount
=
0U
;
}
else
if
((
g_ChgModeStatus
!=
0U
)
&&
(
g_ChgModeCount
>=
3U
))
{
g_ChgModeStatus
=
0U
;
g_ChgModeCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_ChgModeStatus
;
...
...
@@ -661,10 +680,12 @@ static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
if
((
g_PtoSwStatus
==
0U
)
&&
(
g_PtoSwCount
>=
3U
))
{
g_PtoSwStatus
=
1U
;
g_PtoSwCount
=
0U
;
}
else
if
((
g_PtoSwStatus
==
1U
)
&&
(
g_PtoSwCount
>=
3U
))
{
g_PtoSwStatus
=
0U
;
g_PtoSwCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_PtoSwStatus
;
...
...
@@ -744,18 +765,22 @@ static Tellib_uint16_t LED_Engine_Works_Judgement(void)
if
((
g_WorkStatus
!=
2U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
2U
;
g_WorkCount
=
0U
;
}
else
if
((
g_WorkStatus
!=
3U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
3U
;
g_WorkCount
=
0U
;
}
else
if
((
g_WorkStatus
!=
4U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
4U
;
g_WorkCount
=
0U
;
}
else
if
((
g_WorkStatus
!=
0U
)
&&
(
g_WorkCount
>=
3U
))
{
g_WorkStatus
=
0U
;
g_WorkCount
=
0U
;
}
if
((
g_WorkStatus
==
2U
)
||
(
g_WorkStatus
==
3U
)
||
(
g_WorkStatus
==
4U
))
...
...
@@ -1033,10 +1058,12 @@ static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
if
((
g_SysFltLampStatus
==
0U
)
&&
(
g_SysFltLampCount
>=
3U
))
{
g_SysFltLampStatus
=
1U
;
g_SysFltLampCount
=
0U
;
}
else
if
((
g_SysFltLampStatus
==
1U
)
&&
(
g_SysFltLampCount
>=
3U
))
{
g_SysFltLampStatus
=
0U
;
g_SysFltLampCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_SysFltLampStatus
;
...
...
@@ -1149,10 +1176,12 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
if
((
g_TOTALSigChargeStatus
==
0U
)
&&
(
g_TOTALSigChargeCount
>=
3U
))
{
g_TOTALSigChargeStatus
=
1U
;
g_TOTALSigChargeCount
=
0U
;
}
else
if
((
g_TOTALSigChargeStatus
==
1U
)
&&
(
g_TOTALSigChargeCount
>=
3U
))
{
g_TOTALSigChargeStatus
=
0U
;
g_TOTALSigChargeCount
=
0U
;
}
LED_STATE
=
(
Tellib_uint16_t
)
g_TOTALSigChargeStatus
;
...
...
@@ -1190,10 +1219,12 @@ static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
if
((
g_BmsFltStatus
[
i
]
==
0U
)
&&
(
g_BmsFltCount
[
i
]
>=
3U
))
{
g_BmsFltStatus
[
i
]
=
1U
;
g_BmsFltCount
[
i
]
=
0U
;
}
else
if
((
g_BmsFltStatus
[
i
]
==
1U
)
&&
(
g_BmsFltCount
[
i
]
>=
3U
))
{
g_BmsFltStatus
[
i
]
=
0U
;
g_BmsFltCount
[
i
]
=
0U
;
}
}
...
...
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