From a6fe81d07fdcb0661018a1b9b67ecfde97c84654 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 23 Mar 2019 08:55:33 -0400 Subject: [PATCH] docs --- firmware/controllers/algo/engine.cpp | 4 ++++ firmware/controllers/trigger/main_trigger_callback.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 01d50e0921..ff7d7e5a87 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -339,6 +339,10 @@ void Engine::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engine->m.beforeFuelCalc = GET_TIMESTAMP(); int rpm = GET_RPM(); + /** + * we have same assignment of 'getInjectionDuration' to 'injectionDuration' in handleFuel() + * Open question why do we refresh that in two places? + */ ENGINE(injectionDuration) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX); engine->m.fuelCalcTime = GET_TIMESTAMP() - engine->m.beforeFuelCalc; diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp index f10f682fed..3413480e63 100644 --- a/firmware/controllers/trigger/main_trigger_callback.cpp +++ b/firmware/controllers/trigger/main_trigger_callback.cpp @@ -393,6 +393,10 @@ static ALWAYS_INLINE void handleFuel(const bool limitedFuel, uint32_t trgEventIn ENGINE(tpsAccelEnrichment.onNewValue(getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) PASS_ENGINE_PARAMETER_SUFFIX)); ENGINE(engineLoadAccelEnrichment.onEngineCycle(PASS_ENGINE_PARAMETER_SIGNATURE)); + /** + * we have same assignment of 'getInjectionDuration' to 'injectionDuration' in periodicFastCallback() + * Open question why do we refresh that in two places? + */ ENGINE(injectionDuration) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX); for (int injEventIndex = 0; injEventIndex < CONFIG(specs.cylindersCount); injEventIndex++) {