20 lines
513 B
C++
20 lines
513 B
C++
#include "pch.h"
|
|
|
|
#include "init.h"
|
|
#include "frequency_sensor.h"
|
|
#include "flex_sensor.h"
|
|
|
|
// 0.01 means filter bandwidth of ~1hz with ~100hz sensor
|
|
static FrequencySensor flexSensor(SensorType::FuelEthanolPercent, MS2NT(500), 0.01f);
|
|
static FlexConverter converter;
|
|
|
|
// https://rusefi.com/forum/viewtopic.php?p=37452&sid=829804c90d5b2e1fecd1b900cf1b1811#p37452
|
|
|
|
void initFlexSensor() {
|
|
flexSensor.initIfValid(engineConfiguration->flexSensorPin, converter);
|
|
}
|
|
|
|
void deInitFlexSensor() {
|
|
flexSensor.deInit();
|
|
}
|