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
a3e20da7
Commit
a3e20da7
authored
May 29, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:43662,依据规范变更,更改响应燃油策略
parent
6635145e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
24 deletions
+34
-24
Data_Fuel.c
Firmware/Source/Application/Fuel/Data_Fuel.c
+33
-23
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+1
-1
No files found.
Firmware/Source/Application/Fuel/Data_Fuel.c
View file @
a3e20da7
...
...
@@ -125,27 +125,25 @@ void Fuel_R_Cal(uint8_t deltaTime)
void
Fuel_State_Check
(
uint8_t
deltaTime
)
{
// if (FuelR < 20)
//{ /*短路 1*/
// FuelSensorOpenTime = 0;
// FuelSensorNormalTime = 0;
// if ((FuelSensorShortTime > 3000) || ((FuelStateInitFlag) && (FuelSensorShortTime > 3000)))
// {
// FuelSensorState = FuelSensorShortCircuit;
// DesFuelSetp = 0;
// CurFuelSetp = 0;
// FuelStateInitFlag = 0;
// FuelInitFlag = 1;
// FuelDir = FUEL_SEG_UP;
// }
// else
// {
// FuelSensorShortTime += deltaTime;
// }
// }
// else
if
(
FuelR
>=
10000
)
if
(
FuelR
<
30
)
{
/*短路 1*/
FuelSensorOpenTime
=
0
;
FuelSensorNormalTime
=
0
;
if
((
FuelSensorShortTime
>
3000
)
||
((
FuelStateInitFlag
)
&&
(
FuelSensorShortTime
>
3000
)))
{
FuelSensorState
=
FuelSensorShortCircuit
;
DesFuelSetp
=
0
;
CurFuelSetp
=
0
;
FuelStateInitFlag
=
0
;
FuelInitFlag
=
1
;
FuelDir
=
FUEL_SEG_UP
;
}
else
{
FuelSensorShortTime
+=
deltaTime
;
}
}
else
if
(
FuelR
>=
3100
)
{
/*断路 320*/
FuelSensorShortTime
=
0
;
FuelSensorNormalTime
=
0
;
...
...
@@ -184,7 +182,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
{
static
uint32_t
time
=
0
;
if
((
FuelSensorState
==
FuelSensorNormal
)
&&
(
FuelR
<
100
00
))
if
((
FuelSensorState
==
FuelSensorNormal
)
&&
(
FuelR
<
31
00
))
{
// 32000 //FuelR >10 change FuelR >20
/*采集完第一组数据后,开始计算燃油格数*/
if
(
FuelADCompleteFlg
)
...
...
@@ -383,6 +381,18 @@ FuelSensorSts_t Get_Fuel_Sensor_State(void)
uint16_t
Get_Fuel_RES
(
void
)
{
uint16_t
Fuel_Res
=
0
;
Fuel_Res
=
FuelR
/
10
;
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorShortCircuit
)
{
Fuel_Res
=
3
;
}
else
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorOpenCircuit
)
{
Fuel_Res
=
310
;
}
else
{
Fuel_Res
=
FuelR
/
10
;
}
return
Fuel_Res
;
}
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
a3e20da7
...
...
@@ -979,7 +979,7 @@ void SEG_SET_FuelDial(uint8_t m_Flag, uint8_t m_SEG)
IC2_SEG102
=
IC_SEG_GREY
;
IC2_SEG101
=
IC_SEG_GREY
;
if
((
Get_Fuel_Sensor_State
()
==
2
)
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
if
((
(
Get_Fuel_Sensor_State
()
==
2
)
||
(
Get_Fuel_Sensor_State
()
==
1
))
&&
(
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
if
(
FLASH_SYNC_1Hz
)
{
...
...
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