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
58b62627
Commit
58b62627
authored
Jun 02, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修改燃油表当从无效不显示变为有效显示,需要判断连续的三帧信号在线
parent
154c9f0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+14
-1
Data_Fuel.c
Firmware/Source/Application/Data_Fuel/Data_Fuel.c
+2
-0
Data_Fuel.h
Firmware/Source/Application/Data_Fuel/Data_Fuel.h
+1
-0
No files found.
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
58b62627
...
@@ -280,7 +280,19 @@ uint8_t Get_CAN_Power_State(void)
...
@@ -280,7 +280,19 @@ uint8_t Get_CAN_Power_State(void)
void
CAN_0x18E_Receive
(
uint8_t
CopyData
[])
void
CAN_0x18E_Receive
(
uint8_t
CopyData
[])
{
{
Fuel
.
FuelSeg
=
Get_CAN_CH0_ID_18E_Sig_EMS_FuelRemainLevel
();
Fuel
.
FuelSeg
=
Get_CAN_CH0_ID_18E_Sig_EMS_FuelRemainLevel
();
Fuel
.
FuelValid
=
1U
;
if
(
Fuel
.
FuelValid
==
0U
)
{
if
(
Fuel
.
FuelValidCount
>=
2U
)
{
Fuel
.
FuelValid
=
1U
;
}
else
{
Fuel
.
FuelValidCount
++
;
}
}
if
(
Fuel
.
FuelSeg
>
8U
)
if
(
Fuel
.
FuelSeg
>
8U
)
{
{
Fuel
.
FuelSeg
=
8U
;
Fuel
.
FuelSeg
=
8U
;
...
@@ -686,6 +698,7 @@ void CAN_0x17A_Receive(uint8_t CopyData [])
...
@@ -686,6 +698,7 @@ void CAN_0x17A_Receive(uint8_t CopyData [])
void
CAN_0x18E_Lost_CallBack
(
uint8_t
CopyData
[])
void
CAN_0x18E_Lost_CallBack
(
uint8_t
CopyData
[])
{
{
Fuel
.
FuelStatusCount
=
0U
;
Fuel
.
FuelStatusCount
=
0U
;
Fuel
.
FuelValidCount
=
0U
;
}
}
void
CAN_0x225_Lost_CallBack
(
uint8_t
CopyData
[])
void
CAN_0x225_Lost_CallBack
(
uint8_t
CopyData
[])
...
...
Firmware/Source/Application/Data_Fuel/Data_Fuel.c
View file @
58b62627
...
@@ -9,6 +9,7 @@ void Data_Fuel_KL30_Init(void)
...
@@ -9,6 +9,7 @@ void Data_Fuel_KL30_Init(void)
Fuel
.
FuelSegDis
=
0U
;
Fuel
.
FuelSegDis
=
0U
;
Fuel
.
FuelStatusCount
=
0U
;
Fuel
.
FuelStatusCount
=
0U
;
Fuel
.
FuelValid
=
0U
;
Fuel
.
FuelValid
=
0U
;
Fuel
.
FuelValidCount
=
0U
;
}
}
void
Data_Fuel_KL15_Init
(
void
)
void
Data_Fuel_KL15_Init
(
void
)
...
@@ -17,6 +18,7 @@ void Data_Fuel_KL15_Init(void)
...
@@ -17,6 +18,7 @@ void Data_Fuel_KL15_Init(void)
Fuel
.
FuelSegDis
=
0U
;
Fuel
.
FuelSegDis
=
0U
;
Fuel
.
FuelStatusCount
=
0U
;
Fuel
.
FuelStatusCount
=
0U
;
Fuel
.
FuelValid
=
0U
;
Fuel
.
FuelValid
=
0U
;
Fuel
.
FuelValidCount
=
0U
;
}
}
void
Data_Fuel_Service
(
void
)
void
Data_Fuel_Service
(
void
)
...
...
Firmware/Source/Application/Data_Fuel/Data_Fuel.h
View file @
58b62627
...
@@ -10,6 +10,7 @@ typedef struct //__attribute__((aligned(4)))
...
@@ -10,6 +10,7 @@ typedef struct //__attribute__((aligned(4)))
uint8_t
FuelSeg
;
//燃油格数
uint8_t
FuelSeg
;
//燃油格数
uint8_t
FuelSegDis
;
//燃油显示格数
uint8_t
FuelSegDis
;
//燃油显示格数
uint8_t
FuelValid
;
//燃油有效状态
uint8_t
FuelValid
;
//燃油有效状态
uint8_t
FuelValidCount
;
//燃油有效状态计数
uint8_t
FuelStatusCount
;
/*燃油状态计数*/
uint8_t
FuelStatusCount
;
/*燃油状态计数*/
}
FuelStruct_st_t
;
}
FuelStruct_st_t
;
...
...
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