auxSpeed1
This commit is contained in:
parent
7152972437
commit
05b84d21e6
|
@ -573,6 +573,8 @@ static void updateMiscSensors() {
|
|||
engine->outputChannels.wastegatePositionSensor = Sensor::getOrZero(SensorType::WastegatePosition);
|
||||
|
||||
engine->outputChannels.ISSValue = Sensor::getOrZero(SensorType::InputShaftSpeed);
|
||||
engine->outputChannels.auxSpeed1 = Sensor::getOrZero(SensorType::AuxSpeed1);
|
||||
engine->outputChannels.auxSpeed2 = Sensor::getOrZero(SensorType::AuxSpeed2);
|
||||
|
||||
#if HAL_USE_ADC
|
||||
engine->outputChannels.internalMcuTemperature = getMCUInternalTemperature();
|
||||
|
|
|
@ -56,7 +56,9 @@ void FrequencySensor::onEdge(efitick_t nowNt) {
|
|||
eventCounter++;
|
||||
float frequency = 1 / m_edgeTimer.getElapsedSecondsAndReset(nowNt);
|
||||
|
||||
frequency = m_filter.filter(frequency);
|
||||
if (useBiQuad) {
|
||||
frequency = m_filter.filter(frequency);
|
||||
}
|
||||
|
||||
postRawValue(frequency, nowNt);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,9 @@ public:
|
|||
void initIfValid(brain_pin_e pin, SensorConverter &converter, float filterParameter);
|
||||
void deInit();
|
||||
|
||||
// sad workaround: we are not good at BiQuad configuring
|
||||
bool useBiQuad = true;
|
||||
|
||||
void onEdge(efitick_t nowNt);
|
||||
|
||||
int eventCounter = 0;
|
||||
|
|
|
@ -23,7 +23,8 @@ public:
|
|||
|
||||
|
||||
void initAuxSpeedSensors() {
|
||||
auxSpeed1.initIfValid(engineConfiguration->auxSpeedSensorInputPin[0], converter, 0.05f);
|
||||
auxSpeed1.useBiQuad = engineConfiguration->useBiQuadOnAuxSpeedSensors;
|
||||
auxSpeed1.initIfValid(engineConfiguration->auxSpeedSensorInputPin[0], converter, engineConfiguration->auxFrequencyFilter);
|
||||
auxSpeed2.initIfValid(engineConfiguration->auxSpeedSensorInputPin[1], converter, 0.05f);
|
||||
}
|
||||
|
||||
|
|
|
@ -1162,6 +1162,7 @@ gaugeCategory = Sensors - Extra 2
|
|||
wastegatePosGauge = wastegatePositionSensor, @@GAUGE_NAME_WG_POSITION@@, "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
idlePosSensGauge = idlePositionSensor, @@GAUGE_NAME_IDLE_POSITION@@, "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
currentEnginePhaseGauge = currentEngineDecodedPhase, "Engine Phase", "deg", 0, 720, 0, 0, 720, 720, 0, 0
|
||||
auxSpeed1Gauge = auxSpeed1, "Aux Freq Input1", "hz", 0, 30000, 0, 0, 30000, 30000, 0, 0
|
||||
|
||||
gaugeCategory = ECU Status
|
||||
warningCounterGauge = warningCounter, @@GAUGE_NAME_WARNING_COUNT@@, "", 0, 100, 0, 0, 100, 100, 0, 0
|
||||
|
|
Loading…
Reference in New Issue