diff --git a/firmware/controllers/algo/engine2.cpp b/firmware/controllers/algo/engine2.cpp index 838dc931d6..a8205974ae 100644 --- a/firmware/controllers/algo/engine2.cpp +++ b/firmware/controllers/algo/engine2.cpp @@ -198,8 +198,6 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { currentRawVE = interpolateClamped(0.0f, idleVe, CONFIG(idlePidDeactivationTpsThreshold), currentRawVE, tps.Value); } currentBaroCorrectedVE = baroCorrection * currentRawVE * PERCENT_DIV; - } else { - baseTableFuel = getBaseTableFuel(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE)); } ENGINE(injectionDuration) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/algo/engine_state.h b/firmware/controllers/algo/engine_state.h index 50361ab441..6299bfb3ea 100644 --- a/firmware/controllers/algo/engine_state.h +++ b/firmware/controllers/algo/engine_state.h @@ -66,10 +66,6 @@ public: float fuelingLoad = 0; float ignitionLoad = 0; - /** - * pre-calculated value from simple fuel lookup - */ - floatms_t baseTableFuel = 0; /** * Raw fuel injection duration produced by current fuel algorithm, without any correction */ diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index 5900d0c6c7..0c5e69da55 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -251,7 +251,7 @@ floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { // TODO: independently selectable ignition load mode ENGINE(engineState.ignitionLoad) = tps; - baseFuel = engine->engineState.baseTableFuel; + baseFuel = getBaseTableFuel(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE)); efiAssert(CUSTOM_ERR_ASSERT, !cisnan(baseFuel), "NaN bt baseFuel", 0); }