diff --git a/firmware/controllers/engine_cycle/fuel_schedule.cpp b/firmware/controllers/engine_cycle/fuel_schedule.cpp index ce738fbe79..fdac9b6bd1 100644 --- a/firmware/controllers/engine_cycle/fuel_schedule.cpp +++ b/firmware/controllers/engine_cycle/fuel_schedule.cpp @@ -143,7 +143,7 @@ bool InjectionEvent::update() { injectorIndex = 0; } else if (mode == IM_SEQUENTIAL || mode == IM_BATCH) { // Map order index -> cylinder index (firing order) - injectorIndex = getCylinderId(ownIndex) - 1; + injectorIndex = ID2INDEX(getCylinderId(ownIndex)); } else { firmwareError(ObdCode::CUSTOM_OBD_UNEXPECTED_INJECTION_MODE, "Unexpected injection mode %d", mode); injectorIndex = 0; @@ -159,7 +159,7 @@ bool InjectionEvent::update() { // Each injector gets fired as a primary (the same as sequential), but also // fires the injector 360 degrees later in the firing order. int secondOrder = (ownIndex + (engineConfiguration->cylindersCount / 2)) % engineConfiguration->cylindersCount; - int secondIndex = getCylinderId(secondOrder) - 1; + int secondIndex = ID2INDEX(getCylinderId(secondOrder)); secondOutput = &enginePins.injectors[secondIndex]; } else { secondOutput = nullptr;