From 5b265a67ef1072f6c982b4ad3cf3160414f3babb Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 1 Dec 2016 22:02:50 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/algo/engine.cpp | 24 ------------------- firmware/controllers/algo/engine.h | 3 --- .../controllers/algo/engine_configuration.cpp | 1 - 3 files changed, 28 deletions(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 9fb440383e..77cef37127 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -313,29 +313,6 @@ injection_mode_e Engine::getCurrentInjectionMode(DECLARE_ENGINE_PARAMETER_F) { return isCrankingR(rpm) ? CONFIG(crankingInjectionMode) : CONFIG(injectionMode); } -void Engine::prepareFuelSchedule(DECLARE_ENGINE_PARAMETER_F) { - efiAssertVoid(ENGINE(engineConfiguration2)->injectionEvents != ENGINE(engineConfiguration2)->processing, "fuel pointers"); - - ENGINE(m.beforeInjectonSch) = GET_TIMESTAMP(); - - if (ENGINE(engineConfiguration2)->processing->usedAtEngineCycle != 0 && - ENGINE(engineConfiguration2)->processing->usedAtEngineCycle == ENGINE(rpmCalculator).getRevolutionCounter()) { - // we are here if engine is still using this older fuel schedule, not yet time to override it -// scheduleMsg(&logger, "still need %d", ENGINE(rpmCalculator).getRevolutionCounter()); - return; - } - - ENGINE(engineConfiguration2)->processing->addFuelEvents(PASS_ENGINE_PARAMETER_F); - ENGINE(m.injectonSchTime) = GET_TIMESTAMP() - ENGINE(m.beforeInjectonSch); - - /** - * Swap pointers. This way we are always reading from one instance while adjusting scheduling of another instance. - */ - FuelSchedule * t = ENGINE(engineConfiguration2)->injectionEvents; - ENGINE(engineConfiguration2)->injectionEvents = ENGINE(engineConfiguration2)->processing; - ENGINE(engineConfiguration2)->processing = t; -} - /** * The idea of this method is to execute all heavy calculations in a lower-priority thread, * so that trigger event handler/IO scheduler tasks are faster. @@ -369,7 +346,6 @@ void Engine::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) { ENGINE(fuelMs) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER) * engineConfiguration->globalFuelCorrection; engine->m.fuelCalcTime = GET_TIMESTAMP() - engine->m.beforeFuelCalc; -// prepareFuelSchedule(PASS_ENGINE_PARAMETER_F); } StartupFuelPumping::StartupFuelPumping() { diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index d49db49c6e..b221336f82 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -82,9 +82,6 @@ public: #endif OutputSignalPair fuelActuators[INJECTION_PIN_COUNT]; - OutputSignalPair overlappingFuelActuator[INJECTION_PIN_COUNT]; - - bool wasOverlapping[INJECTION_PIN_COUNT]; float fsioLastValue[LE_COMMAND_COUNT]; diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 05bf220285..8d8708b617 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1011,7 +1011,6 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN engine_configuration2_s::engine_configuration2_s() { injectionEvents = &injectionEvents0; processing = &injectionEvents1; - memset(wasOverlapping, 0, sizeof(wasOverlapping)); } void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_S) {