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
c85b23cc
Commit
c85b23cc
authored
Jun 04, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加清E方中数据功能
parent
a8dcc61c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
51 deletions
+60
-51
Data_Time.c
Firmware/Source/Application/Driving_Information/Data_Time.c
+57
-0
Data_Time.h
Firmware/Source/Application/Driving_Information/Data_Time.h
+2
-0
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+1
-49
GUI_Display.h
Firmware/Source/Application/GUI_Display/GUI_Display.h
+0
-2
No files found.
Firmware/Source/Application/Driving_Information/Data_Time.c
View file @
c85b23cc
...
...
@@ -18,6 +18,7 @@ void Data_Time_KL30_Init(void)
u16EngineTimeCount
=
0U
;
g_u8ID339flag
=
0U
;
g_u8SixHoursCompensationFlag
=
1U
;
g_u8TYWClearEepromFlag
=
0U
;
}
void
Data_Time_KL15_Init
(
void
)
...
...
@@ -28,6 +29,7 @@ void Data_Time_KL15_Init(void)
u16EngineTimeCount
=
0U
;
g_u8ID339flag
=
0U
;
g_u8SixHoursCompensationFlag
=
1U
;
g_u8TYWClearEepromFlag
=
0U
;
#if (PART_NUMBER == G54_A01)
for
(
uint8_t
i
=
0U
;
i
<
3U
;
i
++
)
{
...
...
@@ -215,6 +217,61 @@ void Single_Working_Hours_Count(void)
#endif
}
void
TYW_Clear_Eeprom_Service
(
void
)
{
#if (PART_NUMBER == RMR42E_60)
uint8_t
u8MBMS_StatBattChargeState
=
0
;
uint8_t
u8MBMS_StatBattWorkState
=
0
;
uint8_t
u8BMCU_BladeSpeedGear
=
0
;
uint16_t
u16MMCU_AccumulatedWorkHours
=
0
;
if
(
Get_CAN_Power_State
()
==
READY
)
{
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x18203220_Msg
))
==
CAN_SIG_NORMAL
)
&&
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x157_Msg
))
==
CAN_SIG_NORMAL
)
&&
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x339_Msg
))
==
CAN_SIG_NORMAL
))
{
u8MBMS_StatBattChargeState
=
Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattChargeState
();
u8MBMS_StatBattWorkState
=
Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState
();
u16MMCU_AccumulatedWorkHours
=
Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours
();
u8BMCU_BladeSpeedGear
=
Get_CAN_CH0_ID_157_Sig_BMCU_BladeSpeedGear
();
if
((
u8MBMS_StatBattChargeState
==
0x7U
)
&&
(
u8MBMS_StatBattWorkState
==
0xfU
)
&&
(
u8BMCU_BladeSpeedGear
==
0x7U
)
&&
(
u16MMCU_AccumulatedWorkHours
>=
60000UL
))
{
g_u8TYWClearEepromFlag
=
1
;
}
else
{
g_u8TYWClearEepromFlag
=
0
;
}
}
else
{
g_u8TYWClearEepromFlag
=
0
;
}
}
else
{
g_u8TYWClearEepromFlag
=
0
;
}
#else
if
((
Get_CAN_CH0_ID_161_Sig_MBMS_FaultNum
()
==
0xFEDCU
)
&&
(
Get_CAN_CH0_ID_38E_Sig_BMCU_FaultCode
()
==
0xABCDU
)
&&
(
Get_CAN_CH0_ID_234_Sig_EMS_FaultCode
()
==
0xBCDEU
)
&&
(
Get_CAN_CH0_ID_22A_Sig_GCU_FaultCode
()
==
0x8888U
))
{
g_u8TYWClearEepromFlag
=
1
;
}
#endif
}
void
TYW_RESET_TIME
(
void
)
{
uint32_t
Clear_EE
[
1
]
=
{
0
};
if
(
g_u8TYWClearEepromFlag
==
1
)
{
g_u8TYWClearEepromFlag
=
2
;
Clear_EE
[
0
]
=
0
;
eeprom_WriteRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
}
}
/******************************************************************************
函数名:Get_SingleHour_Display
功 能:获取单次工作时长小时数函数
...
...
Firmware/Source/Application/Driving_Information/Data_Time.h
View file @
c85b23cc
...
...
@@ -32,5 +32,7 @@ extern uint8_t Get_Single_Working_Hours_Status(void);
extern
uint32_t
Get_Total_Working_Hours
(
void
);
extern
uint8_t
Get_Clock_All_lenth
(
void
);
extern
void
TYW_Clear_Eeprom_Service
(
void
);
extern
void
TYW_RESET_TIME
(
void
);
#endif
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
c85b23cc
...
...
@@ -8,44 +8,6 @@ uint8_t Charge_OFF_Flag = 0;
void
Clear_Bu98_Conditions
(
DoNot_Close_Seg_en_t
closeType
);
void
TYW_Clear_Eeprom_Service
(
void
)
{
#if (PART_NUMBER == RMR42E_60)
uint8_t
u8MBMS_StatBattChargeState
=
0
;
uint8_t
u8MBMS_StatBattWorkState
=
0
;
uint8_t
u8BMCU_BladeSpeedGear
=
0
;
uint16_t
u16MMCU_AccumulatedWorkHours
=
0
;
if
(
Get_CAN_Power_State
()
==
READY
)
{
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x18203220_Msg
))
==
CAN_SIG_NORMAL
)
&&
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x157_Msg
))
==
CAN_SIG_NORMAL
)
&&
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x339_Msg
))
==
CAN_SIG_NORMAL
))
{
u8MBMS_StatBattChargeState
=
Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattChargeState
();
u8MBMS_StatBattWorkState
=
Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState
();
u16MMCU_AccumulatedWorkHours
=
Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours
();
u8BMCU_BladeSpeedGear
=
Get_CAN_CH0_ID_157_Sig_BMCU_BladeSpeedGear
();
if
((
u8MBMS_StatBattChargeState
==
0x7U
)
&&
(
u8MBMS_StatBattWorkState
==
0xfU
)
&&
(
u8BMCU_BladeSpeedGear
==
0x7U
)
&&
(
u16MMCU_AccumulatedWorkHours
>=
60000UL
))
{
g_u8TYWClearEepromFlag
=
1
;
}
else
{
g_u8TYWClearEepromFlag
=
0
;
}
}
else
{
g_u8TYWClearEepromFlag
=
0
;
}
}
else
{
g_u8TYWClearEepromFlag
=
0
;
}
#else
#endif
}
void
Gauge_Power_SOC_pull_Display
(
void
)
{
uint8_t
u8Soc1Seg
=
Get_CAN_Num_MBMS_Soc_1_Grid
();
...
...
@@ -275,6 +237,7 @@ void Gauge_Service(void)
if
(
g_u8TYWClearEepromFlag
>=
1
)
{
TYW_RESET_TIME
();
Check_SEG_Display
();
}
else
{
...
...
@@ -442,14 +405,3 @@ void Checkself_LED_Display(void)
}
void
TYW_RESET_TIME
(
void
)
{
uint32_t
Clear_EE
[
1
]
=
{
0
};
if
(
g_u8TYWClearEepromFlag
==
1
)
{
g_u8TYWClearEepromFlag
=
2
;
Clear_EE
[
0
]
=
0
;
eeprom_WriteRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
}
Check_SEG_Display
();
}
Firmware/Source/Application/GUI_Display/GUI_Display.h
View file @
c85b23cc
...
...
@@ -66,6 +66,4 @@ void Checkself_LED_Display(void);
uint8_t
Get_Clock_All_lenth
(
void
);
uint8_t
Get_CAN_Num_SBMS_Soc_2_Grid
(
void
);
uint8_t
Get_CAN_Num_MBMS_Soc_1_Grid
(
void
);
void
TYW_Clear_Eeprom_Service
(
void
);
void
TYW_RESET_TIME
(
void
);
#endif
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