From 43f11c44259e1b3bf8ca2e0b834037209e41a4fd Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 6 Nov 2017 19:00:30 -0500 Subject: [PATCH] #487 --- firmware/controllers/algo/auto_generated_enums.cpp | 2 ++ firmware/controllers/algo/fuel_math.cpp | 1 + firmware/controllers/algo/rusefi_enums.h | 8 ++++++++ firmware/controllers/math/engine_math.cpp | 2 +- firmware/integration/rusefi_config.txt | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index ee4ab6c268..810e2c399e 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -445,6 +445,8 @@ case IM_SEQUENTIAL: return "IM_SEQUENTIAL"; case IM_SIMULTANEOUS: return "IM_SIMULTANEOUS"; +case IM_SINGLE_POINT: + return "IM_SINGLE_POINT"; } return NULL; } diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index b68c3e6830..d559ea96bd 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -109,6 +109,7 @@ int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX) case IM_SIMULTANEOUS: return engineConfiguration->specs.cylindersCount; case IM_SEQUENTIAL: + case IM_SINGLE_POINT: return 1; case IM_BATCH: return 2; diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 9569daffe6..8add498c6e 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -423,6 +423,9 @@ typedef enum { * @see getNumberOfInjections */ typedef enum { + /** + * each cylinder has it's own injector but they all works in parallel + */ IM_SIMULTANEOUS = 0, /** * each cylinder has it's own injector, each injector is wired separately @@ -432,6 +435,11 @@ typedef enum { * each cylinder has it's own injector but these injectors work in pairs. Injectors could be wired in pairs or separately. */ IM_BATCH = 2, + /** + * only one injector located in throttle body + */ + IM_SINGLE_POINT = 3, + Force_4b_injection_mode = ENUM_32_BITS, } injection_mode_e; diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index bf94ad1b0d..9ba2da499b 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -142,7 +142,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF injection_mode_e mode = engine->getCurrentInjectionMode(PASS_ENGINE_PARAMETER_SIGNATURE); - if (mode == IM_SIMULTANEOUS) { + if (mode == IM_SIMULTANEOUS || mode == IM_SINGLE_POINT) { index = 0; } else if (mode == IM_SEQUENTIAL) { index = getCylinderId(i PASS_ENGINE_PARAMETER_SUFFIX) - 1; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index fe0ff6eb77..fd2955cbc0 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -295,7 +295,7 @@ custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:1], @@engine_load_mode_e_enu engine_load_mode_e fuelAlgorithm;+This setting controls which fuel quantity control algorithm is used.\nset algorithm X -custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "INVALID" +custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "Single Point" injection_mode_e crankingInjectionMode; injection_mode_e injectionMode;+'batched' means two injectors are wired together\nset injection_mode X angle_t extraInjectionOffset;+this is about deciding when the injector starts it's squirt\nSee also injectionPhase map\ntodo: do we need even need this since we have the map anyway?;"deg", 1, 0.0, -720, 720, 2