From 09a2a885bc749f212f96e22a853a52ef5696c470 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 11 Mar 2016 14:03:23 -0500 Subject: [PATCH] auto-sync --- .../controllers/algo/accel_enrichment.cpp | 20 ++++++++++++------- firmware/tunerstudio/rusefi.ini | 4 ++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index 3f4ed0c15c..cea097ec7a 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -112,20 +112,26 @@ floatms_t AccelEnrichmemnt::getTpsEnrichment(DECLARE_ENGINE_PARAMETER_F) { float deltaMult = tpsTpsMap.getValue(tpsFrom, tpsTo); + float result; + if (d > engineConfiguration->tpsAccelEnrichmentThreshold) { + result = deltaMult; + } else if (d < -engineConfiguration->tpsDecelEnleanmentThreshold) { + result= d * engineConfiguration->tpsDecelEnleanmentMultiplier; + } else { + result = 0; + } + #if !EFI_UNIT_TEST if (engineConfiguration->debugMode == DBG_TPS_ACCEL) { tsOutputChannels.debugFloatField1 = tpsFrom; tsOutputChannels.debugFloatField2 = tpsTo; + tsOutputChannels.debugFloatField3 = deltaMult; + tsOutputChannels.debugFloatField4 = result; } #endif - if (d > engineConfiguration->tpsAccelEnrichmentThreshold) { - return deltaMult; - } - if (d < -engineConfiguration->tpsDecelEnleanmentThreshold) { - return d * engineConfiguration->tpsDecelEnleanmentMultiplier; - } - return 0; + + return result; } float AccelEnrichmemnt::getEngineLoadEnrichment(DECLARE_ENGINE_PARAMETER_F) { diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 5ac64aeed6..182c0ca049 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -880,8 +880,8 @@ fileVersion = { 20160122 } upDownLabel = "(RICHER)", "(LEANER)" table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS acceleration", 1 - xBins = tpsTpsAccelFromRpmBins, tps - yBins = tpsTpsAccelToRpmBins, tps + xBins = tpsTpsAccelFromRpmBins, TPS + yBins = tpsTpsAccelToRpmBins, TPS zBins = tpsTpsAccelTable