From be9a67e67ed15f6993062736ad772eee618e9a6e Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 27 Oct 2019 16:19:59 -0400 Subject: [PATCH] IM_TWO_COILS --- firmware/controllers/math/engine_math.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 4bbfec0ae5..bd08322804 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -443,7 +443,6 @@ static int getIgnitionPinForIndex(int cylinderIndex DECLARE_ENGINE_PARAMETER_SUF switch (getCurrentIgnitionMode(PASS_ENGINE_PARAMETER_SIGNATURE)) { case IM_ONE_COIL: return 0; - break; case IM_WASTED_SPARK: { if (CONFIG(specs.cylindersCount) == 1) { // we do not want to divide by zero @@ -451,10 +450,10 @@ static int getIgnitionPinForIndex(int cylinderIndex DECLARE_ENGINE_PARAMETER_SUF } return cylinderIndex % (CONFIG(specs.cylindersCount) / 2); } - break; case IM_INDIVIDUAL_COILS: return cylinderIndex; - break; + case IM_TWO_COILS: + return cylinderIndex % 2; default: warning(CUSTOM_OBD_IGNITION_MODE, "unsupported ignitionMode %d in getIgnitionPinForIndex()", engineConfiguration->ignitionMode);