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
9668a503
Commit
9668a503
authored
Jul 17, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:累计时间更改计数最大值
parent
4a812f7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
17 deletions
+42
-17
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+42
-17
No files found.
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
9668a503
...
...
@@ -266,7 +266,8 @@ uint8_t Get_Clockonetime_lenth(void)
uint32_t
u32Data_read
[
1
]
=
{
0
};
uint32_t
CumulativeWorkHours_Writeback
=
0
;
uint8_t
CumulativeWorkHours_readDiffer
=
0
;
uint32_t
CumulativeWorkHours_readDiffer
=
0
;
uint8_t
CumulativeWorkHours_MAX_flag
=
0
;
void
Data_CumulativeWorkHours_EEPROM_Write
(
void
)
{
uint32_t
CurrentData
=
0
;
...
...
@@ -274,6 +275,8 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
if
(
DISPLAY_OPEN
)
{
CurrentData
=
Get_CAN_Num_MMCU_AccumulatedWorkHours
();
if
(
CumulativeWorkHours_MAX_flag
==
0
)
{
if
(
CurrentData
>
CumulativeWorkHours_Writeback
)
{
CumulativeWorkHours_readDiffer
=
CurrentData
-
CumulativeWorkHours_Writeback
;
...
...
@@ -291,12 +294,34 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
CumulativeWorkHours_Writeback
=
CurrentData
;
}
}
else
if
(
CumulativeWorkHours_Writeback
!=
0
)
{
if
(
CurrentData
<
CumulativeWorkHours_Writeback
)
{
CumulativeWorkHours_readDiffer
=
CumulativeWorkHours_Writeback
-
CurrentData
;
eeprom_ReadRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
u32Data_read
,
4
);
u32Data
[
0
]
=
u32Data_read
[
0
]
-
CumulativeWorkHours_readDiffer
;
eeprom_WriteRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
u32Data
,
4
);
CumulativeWorkHours_Writeback
=
CurrentData
;
}
}
}
}
void
Gauge_Clock_All_Display
(
void
)
{
uint32_t
u32Data
[
1
]
=
{
0
};
eeprom_ReadRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
u32Data_read
,
4
);
if
(
u32Data_read
[
0
]
>
99999
)
{
u32Data
[
0
]
=
99999
;
eeprom_WriteRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
u32Data
,
4
);
CumulativeWorkHours_MAX_flag
=
1
;
}
else
{
CumulativeWorkHours_MAX_flag
=
0
;
}
if
(
DISPLAY_OPEN
)
{
SEG_SET_Clock_ALL
(
1
,
u32Data_read
[
0
]);
...
...
@@ -360,7 +385,7 @@ void Gauge_Service(void)
else
{
checkself_seg_Flag
=
1
;
if
(
Get_CAN_Power_State
()
==
KEY_ACC
)
if
(
Get_CAN_Power_State
()
==
KEY_ACC
)
{
interact_PWM_Low_Duty
=
0
;
}
...
...
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