rusefi-full/firmware/init/sensor/init_turbocharger_speed_sen...

19 lines
559 B
C++

#include "pch.h"
#include "init.h"
#include "frequency_sensor.h"
#include "turbocharger_speed_converter.h"
// Filter parameter of 0.01 filters over roughly 100 teeth
static FrequencySensor turbochargerSpeedSensor(SensorType::TurbochargerSpeed, MS2NT(500), 0.01f);
static TurbochargerSpeedConverter turbochargerSpeedConverter;
void initTurbochargerSpeedSensor() {
turbochargerSpeedSensor.initIfValid(engineConfiguration->turboSpeedSensorInputPin, turbochargerSpeedConverter);
}
void deinitTurbochargerSpeedSensor() {
turbochargerSpeedSensor.deInit();
}