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
cc670c72
Commit
cc670c72
authored
Oct 21, 2024
by
梁百峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加开启远光灯延迟2s进入夜间模式
parent
16f84870
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
7 deletions
+45
-7
CAN_APP.c
source/Appliciation/CAN_App/CAN_APP.c
+1
-1
DataProcess.c
source/Appliciation/DataProcess.c
+32
-3
DataProcess.h
source/Appliciation/DataProcess.h
+9
-0
GUI.c
source/Appliciation/Display/GUI.c
+1
-1
Menu_Interface.c
source/Appliciation/Menu_Interface.c
+1
-1
Task.c
source/Appliciation/Task.c
+1
-1
No files found.
source/Appliciation/CAN_App/CAN_APP.c
View file @
cc670c72
...
...
@@ -535,7 +535,7 @@ void Can_Set_Buff_18D00017(canlib_uint8_t CopyData [])
p18D00017
=
(
CANMsg18D00017Union
*
)
CopyData
;
if
(
p18D00017
!=
(
void
*
)
0
)
{
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
Enter_night_mode_sta
(
)
==
1
))
{
if
(
g_nightLight
.
Duty
==
100
)
{
...
...
source/Appliciation/DataProcess.c
View file @
cc670c72
...
...
@@ -1196,6 +1196,35 @@ void GUI_Light_Init(void)
g_nightLight
.
Duty
=
100
;
}
DataEnternightmode
nightmode
;
/*开启远光灯延迟2s进入夜间模式*/
void
Enter_night_mode
(
void
)
{
if
(
(
Get_TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
{
if
(
nightmode
.
night_mode_time
<
40
)
{
nightmode
.
night_mode_time
++
;
}
else
{
nightmode
.
night_mode_sta
=
1
;
}
}
else
{
nightmode
.
night_mode_sta
=
0
;
nightmode
.
night_mode_time
=
0
;
}
}
/*获取夜间模式状态 1进入 0不进入*/
uint32_t
Get_Enter_night_mode_sta
(
void
)
{
return
nightmode
.
night_mode_sta
;
}
void
GUI_nightLightWeakup_Init
(
void
)
{
g_nightLight
.
Duty
=
100
;
...
...
@@ -1261,7 +1290,7 @@ void Gui_LightProc(void)
}
else
{
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
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
);
//指针
...
...
@@ -1288,7 +1317,7 @@ void Gui_LightProc(void)
{
if
((
Pop_Alarm_Get_Current
()
==
POP_ALARM_POSITION_LIGHT
)
||
(
Pop_Alarm_Get_Current
()
==
POP_ALARM_KEY
))
{
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
Enter_night_mode_sta
(
)
==
1
))
{
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
}
...
...
@@ -1306,7 +1335,7 @@ void Gui_LightProc(void)
}
else
{
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
Enter_night_mode_sta
(
)
==
1
))
{
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
}
...
...
source/Appliciation/DataProcess.h
View file @
cc670c72
...
...
@@ -408,6 +408,12 @@ typedef struct
uint8_t
Wheel_ID_Time_Lost
;
}
_TPMS_Display_Infor
;
typedef
struct
{
uint32_t
night_mode_time
;
//夜间模式延时时间
uint8_t
night_mode_sta
;
//夜间模式状态
}
DataEnternightmode
;
extern
_TPMS_Display_Infor
Left_Front_Display
;
extern
_TPMS_Display_Infor
Left_Rear_Display
;
extern
_TPMS_Display_Infor
Left_Rear_Inside_Display
;
...
...
@@ -566,4 +572,7 @@ void TPMS_Tyre_Lost(void);
void
CAN_Time_Lost
(
void
);
INT8U
Get_Mcu_Abnormal_Reset
(
void
);
uint16_t
Get_ActualEngineSpeed
(
void
);
extern
void
Enter_night_mode
(
void
);
extern
uint32_t
Get_Enter_night_mode_sta
(
void
);
#endif
source/Appliciation/Display/GUI.c
View file @
cc670c72
...
...
@@ -4067,7 +4067,7 @@ void Gui_Backlight(INT8U Backlight)
{
Draw_Image_Local
((
uint8_t
*
)
Set_icon_01_X103_Y76
,
103
,
76
);
Draw_Image_Local
((
uint8_t
*
)
Set_CN_01_X85_Y128
,
85
,
128
);
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
Enter_night_mode_sta
(
)
==
1
))
{
if
((
g_nightLight
.
Duty
==
0
))
{
...
...
source/Appliciation/Menu_Interface.c
View file @
cc670c72
...
...
@@ -305,7 +305,7 @@ void Menu_Logic_Operation_SET_Backlight(Menu_Key_en_t enKeyType)
updataDir
=
1
;
datmax
=
500u
;
datmin
=
100u
;
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
TelltalesLedSts
(
m_LED_High_Lamp
)
==
1
))
if
((
Get_TelltalesLedSts
(
m_LED_Park_Lamp
)
==
1
)
||
(
Get_
Enter_night_mode_sta
(
)
==
1
))
{
if
(
g_nightLight
.
Duty
==
100u
)
{
...
...
source/Appliciation/Task.c
View file @
cc670c72
...
...
@@ -151,7 +151,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
Gauges_Management_Service
();
Telltales_Management
();
LED_Driver_Scan_Refresh
();
Enter_night_mode
();
}
...
...
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