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
86d2380b
Commit
86d2380b
authored
Apr 16, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改充电状态电量条效果,从流水特效改为最后一格闪烁
parent
98f7f951
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
199 additions
and
11 deletions
+199
-11
Data_Soc.c
Firmware/Source/Application/Data_Soc/Data_Soc.c
+45
-9
Data_Soc.h
Firmware/Source/Application/Data_Soc/Data_Soc.h
+1
-0
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+153
-2
No files found.
Firmware/Source/Application/Data_Soc/Data_Soc.c
View file @
86d2380b
...
...
@@ -6,6 +6,7 @@ SocStruct_st_t Soc;
uint8_t
SOC_Count_Time
=
0
;
uint8_t
g_Msg0x17AFlag
=
0U
;
uint16_t
SocPoweroffTime
=
0
;
uint8_t
g_SOCChargingState
=
0U
;
static
void
Data_Soc_Battery_Level_Service
(
void
);
static
void
Data_Soc_DisplayEffect_Service
(
void
);
...
...
@@ -28,6 +29,7 @@ void Data_Soc_KL30_Init(void)
Soc
.
AllSocValid
=
0U
;
SocPoweroffTime
=
0U
;
g_Msg0x17AFlag
=
0U
;
g_SOCChargingState
=
0U
;
}
void
Data_Soc_KL15_Init
(
void
)
...
...
@@ -356,15 +358,34 @@ static void Data_Soc_DisplayEffect_Service(void)
if
(
VCUChgMode
==
1U
)
{
if
(
++
SOC_Count_Time
>
10U
)
{
SOC_Count_Time
=
0U
;
Soc
.
Dis_Seg1
++
;
if
(
Soc
.
Dis_Seg1
>
Soc
.
Act_Seg1
)
{
Soc
.
Dis_Seg1
=
0U
;
}
}
/*----------电量条充电流水效果(功能删除)----------------*/
// if (++SOC_Count_Time > 10U)
// {
// SOC_Count_Time = 0U;
// Soc.Dis_Seg1 ++;
// if (Soc.Dis_Seg1 > Soc.Act_Seg1)
// {
// Soc.Dis_Seg1 = 0U;
// }
// }
// if (Get_CAN_Power_State() == PKEY_ON)
// {
// if (SocPoweroffTime >= 3600U)
// {
// Soc.Valid1 = 0U;
// }
// else
// {
// SocPoweroffTime ++;
// }
// }
// else if(Get_CAN_Power_State() == KEY_OFF)
// {
// Soc.Valid1 = 0U;
// }
/*------------------------------------------------------*/
Soc
.
Dis_Seg1
=
Soc
.
Act_Seg1
;
g_SOCChargingState
=
1U
;
if
(
Get_CAN_Power_State
()
==
PKEY_ON
)
{
if
(
SocPoweroffTime
>=
3600U
)
...
...
@@ -380,9 +401,11 @@ static void Data_Soc_DisplayEffect_Service(void)
{
Soc
.
Valid1
=
0U
;
}
}
else
{
g_SOCChargingState
=
0U
;
if
(
Get_CAN_Power_State
()
==
KEY_ACC
)
{
Soc
.
Dis_Seg1
=
Soc
.
Act_Seg1
;
...
...
@@ -692,3 +715,16 @@ uint8_t Get_EleDial_AllSOC_lenth(void)
}
return
num
;
}
/******************************************************************************
函数名:Get_SOC_Charging_State
功 能:获取充电状态状态函数
参 数:无
返回值:_SOCChargingState 0--非充电,1--充电
******************************************************************************
注 意:该函数必须每 ms被调用一次
******************************************************************************/
uint8_t
Get_SOC_Charging_State
(
void
)
{
return
g_SOCChargingState
;
}
Firmware/Source/Application/Data_Soc/Data_Soc.h
View file @
86d2380b
...
...
@@ -52,6 +52,7 @@ extern uint8_t Get_Soc2_Battery_Icon(void);
extern
uint8_t
Get_AllSocValue
(
void
);
extern
uint8_t
Get_AllSocValid
(
void
);
extern
uint8_t
Get_EleDial_AllSOC_lenth
(
void
);
extern
uint8_t
Get_SOC_Charging_State
(
void
);
#endif
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
86d2380b
...
...
@@ -703,7 +703,7 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG)
#if (PART_NUMBER == RMR42E_60)
if
((
m_SEG
==
1
)
&&
(
Common_GetIgnOnTime
()
>=
1500
)
&&
(
SOC_charge_seg_Flag
!=
1
))
#else
if
((
m_SEG
==
1
)
&&
(
Common_GetIgnOnTime
()
>=
1500
)
&&
(
SOC_charge_seg_Flag
!=
1
)
&&
(
Get_CAN_CH0_ID_220_Sig_VCU_ChgMod
e
()
!=
1U
))
if
((
m_SEG
==
1
)
&&
(
Common_GetIgnOnTime
()
>=
1500
)
&&
(
Get_SOC_Charging_Stat
e
()
!=
1U
))
#endif
{
if
(
FLASH_SYNC_1Hz
)
...
...
@@ -717,7 +717,7 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG)
}
else
{
switch
(
m_SEG
)
switch
(
m_SEG
-
1U
)
{
case
10u
:
...
...
@@ -745,6 +745,157 @@ _Fun_Res SEG_SET_EleDial_1SOC(uint8_t m_Flag, uint8_t m_SEG)
default:
break
;
}
if
(
Get_SOC_Charging_State
()
==
1U
)
{
switch
(
m_SEG
)
{
case
10u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG136
=
IC_SEG_ON
;
}
else
{
IC1_SEG136
=
IC_SEG_GREY
;
}
break
;
case
9u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG137
=
IC_SEG_ON
;
}
else
{
IC1_SEG137
=
IC_SEG_GREY
;
}
break
;
case
8u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG138
=
IC_SEG_ON
;
}
else
{
IC1_SEG138
=
IC_SEG_GREY
;
}
break
;
case
7u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG143
=
IC_SEG_ON
;
}
else
{
IC1_SEG143
=
IC_SEG_GREY
;
}
break
;
case
6u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG144
=
IC_SEG_ON
;
}
else
{
IC1_SEG144
=
IC_SEG_GREY
;
}
break
;
case
5u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG145
=
IC_SEG_ON
;
}
else
{
IC1_SEG145
=
IC_SEG_GREY
;
}
break
;
case
4u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG146
=
IC_SEG_ON
;
}
else
{
IC1_SEG146
=
IC_SEG_GREY
;
}
break
;
case
3u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG147
=
IC_SEG_ON
;
}
else
{
IC1_SEG147
=
IC_SEG_GREY
;
}
break
;
case
2u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG148
=
IC_SEG_ON
;
}
else
{
IC1_SEG148
=
IC_SEG_GREY
;
}
break
;
case
1u
:
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG135
=
IC_SEG_ON
;
}
else
{
IC1_SEG135
=
IC_SEG_GREY
;
}
break
;
case
0u
:
break
;
default:
break
;
}
}
else
{
switch
(
m_SEG
)
{
case
10u
:
IC1_SEG136
=
IC_SEG_ON
;
break
;
case
9u
:
IC1_SEG137
=
IC_SEG_ON
;
break
;
case
8u
:
IC1_SEG138
=
IC_SEG_ON
;
break
;
case
7u
:
IC1_SEG143
=
IC_SEG_ON
;
break
;
case
6u
:
IC1_SEG144
=
IC_SEG_ON
;
break
;
case
5u
:
IC1_SEG145
=
IC_SEG_ON
;
break
;
case
4u
:
IC1_SEG146
=
IC_SEG_ON
;
break
;
case
3u
:
IC1_SEG147
=
IC_SEG_ON
;
break
;
case
2u
:
IC1_SEG148
=
IC_SEG_ON
;
break
;
case
1u
:
IC1_SEG135
=
IC_SEG_ON
;
break
;
case
0u
:
break
;
default:
break
;
}
}
}
}
else
...
...
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