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
baizhengyuan
TianYing_ty100
Commits
5f081835
Commit
5f081835
authored
May 10, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加部分指示灯逻辑,还差蓝牙,导航,保养指示灯未完成
parent
b10cd8bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
9 deletions
+107
-9
Data_Coolant.c
Firmware/Source/Application/Data_Coolant/Data_Coolant.c
+1
-1
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+106
-8
No files found.
Firmware/Source/Application/Data_Coolant/Data_Coolant.c
View file @
5f081835
...
...
@@ -184,7 +184,7 @@ void Data_Coolant_Temp_Display ( void )
{
DataCoolantTemp_Dis
.
u8_Warnflg
=
2
;
}
else
if
(
DataCoolantTemp
.
Value
>
=
112
)
else
if
(
DataCoolantTemp
.
Value
<
=
112
)
{
DataCoolantTemp_Dis
.
u8_Warnflg
=
0
;
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
5f081835
...
...
@@ -122,10 +122,12 @@ static void LED_High_Beam_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_29_High_Beam
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_High_Beam
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_29_High_Beam
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_High_Beam
,
0
);
}
}
static
Tellib_uint16_t
LED_FAULT_ELECTROSPRAY_Judgement
(
void
)
...
...
@@ -146,10 +148,12 @@ static void LED_FAULT_ELECTROSPRAY_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_32_Fault_Diagnosis
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_FAULT_ELECTROSPRAY
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_32_Fault_Diagnosis
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_FAULT_ELECTROSPRAY
,
0
);
}
}
static
Tellib_uint16_t
LED_ABS_Judgement
(
void
)
...
...
@@ -170,10 +174,12 @@ static void LED_ABS_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_12_ABS_Alarm
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_ABS
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_12_ABS_Alarm
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_ABS
,
0
);
}
}
static
Tellib_uint16_t
LED_Oil_Pressure_Judgement
(
void
)
...
...
@@ -194,10 +200,12 @@ static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_22_Oil_Pressure
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Oil_Pressure
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_22_Oil_Pressure
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Oil_Pressure
,
0
);
}
}
static
Tellib_uint16_t
LED_Fuel_Judgement
(
void
)
...
...
@@ -233,19 +241,19 @@ static void LED_Fuel_Execution(Tellib_uint16_t led_status)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_21_Fuel_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_20_Fuel_Y
,
LED_OFF
);
//SEG_SET_LED_STS(2
,1);
SEG_SET_LED_STS
(
em_SEG_Fuel
,
1
);
}
else
if
(
led_status
==
2u
)
{
if
(
FLASH_SYNC_1Hz
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_20_Fuel_Y
,
LED_ON
);
//SEG_SET_LED_STS(2
,1);
SEG_SET_LED_STS
(
em_SEG_Fuel
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_20_Fuel_Y
,
LED_OFF
);
//SEG_SET_LED_STS(2
,0);
SEG_SET_LED_STS
(
em_SEG_Fuel
,
0
);
}
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_21_Fuel_W
,
LED_OFF
);
...
...
@@ -253,24 +261,74 @@ static void LED_Fuel_Execution(Tellib_uint16_t led_status)
else
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_20_Fuel_Y
,
LED_ON
);
SEG_SET_LED_STS
(
2
,
1
);
SEG_SET_LED_STS
(
em_SEG_Fuel
,
1
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_21_Fuel_W
,
LED_OFF
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_21_Fuel_W
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_20_Fuel_Y
,
LED_OFF
);
//SEG_SET_LED_STS(2
,0);
SEG_SET_LED_STS
(
em_SEG_Fuel
,
0
);
}
}
static
Tellib_uint16_t
LED_Coolant_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
GET_DataCollantTempWarnflg
()
==
2
)
{
LED_STATE
=
2
;
}
else
if
(
GET_DataCollantTempWarnflg
()
==
1
)
{
LED_STATE
=
3
;
}
else
{
LED_STATE
=
0
;
}
return
LED_STATE
;
}
static
void
LED_Coolant_Execution
(
Tellib_uint16_t
led_status
)
{
;
if
(
led_status
==
2u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_13_Temp_AlarmW
,
LED_OFF
);
if
(
FLASH_SYNC_1Hz
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Temp_AlarmR
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Coolant
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Temp_AlarmR
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Coolant
,
0
);
}
}
else
if
(
led_status
==
3u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Temp_AlarmR
,
LED_OFF
);
if
(
FLASH_SYNC_1Hz
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_13_Temp_AlarmW
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Coolant
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_13_Temp_AlarmW
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Coolant
,
0
);
}
}
else
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Temp_AlarmR
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Coolant
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_13_Temp_AlarmW
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_11_Temp_AlarmR
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Coolant
,
0
);
}
}
static
Tellib_uint16_t
LED_Bluetooth_Judgement
(
void
)
{
...
...
@@ -290,10 +348,12 @@ static void LED_Bluetooth_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_23_Bluetooth
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Bluetooth
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_23_Bluetooth
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Bluetooth
,
0
);
}
}
...
...
@@ -338,16 +398,19 @@ static void LED_TCS_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_25_TCS_Alarm
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_TCS
,
1
);
}
else
if
(
led_status
==
2u
)
{
if
(
FLASH_SYNC_1Hz
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_25_TCS_Alarm
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_TCS
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_25_TCS_Alarm
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_TCS
,
0
);
}
}
else
if
(
led_status
==
3u
)
...
...
@@ -355,15 +418,18 @@ static void LED_TCS_Execution(Tellib_uint16_t led_status)
if
(
FLASH_SYNC_2Hz
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_25_TCS_Alarm
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_TCS
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_25_TCS_Alarm
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_TCS
,
0
);
}
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_25_TCS_Alarm
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_TCS
,
0
);
}
}
static
Tellib_uint16_t
LED_Auto_Start_Judgement
(
void
)
...
...
@@ -384,10 +450,12 @@ static void LED_Auto_Start_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_28_Auto_Star_Stop
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Auto_Start_Stop
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_28_Auto_Star_Stop
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Auto_Start_Stop
,
0
);
}
}
//static Tellib_uint16_t LED_Keys_Judgement(void)
...
...
@@ -406,7 +474,16 @@ static Tellib_uint16_t LED_Maintain_Judgement(void)
}
static
void
LED_Maintain_Execution
(
Tellib_uint16_t
led_status
)
{
;
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_33_Upkeep
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Upkeep
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_33_Upkeep
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Upkeep
,
0
);
}
}
static
Tellib_uint16_t
LED_Low_Batt_Judgement
(
void
)
{
...
...
@@ -440,10 +517,12 @@ static void LED_Low_Batt_Execution(Tellib_uint16_t led_status)
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_31_Low_Voltage
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Low_Batt_Vol
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_31_Low_Voltage
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Low_Batt_Vol
,
0
);
}
}
static
Tellib_uint16_t
LED_Lateral_Strut_Judgement
(
void
)
...
...
@@ -479,7 +558,16 @@ static Tellib_uint16_t LED_Lateral_Strut_Judgement(void)
}
static
void
LED_Lateral_Strut_Execution
(
Tellib_uint16_t
led_status
)
{
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_30_Lateral_Support
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Lateral_Strut
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_30_Lateral_Support
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Lateral_Strut
,
0
);
}
}
static
Tellib_uint16_t
LED_Tire_Pressure_Judgement
(
void
)
{
...
...
@@ -500,11 +588,13 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_27_Tire_PressureY
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_26_Tire_PressureW
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Tire_Pressure_Alarm
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_26_Tire_PressureW
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_27_Tire_PressureY
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Tire_Pressure_Alarm
,
1
);
}
}
...
...
@@ -529,29 +619,37 @@ void Turn_Left_Right_Lamp(void)
if
(
Line_In_Get_Status
(
LINE_IN_TurnLeft
))
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_06_Turn_Left
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Turn_Left
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_06_Turn_Left
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Turn_Left
,
0
);
}
if
(
Line_In_Get_Status
(
LINE_IN_TurnRight
))
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_05_Turn_Right
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Turn_Right
,
1
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_05_Turn_Right
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Turn_Right
,
0
);
}
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_06_Turn_Left
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Turn_Left
,
1
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_05_Turn_Right
,
LED_ON
);
SEG_SET_LED_STS
(
em_SEG_Turn_Right
,
1
);
}
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_06_Turn_Left
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Turn_Left
,
0
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_05_Turn_Right
,
LED_OFF
);
SEG_SET_LED_STS
(
em_SEG_Turn_Right
,
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