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
bd4944b9
Commit
bd4944b9
authored
Mar 18, 2025
by
高士达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'liang_buf' into '依维柯216变更后'
✨
feat:修改亮度占空比,亮度百分比外发 See merge request
!38
parents
ecedbcc0
88100195
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
240 additions
and
114 deletions
+240
-114
CAN_APP.c
source/Appliciation/CAN_App/CAN_APP.c
+16
-16
DataProcess.c
source/Appliciation/DataProcess.c
+224
-98
No files found.
source/Appliciation/CAN_App/CAN_APP.c
View file @
bd4944b9
...
...
@@ -539,35 +539,35 @@ void Can_Set_Buff_18D00017(canlib_uint8_t CopyData [])
{
if
(
g_nightLight
.
Duty
==
150
)
{
IC_ILLUMINATION
=
15
;
IC_ILLUMINATION
=
20
;
}
else
if
(
g_nightLight
.
Duty
==
250
)
{
IC_ILLUMINATION
=
2
5
;
IC_ILLUMINATION
=
3
5
;
}
else
if
(
g_nightLight
.
Duty
==
350
)
{
IC_ILLUMINATION
=
3
5
;
IC_ILLUMINATION
=
4
5
;
}
else
if
(
g_nightLight
.
Duty
==
450
)
{
IC_ILLUMINATION
=
4
5
;
IC_ILLUMINATION
=
5
5
;
}
else
if
(
g_nightLight
.
Duty
==
550
)
{
IC_ILLUMINATION
=
5
5
;
IC_ILLUMINATION
=
6
5
;
}
else
if
(
g_nightLight
.
Duty
==
650
)
{
IC_ILLUMINATION
=
6
5
;
IC_ILLUMINATION
=
8
5
;
}
else
if
(
g_nightLight
.
Duty
==
750
)
{
IC_ILLUMINATION
=
75
;
IC_ILLUMINATION
=
90
;
}
else
if
(
g_nightLight
.
Duty
==
850
)
{
IC_ILLUMINATION
=
85
;
IC_ILLUMINATION
=
100
;
}
else
{
...
...
@@ -578,35 +578,35 @@ void Can_Set_Buff_18D00017(canlib_uint8_t CopyData [])
{
if
(
g_Light
.
Duty
==
150
)
{
IC_ILLUMINATION
=
15
;
IC_ILLUMINATION
=
20
;
}
else
if
(
g_Light
.
Duty
==
250
)
{
IC_ILLUMINATION
=
2
5
;
IC_ILLUMINATION
=
3
5
;
}
else
if
(
g_Light
.
Duty
==
350
)
{
IC_ILLUMINATION
=
3
5
;
IC_ILLUMINATION
=
4
5
;
}
else
if
(
g_Light
.
Duty
==
450
)
{
IC_ILLUMINATION
=
4
5
;
IC_ILLUMINATION
=
5
5
;
}
else
if
(
g_Light
.
Duty
==
550
)
{
IC_ILLUMINATION
=
5
5
;
IC_ILLUMINATION
=
6
5
;
}
else
if
(
g_Light
.
Duty
==
650
)
{
IC_ILLUMINATION
=
6
5
;
IC_ILLUMINATION
=
8
5
;
}
else
if
(
g_Light
.
Duty
==
750
)
{
IC_ILLUMINATION
=
75
;
IC_ILLUMINATION
=
90
;
}
else
if
(
g_Light
.
Duty
==
850
)
{
IC_ILLUMINATION
=
85
;
IC_ILLUMINATION
=
100
;
}
else
{
...
...
source/Appliciation/DataProcess.c
View file @
bd4944b9
...
...
@@ -1247,61 +1247,53 @@ void Gui_LightProc(void)
}
else
if
(
DiagBackLight
==
1
)
{
PWM_Channel_Set_Duty
(
1
,
150
);
//表盘
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
PWM_Channel_Set_Duty
(
1
,
200
);
//表盘
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
PWM_Channel_Set_Duty
(
3
,
50
);
//指针
}
else
if
(
DiagBackLight
==
2
)
{
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
,
350
);
//表盘
PWM_Channel_Set_Duty
(
5
,
350
);
//3.5
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
PWM_Channel_Set_Duty
(
3
,
300
);
//指针
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
}
else
if
(
DiagBackLight
==
4
)
else
if
(
DiagBackLight
==
3
)
{
PWM_Channel_Set_Duty
(
1
,
450
);
//表盘
PWM_Channel_Set_Duty
(
5
,
450
);
//3.5
PWM_Channel_Set_Duty
(
3
,
275
);
//指针
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
}
else
if
(
DiagBackLight
==
5
)
else
if
(
DiagBackLight
==
4
)
{
PWM_Channel_Set_Duty
(
1
,
550
);
//表盘
PWM_Channel_Set_Duty
(
3
,
550
);
//指针
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
PWM_Channel_Set_Duty
(
3
,
350
);
//指针
}
else
if
(
DiagBackLight
==
6
)
else
if
(
DiagBackLight
==
5
)
{
PWM_Channel_Set_Duty
(
1
,
650
);
//表盘
PWM_Channel_Set_Duty
(
3
,
650
);
//指针
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
PWM_Channel_Set_Duty
(
3
,
400
);
//指针
}
else
if
(
DiagBackLight
==
6
)
{
PWM_Channel_Set_Duty
(
1
,
850
);
//表盘
PWM_Channel_Set_Duty
(
3
,
850
);
//指针
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
}
else
if
(
DiagBackLight
==
7
)
{
PWM_Channel_Set_Duty
(
1
,
750
);
//表盘
PWM_Channel_Set_Duty
(
5
,
750
);
//3.5
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
PWM_Channel_Set_Duty
(
1
,
900
);
//表盘
PWM_Channel_Set_Duty
(
3
,
900
);
//指针
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
}
else
{
if
(
DiagBackLight
==
8
)
{
PWM_Channel_Set_Duty
(
1
,
850
);
//表盘
PWM_Channel_Set_Duty
(
5
,
850
);
//3.5
PWM_Channel_Set_Duty
(
3
,
500
);
//指针
PWM_Channel_Set_Duty
(
1
,
1000
);
//表盘
PWM_Channel_Set_Duty
(
3
,
1000
);
//指针
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
}
}
}
...
...
@@ -1309,77 +1301,100 @@ 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
(
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
;
case
150
:
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
PWM_Channel_Set_Duty
(
1
,
200
);
//表盘
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
break
;
case
250
:
PWM_Channel_Set_Duty
(
1
,
350
);
//表盘
PWM_Channel_Set_Duty
(
3
,
300
);
//指针
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
break
;
case
350
:
PWM_Channel_Set_Duty
(
1
,
450
);
//表盘
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
break
;
case
450
:
PWM_Channel_Set_Duty
(
1
,
550
);
//表盘
PWM_Channel_Set_Duty
(
3
,
550
);
//指针
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
break
;
case
550
:
PWM_Channel_Set_Duty
(
1
,
650
);
//表盘
PWM_Channel_Set_Duty
(
3
,
650
);
//指针
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
break
;
case
650
:
PWM_Channel_Set_Duty
(
1
,
850
);
//表盘
PWM_Channel_Set_Duty
(
3
,
850
);
//指针
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
break
;
case
750
:
PWM_Channel_Set_Duty
(
1
,
900
);
//表盘
PWM_Channel_Set_Duty
(
3
,
900
);
//指针
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
break
;
case
850
:
PWM_Channel_Set_Duty
(
1
,
1000
);
//表盘
PWM_Channel_Set_Duty
(
3
,
1000
);
//指针
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
break
;
default:
break
;
}
}
else
//close lamp
{
PWM_Channel_Set_Duty
(
5
,
g_Light
.
Duty
);
//3.5
// if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_SET_Backlight)
// {
PWM_Channel_Set_Duty
(
1
,
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
;
case
150
:
PWM_Channel_Set_Duty
(
3
,
200
);
//指针
PWM_Channel_Set_Duty
(
1
,
200
);
//表盘
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
break
;
case
250
:
PWM_Channel_Set_Duty
(
1
,
350
);
//表盘
PWM_Channel_Set_Duty
(
3
,
300
);
//指针
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
break
;
case
350
:
PWM_Channel_Set_Duty
(
1
,
450
);
//表盘
PWM_Channel_Set_Duty
(
3
,
450
);
//指针
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
break
;
case
450
:
PWM_Channel_Set_Duty
(
1
,
550
);
//表盘
PWM_Channel_Set_Duty
(
3
,
550
);
//指针
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
break
;
case
550
:
PWM_Channel_Set_Duty
(
1
,
650
);
//表盘
PWM_Channel_Set_Duty
(
3
,
650
);
//指针
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
break
;
case
650
:
PWM_Channel_Set_Duty
(
1
,
850
);
//表盘
PWM_Channel_Set_Duty
(
3
,
850
);
//指针
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
break
;
case
750
:
PWM_Channel_Set_Duty
(
1
,
900
);
//表盘
PWM_Channel_Set_Duty
(
3
,
900
);
//指针
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
break
;
case
850
:
PWM_Channel_Set_Duty
(
1
,
1000
);
//表盘
PWM_Channel_Set_Duty
(
3
,
1000
);
//指针
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
break
;
default:
break
;
}
// }
// else
// {
...
...
@@ -1395,13 +1410,69 @@ void Gui_LightProc(void)
{
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_Enter_night_mode_sta
()
==
1
))
{
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
switch
(
g_nightLight
.
Duty
)
{
case
150
:
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
break
;
case
250
:
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
break
;
case
350
:
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
break
;
case
450
:
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
break
;
case
550
:
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
break
;
case
650
:
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
break
;
case
750
:
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
break
;
case
850
:
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
break
;
default:
break
;
}
}
else
{
PWM_Channel_Set_Duty
(
5
,
g_Light
.
Duty
);
//3.5
switch
(
g_Light
.
Duty
)
{
case
150
:
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
break
;
case
250
:
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
break
;
case
350
:
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
break
;
case
450
:
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
break
;
case
550
:
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
break
;
case
650
:
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
break
;
case
750
:
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
break
;
case
850
:
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
break
;
default:
break
;
}
}
}
else
{
...
...
@@ -1413,13 +1484,68 @@ void Gui_LightProc(void)
{
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_Enter_night_mode_sta
()
==
1
))
{
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
switch
(
g_nightLight
.
Duty
)
{
case
150
:
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
break
;
case
250
:
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
break
;
case
350
:
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
break
;
case
450
:
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
break
;
case
550
:
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
break
;
case
650
:
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
break
;
case
750
:
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
break
;
case
850
:
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
break
;
default:
break
;
}
}
else
{
PWM_Channel_Set_Duty
(
5
,
g_Light
.
Duty
);
//3.5
switch
(
g_Light
.
Duty
)
{
case
150
:
PWM_Channel_Set_Duty
(
5
,
150
);
//3.5
break
;
case
250
:
PWM_Channel_Set_Duty
(
5
,
280
);
//3.5
break
;
case
350
:
PWM_Channel_Set_Duty
(
5
,
400
);
//3.5
break
;
case
450
:
PWM_Channel_Set_Duty
(
5
,
550
);
//3.5
break
;
case
550
:
PWM_Channel_Set_Duty
(
5
,
650
);
//3.5
break
;
case
650
:
PWM_Channel_Set_Duty
(
5
,
780
);
//3.5
break
;
case
750
:
PWM_Channel_Set_Duty
(
5
,
900
);
//3.5
break
;
case
850
:
PWM_Channel_Set_Duty
(
5
,
1000
);
//3.5
break
;
default:
break
;
}
}
}
}
PWM_Channel_Set_Duty
(
1
,
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