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
baaa4019
Commit
baaa4019
authored
Jun 25, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:增加燃油采集数量,增加稳定性
parent
b30d9f7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Data_Fuel.c
Firmware/Source/Application/Fuel/Data_Fuel.c
+7
-6
No files found.
Firmware/Source/Application/Fuel/Data_Fuel.c
View file @
baaa4019
#include "Data_Fuel.h"
#include "Application.h"
#define FUEL_DATA_TIME
25
u
/*这里填写多长时间采集一个数据,单位ms*/
#define FUEL_DATA_NUM
2
0u
/*燃油电阻采集数据总数 最大255*/
#define FUEL_CAL_START 5u
/*数据排序后取中间部分计算平均:起始*/
#define FUEL_CAL_END
1
5u
/*数据排序后取中间部分计算平均:结束*/
#define FUEL_DATA_TIME
10
u
/*这里填写多长时间采集一个数据,单位ms*/
#define FUEL_DATA_NUM
4
0u
/*燃油电阻采集数据总数 最大255*/
#define FUEL_CAL_START
1
5u
/*数据排序后取中间部分计算平均:起始*/
#define FUEL_CAL_END
2
5u
/*数据排序后取中间部分计算平均:结束*/
#define RETURN_DIFFERENCE
2
5u
/*判断上升或下降的回差,精度0.1*/
#define RETURN_DIFFERENCE
1
5u
/*判断上升或下降的回差,精度0.1*/
#define FUEL_SEG_UP 0u
#define FUEL_SEG_DOWN 1u
...
...
@@ -67,7 +67,8 @@ void Fuel_R_Cal(uint8_t deltaTime)
static
uint16_t
timeCount
=
0
;
if
(
FuelStateInitFlag
)
if
((
FuelStateInitFlag
)
&&
(
ADC_Read_Signal_Valid
(
ADC_CH_FUEL1
)))
{
FuelR
=
ADC_Read_Signal
(
ADC_CH_FUEL1
);
}
...
...
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