Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
IVECO_NS216
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
时昊
IVECO_NS216
Commits
d9f86f05
Commit
d9f86f05
authored
Feb 13, 2025
by
梁百峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:按照新标定表格修改亮度等级占空比,修改白天夜间模式初始化亮度占空比
parent
2737a7d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
16 deletions
+92
-16
DataProcess.c
source/Appliciation/DataProcess.c
+92
-16
No files found.
source/Appliciation/DataProcess.c
View file @
d9f86f05
...
...
@@ -1192,8 +1192,8 @@ void GUI_Sound_Init(void)
void
GUI_Light_Init
(
void
)
{
g_Light
.
Duty
=
4
50
;
g_nightLight
.
Duty
=
1
0
0
;
g_Light
.
Duty
=
7
50
;
g_nightLight
.
Duty
=
1
5
0
;
}
DataEnternightmode
nightmode
;
...
...
@@ -1227,7 +1227,7 @@ uint32_t Get_Enter_night_mode_sta(void)
void
GUI_nightLightWeakup_Init
(
void
)
{
g_nightLight
.
Duty
=
1
0
0
;
g_nightLight
.
Duty
=
1
5
0
;
}
void
Gui_LightProc
(
void
)
{
...
...
@@ -1242,49 +1242,66 @@ void Gui_LightProc(void)
if
(
DiagBackLight
==
0
)
{
PWM_Channel_Set_Duty
(
1
,
0
);
//表盘
PWM_Channel_Set_Duty
(
5
,
0
);
//3.5
PWM_Channel_Set_Duty
(
3
,
0
);
//指针
}
else
if
(
DiagBackLight
==
1
)
{
PWM_Channel_Set_Duty
(
1
,
150
);
//表盘
PWM_Channel_Set_Duty
(
3
,
150
);
//指针
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
PWM_Channel_Set_Duty
(
3
,
50
);
//指针
}
else
if
(
DiagBackLight
==
2
)
{
PWM_Channel_Set_Duty
(
1
,
200
);
//表盘
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
PWM_Channel_Set_Duty
(
1
,
250
);
//表盘
PWM_Channel_Set_Duty
(
5
,
250
);
//3.5
PWM_Channel_Set_Duty
(
3
,
175
);
//指针
}
else
if
(
DiagBackLight
==
3
)
{
PWM_Channel_Set_Duty
(
1
,
250
);
//表盘
PWM_Channel_Set_Duty
(
3
,
250
);
//指针
PWM_Channel_Set_Duty
(
1
,
350
);
//表盘
PWM_Channel_Set_Duty
(
5
,
350
);
//3.5
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
}
else
if
(
DiagBackLight
==
4
)
{
PWM_Channel_Set_Duty
(
1
,
300
);
//表盘
PWM_Channel_Set_Duty
(
3
,
300
);
//指针
PWM_Channel_Set_Duty
(
1
,
450
);
//表盘
PWM_Channel_Set_Duty
(
5
,
450
);
//3.5
PWM_Channel_Set_Duty
(
3
,
275
);
//指针
}
else
if
(
DiagBackLight
==
5
)
{
PWM_Channel_Set_Duty
(
1
,
350
);
//表盘
PWM_Channel_Set_Duty
(
1
,
550
);
//表盘
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
PWM_Channel_Set_Duty
(
3
,
350
);
//指针
}
else
if
(
DiagBackLight
==
6
)
{
PWM_Channel_Set_Duty
(
1
,
400
);
//表盘
PWM_Channel_Set_Duty
(
1
,
650
);
//表盘
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
PWM_Channel_Set_Duty
(
3
,
400
);
//指针
}
else
if
(
DiagBackLight
==
7
)
{
PWM_Channel_Set_Duty
(
1
,
450
);
//表盘
PWM_Channel_Set_Duty
(
1
,
750
);
//表盘
PWM_Channel_Set_Duty
(
5
,
750
);
//3.5
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
}
else
{
if
(
DiagBackLight
==
8
)
{
PWM_Channel_Set_Duty
(
1
,
500
);
//表盘
PWM_Channel_Set_Duty
(
1
,
850
);
//表盘
PWM_Channel_Set_Duty
(
5
,
850
);
//3.5
PWM_Channel_Set_Duty
(
3
,
500
);
//指针
}
}
}
...
...
@@ -1293,8 +1310,38 @@ void Gui_LightProc(void)
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_Enter_night_mode_sta
()
==
1
))
{
PWM_Channel_Set_Duty
(
1
,
g_nightLight
.
Duty
);
//表盘
PWM_Channel_Set_Duty
(
3
,
g_nightLight
.
Duty
);
//指针
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
switch
(
g_nightLight
.
Duty
)
{
case
150
:
PWM_Channel_Set_Duty
(
3
,
50
);
//指针
break
;
case
250
:
PWM_Channel_Set_Duty
(
3
,
175
);
//指针
break
;
case
350
:
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
break
;
case
450
:
PWM_Channel_Set_Duty
(
3
,
275
);
//指针
break
;
case
550
:
PWM_Channel_Set_Duty
(
3
,
350
);
//指针
break
;
case
650
:
PWM_Channel_Set_Duty
(
3
,
400
);
//指针
break
;
case
750
:
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
break
;
case
850
:
PWM_Channel_Set_Duty
(
3
,
500
);
//指针
break
;
default:
break
;
}
}
else
//close lamp
...
...
@@ -1303,7 +1350,36 @@ void Gui_LightProc(void)
// if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_SET_Backlight)
// {
PWM_Channel_Set_Duty
(
1
,
g_Light
.
Duty
);
//表盘
PWM_Channel_Set_Duty
(
3
,
g_Light
.
Duty
);
//指针
switch
(
g_Light
.
Duty
)
{
case
150
:
PWM_Channel_Set_Duty
(
3
,
50
);
//指针
break
;
case
250
:
PWM_Channel_Set_Duty
(
3
,
175
);
//指针
break
;
case
350
:
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
break
;
case
450
:
PWM_Channel_Set_Duty
(
3
,
275
);
//指针
break
;
case
550
:
PWM_Channel_Set_Duty
(
3
,
350
);
//指针
break
;
case
650
:
PWM_Channel_Set_Duty
(
3
,
400
);
//指针
break
;
case
750
:
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
break
;
case
850
:
PWM_Channel_Set_Duty
(
3
,
500
);
//指针
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