only: renaming method
This commit is contained in:
parent
98dcca20b1
commit
50b2fccb3b
|
@ -160,7 +160,7 @@ bool InjectionEvent::update() {
|
||||||
injectorIndex = 0;
|
injectorIndex = 0;
|
||||||
} else if (mode == IM_SEQUENTIAL || mode == IM_BATCH) {
|
} else if (mode == IM_SEQUENTIAL || mode == IM_BATCH) {
|
||||||
// Map order index -> cylinder index (firing order)
|
// Map order index -> cylinder index (firing order)
|
||||||
injectorIndex = ID2INDEX(getCylinderId(ownIndex));
|
injectorIndex = ID2INDEX(getFiringOrderCylinderId(ownIndex));
|
||||||
} else {
|
} else {
|
||||||
firmwareError(ObdCode::CUSTOM_OBD_UNEXPECTED_INJECTION_MODE, "Unexpected injection mode %d", mode);
|
firmwareError(ObdCode::CUSTOM_OBD_UNEXPECTED_INJECTION_MODE, "Unexpected injection mode %d", mode);
|
||||||
injectorIndex = 0;
|
injectorIndex = 0;
|
||||||
|
@ -177,7 +177,7 @@ bool InjectionEvent::update() {
|
||||||
// Each injector gets fired as a primary (the same as sequential), but also
|
// Each injector gets fired as a primary (the same as sequential), but also
|
||||||
// fires the injector 360 degrees later in the firing order.
|
// fires the injector 360 degrees later in the firing order.
|
||||||
int secondOrder = (ownIndex + (engineConfiguration->cylindersCount / 2)) % engineConfiguration->cylindersCount;
|
int secondOrder = (ownIndex + (engineConfiguration->cylindersCount / 2)) % engineConfiguration->cylindersCount;
|
||||||
int secondIndex = ID2INDEX(getCylinderId(secondOrder));
|
int secondIndex = ID2INDEX(getFiringOrderCylinderId(secondOrder));
|
||||||
secondOutput = &enginePins.injectors[secondIndex];
|
secondOutput = &enginePins.injectors[secondIndex];
|
||||||
secondOutputStage2 = &enginePins.injectorsStage2[secondIndex];
|
secondOutputStage2 = &enginePins.injectorsStage2[secondIndex];
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
|
||||||
engine->outputChannels.currentIgnitionMode = static_cast<uint8_t>(ignitionMode);
|
engine->outputChannels.currentIgnitionMode = static_cast<uint8_t>(ignitionMode);
|
||||||
|
|
||||||
const int index = getIgnitionPinForIndex(event->cylinderIndex, 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];
|
IgnitionOutputPin *output = &enginePins.coils[coilIndex];
|
||||||
event->outputs[0] = output;
|
event->outputs[0] = output;
|
||||||
IgnitionOutputPin *secondOutput;
|
IgnitionOutputPin *secondOutput;
|
||||||
|
@ -128,7 +128,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
|
||||||
bool isTwoWireWasted = engineConfiguration->twoWireBatchIgnition || (engineConfiguration->ignitionMode == IM_INDIVIDUAL_COILS);
|
bool isTwoWireWasted = engineConfiguration->twoWireBatchIgnition || (engineConfiguration->ignitionMode == IM_INDIVIDUAL_COILS);
|
||||||
if (ignitionMode == IM_WASTED_SPARK && isTwoWireWasted) {
|
if (ignitionMode == IM_WASTED_SPARK && isTwoWireWasted) {
|
||||||
int secondIndex = index + engineConfiguration->cylindersCount / 2;
|
int secondIndex = index + engineConfiguration->cylindersCount / 2;
|
||||||
int secondCoilIndex = ID2INDEX(getCylinderId(secondIndex));
|
int secondCoilIndex = ID2INDEX(getFiringOrderCylinderId(secondIndex));
|
||||||
secondOutput = &enginePins.coils[secondCoilIndex];
|
secondOutput = &enginePins.coils[secondCoilIndex];
|
||||||
assertPinAssigned(secondOutput);
|
assertPinAssigned(secondOutput);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -326,7 +326,7 @@ static const uint8_t* getFiringOrderTable() {
|
||||||
* @param index from zero to cylindersCount - 1
|
* @param index from zero to cylindersCount - 1
|
||||||
* @return cylinderId from one to cylindersCount
|
* @return cylinderId from one to cylindersCount
|
||||||
*/
|
*/
|
||||||
size_t getCylinderId(size_t index) {
|
size_t getFiringOrderCylinderId(size_t index) {
|
||||||
const size_t firingOrderLength = getFiringOrderLength();
|
const size_t firingOrderLength = getFiringOrderLength();
|
||||||
|
|
||||||
if (firingOrderLength < 1 || firingOrderLength > MAX_CYLINDER_COUNT) {
|
if (firingOrderLength < 1 || firingOrderLength > MAX_CYLINDER_COUNT) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ floatms_t getSparkDwell(int rpm);
|
||||||
|
|
||||||
ignition_mode_e getCurrentIgnitionMode();
|
ignition_mode_e getCurrentIgnitionMode();
|
||||||
|
|
||||||
size_t getCylinderId(size_t index);
|
size_t getFiringOrderCylinderId(size_t index);
|
||||||
size_t getNextFiringCylinderId(size_t prevCylinderId);
|
size_t getNextFiringCylinderId(size_t prevCylinderId);
|
||||||
|
|
||||||
void setTimingRpmBin(float from, float to);
|
void setTimingRpmBin(float from, float to);
|
||||||
|
|
Loading…
Reference in New Issue