From ba7c47dd3c0115d2d40c410256109dbc0f7a3f5b Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 29 Jul 2020 01:35:17 -0700 Subject: [PATCH 1/2] remove --- .../kinetis/config/controllers/algo/auto_generated_enums.cpp | 2 -- firmware/controllers/algo/auto_generated_enums.cpp | 2 -- firmware/controllers/algo/rusefi_enums.h | 4 ---- firmware/controllers/math/engine_math.cpp | 5 +---- firmware/tunerstudio/rusefi.input | 2 -- 5 files changed, 1 insertion(+), 14 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index df70037513..6be9fd2d6e 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -587,8 +587,6 @@ const char *getEngine_load_mode_e(engine_load_mode_e value){ switch(value) { case Force_4_bytes_size_engine_load_mode: return "Force_4_bytes_size_engine_load_mode"; -case LM_ALPHA_N: - return "LM_ALPHA_N"; case LM_PLAIN_MAF: return "LM_PLAIN_MAF"; case LM_REAL_MAF: diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index f7b61ecdb6..7f068198c8 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -725,8 +725,6 @@ const char *getEngine_load_mode_e(engine_load_mode_e value){ switch(value) { case Force_4_bytes_size_engine_load_mode: return "Force_4_bytes_size_engine_load_mode"; -case LM_ALPHA_N: - return "LM_ALPHA_N"; case LM_PLAIN_MAF: return "LM_PLAIN_MAF"; case LM_REAL_MAF: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 915318e7b4..dbc8d84940 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -428,10 +428,6 @@ typedef enum { * raw Mass Air Flow sensor value algorithm. http://en.wikipedia.org/wiki/Mass_flow_sensor */ LM_PLAIN_MAF = 0, - /** - * Throttle Position Sensor value is used as engine load. http://en.wikipedia.org/wiki/Throttle_position_sensor - */ - LM_ALPHA_N = 1, /** * Speed Density algorithm - Engine Load is a function of MAP, VE and target AFR * http://articles.sae.org/8539/ diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index b96015b859..deeaa4fe40 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -74,7 +74,6 @@ float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return getMafVoltage(PASS_ENGINE_PARAMETER_SIGNATURE); case LM_SPEED_DENSITY: return getMap(PASS_ENGINE_PARAMETER_SIGNATURE); - case LM_ALPHA_N: case LM_ALPHA_N_2: return Sensor::get(SensorType::Tps1).value_or(0); case LM_REAL_MAF: @@ -446,9 +445,7 @@ void setTimingLoadBin(float from, float to DECLARE_CONFIG_PARAMETER_SUFFIX) { */ void setAlgorithm(engine_load_mode_e algo DECLARE_CONFIG_PARAMETER_SUFFIX) { engineConfiguration->fuelAlgorithm = algo; - if (algo == LM_ALPHA_N) { - setTimingLoadBin(20, 120 PASS_CONFIG_PARAMETER_SUFFIX); - } else if (algo == LM_SPEED_DENSITY) { + if (algo == LM_SPEED_DENSITY) { setLinearCurve(config->ignitionLoadBins, 20, 120, 3); buildTimingMap(35 PASS_CONFIG_PARAMETER_SUFFIX); } diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 0f6f6f1f55..ea78d1ba2f 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -355,7 +355,6 @@ enable2ndByteCanID = false ; todo: generate this section programatically LM_PLAIN_MAF = {0}, - LM_ALPHA_N = {1}, LM_SPEED_DENSITY = {3}, LM_REAL_MAF = {4} @@ -1517,7 +1516,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" [UserDefined] dialog = fuelTableBottomDialog, "", card panel = fuelTableMAFTbl, Center, {fuelAlgorithm==LM_PLAIN_MAF} - panel = fuelTableTPSTbl, Center, {fuelAlgorithm==LM_ALPHA_N} panel = fuelTableELTbl, Center dialog = fuelTableRight, "", yAxis From bb60e13c3afe4a4b00d7b2d5c04842e1b111f6b0 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 29 Jul 2020 01:35:39 -0700 Subject: [PATCH 2/2] configs --- firmware/config/engines/bmw_m73_mre.cpp | 2 +- firmware/config/engines/citroenBerlingoTU3JP.cpp | 2 +- firmware/config/engines/dodge_neon.cpp | 4 +--- firmware/config/engines/honda_600.cpp | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/firmware/config/engines/bmw_m73_mre.cpp b/firmware/config/engines/bmw_m73_mre.cpp index 1e159892d8..2c3c7414ea 100644 --- a/firmware/config/engines/bmw_m73_mre.cpp +++ b/firmware/config/engines/bmw_m73_mre.cpp @@ -125,7 +125,7 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) { CONFIG(crankingTimingAngle) = 15; // I am too lazy to add MAP sensor - engineConfiguration->fuelAlgorithm = LM_ALPHA_N; + engineConfiguration->fuelAlgorithm = LM_ALPHA_N_2; // set cranking_fuel 15 engineConfiguration->cranking.baseFuel = 15; diff --git a/firmware/config/engines/citroenBerlingoTU3JP.cpp b/firmware/config/engines/citroenBerlingoTU3JP.cpp index 5891f4f696..1a256784a1 100644 --- a/firmware/config/engines/citroenBerlingoTU3JP.cpp +++ b/firmware/config/engines/citroenBerlingoTU3JP.cpp @@ -95,7 +95,7 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { /** * Algorithm Alpha-N setting */ - setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX); + setAlgorithm(LM_ALPHA_N_2 PASS_CONFIG_PARAMETER_SUFFIX); setFuelLoadBin(0, 100 PASS_CONFIG_PARAMETER_SUFFIX); setFuelRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX); setTimingRpmBin(800, 7000 PASS_CONFIG_PARAMETER_SUFFIX); diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 8d59d646b1..6dafe69330 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -147,7 +147,7 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->trigger.type = TT_DODGE_NEON_1995; - engineConfiguration->fuelAlgorithm = LM_ALPHA_N; + engineConfiguration->fuelAlgorithm = LM_ALPHA_N_2; // engineConfiguration->spi2SckMode = PAL_STM32_OTYPE_OPENDRAIN; // 4 // engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4 @@ -299,8 +299,6 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { */ engineConfiguration->injector.flow = 199; - //engineConfiguration->fuelAlgorithm = LM_ALPHA_N; // I want to start with a simple Alpha-N - setFuelLoadBin(0, 100 PASS_CONFIG_PARAMETER_SUFFIX); setLinearCurve(config->ignitionLoadBins, 20, 120, 1); diff --git a/firmware/config/engines/honda_600.cpp b/firmware/config/engines/honda_600.cpp index 736985fba8..c67dd2ac97 100644 --- a/firmware/config/engines/honda_600.cpp +++ b/firmware/config/engines/honda_600.cpp @@ -66,7 +66,7 @@ static void setDefaultCustomMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); engineConfiguration->trigger.type = TT_HONDA_CBR_600_CUSTOM; - engineConfiguration->fuelAlgorithm = LM_ALPHA_N; + engineConfiguration->fuelAlgorithm = LM_ALPHA_N_2; // upside down wiring engineConfiguration->triggerInputPins[0] = GPIOA_5; @@ -150,7 +150,7 @@ void setHonda600(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->injectionPins[3] = GPIOB_8; // #4 setDefaultCustomMaps(PASS_CONFIG_PARAMETER_SIGNATURE); - setAlgorithm(LM_ALPHA_N PASS_CONFIG_PARAMETER_SUFFIX); + setAlgorithm(LM_ALPHA_N_2 PASS_CONFIG_PARAMETER_SUFFIX); engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;