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
fc5ea08f
Commit
fc5ea08f
authored
Oct 21, 2024
by
高士达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shihao' into 'develop'
✨
feat:增加开启远光灯延迟2s进入夜间模式 See merge request
!34
parents
dadb3a9c
c7cde5c9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
8 deletions
+46
-8
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
UDS_22Service_Main.c
source/UDS/UDS_22Service_Main.c
+1
-1
No files found.
source/Appliciation/CAN_App/CAN_APP.c
View file @
fc5ea08f
...
@@ -535,7 +535,7 @@ void Can_Set_Buff_18D00017(canlib_uint8_t CopyData [])
...
@@ -535,7 +535,7 @@ void Can_Set_Buff_18D00017(canlib_uint8_t CopyData [])
p18D00017
=
(
CANMsg18D00017Union
*
)
CopyData
;
p18D00017
=
(
CANMsg18D00017Union
*
)
CopyData
;
if
(
p18D00017
!=
(
void
*
)
0
)
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
)
if
(
g_nightLight
.
Duty
==
100
)
{
{
...
...
source/Appliciation/DataProcess.c
View file @
fc5ea08f
...
@@ -1196,6 +1196,35 @@ void GUI_Light_Init(void)
...
@@ -1196,6 +1196,35 @@ void GUI_Light_Init(void)
g_nightLight
.
Duty
=
100
;
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
)
void
GUI_nightLightWeakup_Init
(
void
)
{
{
g_nightLight
.
Duty
=
100
;
g_nightLight
.
Duty
=
100
;
...
@@ -1261,7 +1290,7 @@ void Gui_LightProc(void)
...
@@ -1261,7 +1290,7 @@ void Gui_LightProc(void)
}
}
else
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
(
1
,
g_nightLight
.
Duty
);
//表盘
PWM_Channel_Set_Duty
(
3
,
g_nightLight
.
Duty
);
//指针
PWM_Channel_Set_Duty
(
3
,
g_nightLight
.
Duty
);
//指针
...
@@ -1288,7 +1317,7 @@ void Gui_LightProc(void)
...
@@ -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
((
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
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
}
}
...
@@ -1306,7 +1335,7 @@ void Gui_LightProc(void)
...
@@ -1306,7 +1335,7 @@ void Gui_LightProc(void)
}
}
else
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
PWM_Channel_Set_Duty
(
5
,
g_nightLight
.
Duty
);
//3.5
}
}
...
...
source/Appliciation/DataProcess.h
View file @
fc5ea08f
...
@@ -408,6 +408,12 @@ typedef struct
...
@@ -408,6 +408,12 @@ typedef struct
uint8_t
Wheel_ID_Time_Lost
;
uint8_t
Wheel_ID_Time_Lost
;
}
_TPMS_Display_Infor
;
}
_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_Front_Display
;
extern
_TPMS_Display_Infor
Left_Rear_Display
;
extern
_TPMS_Display_Infor
Left_Rear_Display
;
extern
_TPMS_Display_Infor
Left_Rear_Inside_Display
;
extern
_TPMS_Display_Infor
Left_Rear_Inside_Display
;
...
@@ -566,4 +572,7 @@ void TPMS_Tyre_Lost(void);
...
@@ -566,4 +572,7 @@ void TPMS_Tyre_Lost(void);
void
CAN_Time_Lost
(
void
);
void
CAN_Time_Lost
(
void
);
INT8U
Get_Mcu_Abnormal_Reset
(
void
);
INT8U
Get_Mcu_Abnormal_Reset
(
void
);
uint16_t
Get_ActualEngineSpeed
(
void
);
uint16_t
Get_ActualEngineSpeed
(
void
);
extern
void
Enter_night_mode
(
void
);
extern
uint32_t
Get_Enter_night_mode_sta
(
void
);
#endif
#endif
source/Appliciation/Display/GUI.c
View file @
fc5ea08f
...
@@ -4067,7 +4067,7 @@ void Gui_Backlight(INT8U Backlight)
...
@@ -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_icon_01_X103_Y76
,
103
,
76
);
Draw_Image_Local
((
uint8_t
*
)
Set_CN_01_X85_Y128
,
85
,
128
);
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
))
if
((
g_nightLight
.
Duty
==
0
))
{
{
...
...
source/Appliciation/Menu_Interface.c
View file @
fc5ea08f
...
@@ -305,7 +305,7 @@ void Menu_Logic_Operation_SET_Backlight(Menu_Key_en_t enKeyType)
...
@@ -305,7 +305,7 @@ void Menu_Logic_Operation_SET_Backlight(Menu_Key_en_t enKeyType)
updataDir
=
1
;
updataDir
=
1
;
datmax
=
500u
;
datmax
=
500u
;
datmin
=
100u
;
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
)
if
(
g_nightLight
.
Duty
==
100u
)
{
{
...
...
source/Appliciation/Task.c
View file @
fc5ea08f
...
@@ -151,7 +151,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
...
@@ -151,7 +151,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
Gauges_Management_Service
();
Gauges_Management_Service
();
Telltales_Management
();
Telltales_Management
();
LED_Driver_Scan_Refresh
();
LED_Driver_Scan_Refresh
();
Enter_night_mode
();
}
}
...
...
source/UDS/UDS_22Service_Main.c
View file @
fc5ea08f
...
@@ -13,7 +13,7 @@ const uint8_t DID_22_F193[8] = {'V','1','.','0',0x20,0x20,0x20,0x20};
...
@@ -13,7 +13,7 @@ const uint8_t DID_22_F193[8] = {'V','1','.','0',0x20,0x20,0x20,0x20};
/*ECUHardwareVersionNumberDataIdentifier(软件号)*/
/*ECUHardwareVersionNumberDataIdentifier(软件号)*/
const
uint8_t
DID_22_F194
[
16
]
=
{
'5'
,
'8'
,
'0'
,
'3'
,
'3'
,
'1'
,
'0'
,
'8'
,
'1'
,
'7'
,
0x20
,
0x20
,
0x20
,
0x20
,
0x20
,
0x20
};
const
uint8_t
DID_22_F194
[
16
]
=
{
'5'
,
'8'
,
'0'
,
'3'
,
'3'
,
'1'
,
'0'
,
'8'
,
'1'
,
'7'
,
0x20
,
0x20
,
0x20
,
0x20
,
0x20
,
0x20
};
/*ECUSoftwareVersionNumberDataIdentifier(软件版本号)*/
/*ECUSoftwareVersionNumberDataIdentifier(软件版本号)*/
const
uint8_t
DID_22_F195
[
8
]
=
{
'V'
,
'1'
,
'.'
,
'
2
'
,
0x20
,
0x20
,
0x20
,
0x20
};
const
uint8_t
DID_22_F195
[
8
]
=
{
'V'
,
'1'
,
'.'
,
'
3
'
,
0x20
,
0x20
,
0x20
,
0x20
};
/*SystemNameDataIdentifier(ECU名称)*/
/*SystemNameDataIdentifier(ECU名称)*/
const
uint8_t
DID_22_F197
[
10
]
=
{
'I'
,
'C'
,
'-'
,
'N'
,
'S'
,
'2'
,
'0'
,
'8'
,
'-'
,
'2'
};
const
uint8_t
DID_22_F197
[
10
]
=
{
'I'
,
'C'
,
'-'
,
'N'
,
'S'
,
'2'
,
'0'
,
'8'
,
'-'
,
'2'
};
/*EOLProgrammingDate*/
/*EOLProgrammingDate*/
...
...
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