From 9c72cf3e6a0c6e9e399e4f2ceb3bec4f61388a08 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 9 Feb 2015 15:04:09 -0600 Subject: [PATCH] auto-sync --- firmware/controllers/algo/engine.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 6734a5abb7..15ebd63b21 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -50,7 +50,15 @@ Engine::Engine() { } void Engine::precalc(engine_configuration_s *engineConfiguration) { - sparkTable.preCalc(engineConfiguration->sparkDwellBins, engineConfiguration->sparkDwell); + sparkTable.preCalc(engineConfiguration->sparkDwellBins, + engineConfiguration->sparkDwell); + + for (int i = 0; i < MAF_DECODING_CACHE_SIZE; i++) { + float volts = i / MAF_DECODING_CACHE_MULT; + float maf = interpolate2d(volts, mafDecodingBins, mafDecoding, + MAF_DECODING_COUNT); + } + } void Engine::init() { @@ -110,7 +118,8 @@ StartupFuelPumping::StartupFuelPumping() { pumpsCounter = 0; } -void StartupFuelPumping::setPumpsCounter(engine_configuration_s *engineConfiguration, int newValue) { +void StartupFuelPumping::setPumpsCounter( + engine_configuration_s *engineConfiguration, int newValue) { if (pumpsCounter != newValue) { pumpsCounter = newValue;