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
6dca2b61
Commit
6dca2b61
authored
Apr 16, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:累计工作时长增加前置0显示
parent
86d2380b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
36 deletions
+49
-36
BackLight_User.c
Firmware/Source/Application/BackLight/BackLight_User.c
+28
-15
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+21
-21
No files found.
Firmware/Source/Application/BackLight/BackLight_User.c
View file @
6dca2b61
...
@@ -183,31 +183,44 @@ void BackLight_Process(void)
...
@@ -183,31 +183,44 @@ void BackLight_Process(void)
void
BackLight_Clock_All_Process
(
void
)
void
BackLight_Clock_All_Process
(
void
)
{
{
if
(
openLED_flag
&&
(
Charge_OFF_Flag
==
0
))
#if (PART_NUMBER == RMR42E_60)
{
if
(
openLED_flag
&&
(
Charge_OFF_Flag
==
0
))
//总计时间
if
((
Get_Clock_All_lenth
()
==
2
)
||
(
checkself_seg_Flag
==
1
))
{
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计千位_MCU_OUT
//总计时间
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计百十位_MCU_OUT
if
((
Get_Clock_All_lenth
()
==
2
)
||
(
checkself_seg_Flag
==
1
))
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计百十位_MCU_OUT
}
else
if
(
Get_Clock_All_lenth
()
==
1
)
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计百十位_MCU_OUT
}
else
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计百十位_MCU_OUT
}
}
}
else
if
(
Get_Clock_All_lenth
()
==
1
)
else
{
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计百十位_MCU_OUT
}
#else
if
(
Get_CAN_Power_State
()
==
KEY_ACC
)
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计百十位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_HIGH
);
//总计工作时长统计百十位_MCU_OUT
}
}
else
else
{
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计百十位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计百十位_MCU_OUT
}
}
#endif
}
else
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN05
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计千位_MCU_OUT
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT01_PIN06
,
RTE_GPIO_LEVEL_LOW
);
//总计工作时长统计百十位_MCU_OUT
}
}
}
void
Interact_Light_Process
(
void
)
void
Interact_Light_Process
(
void
)
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
6dca2b61
...
@@ -2557,14 +2557,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2557,14 +2557,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
IC2_SEG077
=
IC_SEG_ON
;
IC2_SEG077
=
IC_SEG_ON
;
Num
=
m_NUM
/
10000u
;
Num
=
m_NUM
/
10000u
;
if
((
m_NUM
>
10000
)
||
(
checkself_seg_Flag
==
1
))
//
if ((m_NUM > 10000) || (checkself_seg_Flag == 1))
{
//
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
//
}
else
//
else
{
//
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
//
m8 = SEG_UNDISPLAY_NUMBER0[Num];
}
//
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
0
))
{
{
...
@@ -2624,14 +2624,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2624,14 +2624,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
}
}
/*千位*/
/*千位*/
Num
=
(
m_NUM
/
1000u
)
%
10u
;
Num
=
(
m_NUM
/
1000u
)
%
10u
;
if
((
m_NUM
>
1000
)
||
(
checkself_seg_Flag
==
1
))
//
if ((m_NUM > 1000) || (checkself_seg_Flag == 1))
{
//
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
//
}
else
//
else
{
//
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
//
m8 = SEG_UNDISPLAY_NUMBER0[Num];
}
//
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
0
))
{
{
...
@@ -2691,14 +2691,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
...
@@ -2691,14 +2691,14 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag, uint32_t m_NUM)
}
}
/*百位*/
/*百位*/
Num
=
(
m_NUM
/
100u
)
%
10u
;
Num
=
(
m_NUM
/
100u
)
%
10u
;
if
((
m_NUM
>
100
)
||
(
checkself_seg_Flag
==
1
))
//
if ((m_NUM > 100) || (checkself_seg_Flag == 1))
{
//
{
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
}
//
}
else
//
else
{
//
{
m8
=
SEG_UNDISPLAY_NUMBER0
[
Num
];
//
m8 = SEG_UNDISPLAY_NUMBER0[Num];
}
//
}
if
(
Bit_Is_Set
(
m8
,
0
))
if
(
Bit_Is_Set
(
m8
,
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