Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
7882467d
Commit
7882467d
authored
Jun 03, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:规范变更,取消远光灯控制背光策略,增加位置信号控制背光
parent
aa8f3c5a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
28 deletions
+70
-28
BackLight.c
Firmware/Source/Application/BackLight/BackLight.c
+35
-7
BackLight.h
Firmware/Source/Application/BackLight/BackLight.h
+1
-1
Line_In_user.c
Firmware/Source/Component/Line_In/Line_In_user.c
+14
-1
Line_In_user.h
Firmware/Source/Component/Line_In/Line_In_user.h
+2
-1
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+18
-18
No files found.
Firmware/Source/Application/BackLight/BackLight.c
View file @
7882467d
...
@@ -3,23 +3,51 @@
...
@@ -3,23 +3,51 @@
#include "Components.h"
#include "Components.h"
#include "Application.h"
#include "Application.h"
#include "TrmerM\TrmerM.h"
#include "TrmerM\TrmerM.h"
#include "Line_In\Line_In_user.h"
#define BACK_LIGHT_DAY 600
#define BACK_LIGHT_DAY 600
#define BACK_LIGHT_NIGHT 420
#define BACK_LIGHT_NIGHT 420
_Light
g_Light
;
//_Light g_Light;
uint8_t
LED_Turnoff
=
0
;
uint8_t
LED_Turnon
=
0
;
void
BackLight_Init
(
void
)
void
BackLight_Init
(
void
)
{
{
g_Light
.
Light_Day
=
0XFFFF
;
//g_Light.Light_Day = 0XFFFF;
g_Light
.
Light_Night
=
0XFFFF
;
//g_Light.Light_Night = 0XFFFF;
LED_Turnoff
=
0
;
LED_Turnon
=
0
;
}
}
void
BackLight_Process
(
void
)
void
BackLight_Process
(
void
)
{
{
if
(
SYS_OPR_STAT_IGN_ON
)
if
(
SYS_OPR_STAT_IGN_ON
)
{
{
if
(
HighBeam_Timer
.
LED_Turnon
==
10
)
if
(
Line_In_Get_Status
(
LINE_IN_Little_Lamp
))
{
if
(
LED_Turnon
<
5
)
{
LED_Turnon
++
;
}
else
{
LED_Turnon
=
5
;
LED_Turnoff
=
0
;
}
}
else
{
if
(
LED_Turnoff
<
5
)
{
LED_Turnoff
++
;
}
else
{
LED_Turnoff
=
5
;
LED_Turnon
=
0
;
}
}
if
(
LED_Turnon
==
5
)
{
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_NIGHT
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_NIGHT
);
}
}
...
@@ -31,8 +59,8 @@ void BackLight_Process(void)
...
@@ -31,8 +59,8 @@ void BackLight_Process(void)
}
}
else
else
{
{
g_Light
.
Light_Day
=
0
;
//
g_Light.Light_Day = 0;
g_Light
.
Light_Night
=
0
;
//
g_Light.Light_Night = 0;
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
}
}
}
}
Firmware/Source/Application/BackLight/BackLight.h
View file @
7882467d
#ifndef _BACKLIGHT_H_
#ifndef _BACKLIGHT_H_
#define _BACKLIGHT_H_
#define _BACKLIGHT_H_
#include "common.h"
#include "common.h"
#include "Application.h"
typedef
struct
typedef
struct
{
{
uint8_t
Duty
;
uint8_t
Duty
;
...
...
Firmware/Source/Component/Line_In/Line_In_user.c
View file @
7882467d
...
@@ -13,9 +13,22 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
...
@@ -13,9 +13,22 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Fault_ABS
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Fault_ABS
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
500U
,
20U
,
Get_LINE_IN_Oil_Pressure
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
500U
,
20U
,
Get_LINE_IN_Oil_Pressure
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Little_Lamp
,
},
};
};
Linelib_uint8_t
Get_LINE_IN_Little_Lamp
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
PositionBeam_P_IN
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_TurnLeft
(
void
)
Linelib_uint8_t
Get_LINE_IN_TurnLeft
(
void
)
{
{
Linelib_uint8_t
ret
=
0U
;
Linelib_uint8_t
ret
=
0U
;
...
...
Firmware/Source/Component/Line_In/Line_In_user.h
View file @
7882467d
...
@@ -12,7 +12,7 @@ typedef enum
...
@@ -12,7 +12,7 @@ typedef enum
LINE_IN_Fault_ABS
,
LINE_IN_Fault_ABS
,
LINE_IN_Oil_Pressure
,
LINE_IN_Oil_Pressure
,
LINE_IN_Auto_Start_Stop
,
LINE_IN_Auto_Start_Stop
,
LINE_IN_Little_Lamp
,
LINE_IN_MAX
,
LINE_IN_MAX
,
}
LINE_IN_Enum_t
;
}
LINE_IN_Enum_t
;
...
@@ -25,5 +25,6 @@ Linelib_uint8_t Get_LINE_IN_FAULT_ELECTROSPRAY(void);
...
@@ -25,5 +25,6 @@ Linelib_uint8_t Get_LINE_IN_FAULT_ELECTROSPRAY(void);
Linelib_uint8_t
Get_LINE_IN_Fault_ABS
(
void
);
Linelib_uint8_t
Get_LINE_IN_Fault_ABS
(
void
);
Linelib_uint8_t
Get_LINE_IN_Oil_Pressure
(
void
);
Linelib_uint8_t
Get_LINE_IN_Oil_Pressure
(
void
);
Linelib_uint8_t
Get_LINE_IN_Auto_Start_Stop
(
void
);
Linelib_uint8_t
Get_LINE_IN_Auto_Start_Stop
(
void
);
Linelib_uint8_t
Get_LINE_IN_Little_Lamp
(
void
);
#endif
#endif
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
7882467d
...
@@ -90,29 +90,29 @@ static Tellib_uint16_t LED_High_Beam_Judgement(void)
...
@@ -90,29 +90,29 @@ static Tellib_uint16_t LED_High_Beam_Judgement(void)
if
(
Line_In_Get_Status
(
LINE_IN_HighBeam
))
if
(
Line_In_Get_Status
(
LINE_IN_HighBeam
))
{
{
LED_STATE
=
1
;
LED_STATE
=
1
;
if
(
HighBeam_Timer
.
LED_Turnon
<
10
)
//
if(HighBeam_Timer.LED_Turnon < 10 )
{
//
{
HighBeam_Timer
.
LED_Turnon
++
;
//
HighBeam_Timer.LED_Turnon ++;
}
//
}
else
//
else
{
//
{
HighBeam_Timer
.
LED_Turnon
=
10
;
//
HighBeam_Timer.LED_Turnon = 10;
HighBeam_Timer
.
LED_Turnoff
=
0
;
//
HighBeam_Timer.LED_Turnoff = 0;
}
//
}
}
}
else
else
{
{
LED_STATE
=
0
;
LED_STATE
=
0
;
if
(
HighBeam_Timer
.
LED_Turnoff
<
10
)
//
if(HighBeam_Timer.LED_Turnoff < 10 )
{
//
{
HighBeam_Timer
.
LED_Turnoff
++
;
//
HighBeam_Timer.LED_Turnoff ++;
}
//
}
else
//
else
{
//
{
HighBeam_Timer
.
LED_Turnoff
=
10
;
//
HighBeam_Timer.LED_Turnoff = 10;
HighBeam_Timer
.
LED_Turnon
=
0
;
//
HighBeam_Timer.LED_Turnon = 0;
}
//
}
}
}
return
LED_STATE
;
return
LED_STATE
;
...
...
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