Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
8cea37da
Commit
8cea37da
authored
Feb 19, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:混动车型增加燃油指示灯逻辑
parent
6d6245fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
21 deletions
+51
-21
Data_Fuel.c
Firmware/Source/Application/Data_Fuel/Data_Fuel.c
+11
-3
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+40
-18
No files found.
Firmware/Source/Application/Data_Fuel/Data_Fuel.c
View file @
8cea37da
...
@@ -83,7 +83,7 @@ uint8_t Get_FuelStatus_Valid(void)
...
@@ -83,7 +83,7 @@ uint8_t Get_FuelStatus_Valid(void)
函数名:Get_FuelPilotLamp_Status
函数名:Get_FuelPilotLamp_Status
功 能:获取燃油指示灯状态函数
功 能:获取燃油指示灯状态函数
参 数:无
参 数:无
返回值:LampStatus 0--
白色,1--黄色,2
--黄色闪烁
返回值:LampStatus 0--
熄灭,1--白色,2--黄色,3
--黄色闪烁
******************************************************************************
******************************************************************************
注 意:该函数必须每 ms被调用一次
注 意:该函数必须每 ms被调用一次
******************************************************************************/
******************************************************************************/
...
@@ -93,11 +93,19 @@ uint8_t Get_FuelPilotLamp_Status(void)
...
@@ -93,11 +93,19 @@ uint8_t Get_FuelPilotLamp_Status(void)
if
((
Fuel
.
FuelValid
==
1U
)
&&
(
Fuel
.
FuelSegDis
==
1U
))
if
((
Fuel
.
FuelValid
==
1U
)
&&
(
Fuel
.
FuelSegDis
==
1U
))
{
{
LampStatus
=
1
U
;
LampStatus
=
2
U
;
}
}
else
if
((
Fuel
.
FuelValid
==
1U
)
&&
(
Fuel
.
FuelSegDis
==
0U
))
else
if
((
Fuel
.
FuelValid
==
1U
)
&&
(
Fuel
.
FuelSegDis
==
0U
))
{
{
LampStatus
=
2U
;
LampStatus
=
3U
;
}
else
if
((
Fuel
.
FuelValid
==
1U
)
&&
(
Fuel
.
FuelSegDis
>
1U
))
{
LampStatus
=
1U
;
}
else
{
LampStatus
=
0U
;
}
}
return
LampStatus
;
return
LampStatus
;
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
8cea37da
...
@@ -194,28 +194,50 @@ static void LED_EFI_failure_Execution(Tellib_uint16_t led_status)
...
@@ -194,28 +194,50 @@ static void LED_EFI_failure_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Fuel_Alarm_Judgement
(
void
)
static
Tellib_uint16_t
LED_Fuel_Alarm_Judgement
(
void
)
{
{
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint16_t
LED_STATE
=
0u
;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
#if (PART_NUMBER == G54_A01)
// LED_STATE = 1;
if
(
Get_FuelPilotLamp_Status
()
<
3U
)
// }
{
// else
LED_STATE
=
Get_FuelPilotLamp_Status
();
// {
}
// LED_STATE = 0;
else
// }
{
if
(
FLASH_SYNC_1Hz
)
{
LED_STATE
=
2U
;
}
else
{
LED_STATE
=
0U
;
}
}
#endif
return
LED_STATE
;
return
LED_STATE
;
}
}
static
void
LED_Fuel_Alarm_Execution
(
Tellib_uint16_t
led_status
)
static
void
LED_Fuel_Alarm_Execution
(
Tellib_uint16_t
led_status
)
{
{
if
(
led_status
==
1u
)
#if (PART_NUMBER == G54_A01)
{
if
(
led_status
==
1u
)
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
{
// SEG_SET_LED_STS(1,1);
/*点亮白灯*/
}
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_24_Fuel_Alarm_W
,
LED_ON
);
else
SEG_SET_LED_STS
(
SEG_LED_Fuel_Oil
,
1U
);
{
}
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
else
if
(
led_status
==
2u
)
// SEG_SET_LED_STS(1,0);
{
}
/*点亮黄灯*/
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_23_Fuel_Alarm_Y
,
LED_ON
);
SEG_SET_LED_STS
(
SEG_LED_Fuel_Oil
,
1U
);
}
else
{
/*熄灭指示灯*/
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_09_EFI_failure_Y
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_24_Fuel_Alarm_W
,
LED_OFF
);
SEG_SET_LED_STS
(
SEG_LED_Fuel_Oil
,
0U
);
}
#endif
}
}
static
Tellib_uint16_t
LED_Lead_Acid_Battery_Failure_Judgement
(
void
)
static
Tellib_uint16_t
LED_Lead_Acid_Battery_Failure_Judgement
(
void
)
{
{
...
...
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