19 lines
559 B
C++
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();
|
|
}
|