only: renaming method

This commit is contained in:
Andrey 2024-02-29 00:26:07 -05:00
parent 98dcca20b1
commit 50b2fccb3b
4 changed files with 6 additions and 6 deletions

View File

@ -160,7 +160,7 @@ bool InjectionEvent::update() {
injectorIndex = 0;
} else if (mode == IM_SEQUENTIAL || mode == IM_BATCH) {
// Map order index -> cylinder index (firing order)
injectorIndex = ID2INDEX(getCylinderId(ownIndex));
injectorIndex = ID2INDEX(getFiringOrderCylinderId(ownIndex));
} else {
firmwareError(ObdCode::CUSTOM_OBD_UNEXPECTED_INJECTION_MODE, "Unexpected injection mode %d", mode);
injectorIndex = 0;
@ -177,7 +177,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 = ID2INDEX(getCylinderId(secondOrder));
int secondIndex = ID2INDEX(getFiringOrderCylinderId(secondOrder));
secondOutput = &enginePins.injectors[secondIndex];
secondOutputStage2 = &enginePins.injectorsStage2[secondIndex];
} else {

View File

@ -117,7 +117,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
engine->outputChannels.currentIgnitionMode = static_cast<uint8_t>(ignitionMode);
const int index = getIgnitionPinForIndex(event->cylinderIndex, ignitionMode);
const int coilIndex = ID2INDEX(getCylinderId(index));
const int coilIndex = ID2INDEX(getFiringOrderCylinderId(index));
IgnitionOutputPin *output = &enginePins.coils[coilIndex];
event->outputs[0] = output;
IgnitionOutputPin *secondOutput;
@ -128,7 +128,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
bool isTwoWireWasted = engineConfiguration->twoWireBatchIgnition || (engineConfiguration->ignitionMode == IM_INDIVIDUAL_COILS);
if (ignitionMode == IM_WASTED_SPARK && isTwoWireWasted) {
int secondIndex = index + engineConfiguration->cylindersCount / 2;
int secondCoilIndex = ID2INDEX(getCylinderId(secondIndex));
int secondCoilIndex = ID2INDEX(getFiringOrderCylinderId(secondIndex));
secondOutput = &enginePins.coils[secondCoilIndex];
assertPinAssigned(secondOutput);
} else {

View File

@ -326,7 +326,7 @@ static const uint8_t* getFiringOrderTable() {
* @param index from zero to cylindersCount - 1
* @return cylinderId from one to cylindersCount
*/
size_t getCylinderId(size_t index) {
size_t getFiringOrderCylinderId(size_t index) {
const size_t firingOrderLength = getFiringOrderLength();
if (firingOrderLength < 1 || firingOrderLength > MAX_CYLINDER_COUNT) {

View File

@ -35,7 +35,7 @@ floatms_t getSparkDwell(int rpm);
ignition_mode_e getCurrentIgnitionMode();
size_t getCylinderId(size_t index);
size_t getFiringOrderCylinderId(size_t index);
size_t getNextFiringCylinderId(size_t prevCylinderId);
void setTimingRpmBin(float from, float to);