docs
This commit is contained in:
parent
3e8b46b6ca
commit
0a8a0d0b81
|
@ -45,7 +45,7 @@ typedef enum {
|
|||
FO_1_10_9_4_3_6_5_8_7_2 = 14, // dodge and viper ram v10
|
||||
|
||||
// 12 cylinder
|
||||
FO_1_7_5_11_3_9_6_12_2_8_4_10 = 15, // bmw M70 etc
|
||||
FO_1_7_5_11_3_9_6_12_2_8_4_10 = 15, // bmw M70 & M73 etc
|
||||
FO_1_7_4_10_2_8_6_12_3_9_5_11 = 16, // lamborghini, typical rusEfi use-case
|
||||
FO_1_12_5_8_3_10_6_7_2_11_4_9 = 18, // VAG W12
|
||||
|
||||
|
|
|
@ -436,7 +436,10 @@ int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int getIgnitionPinForIndex(int i DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
/**
|
||||
* @param cylinderIndex from 9 to cylinderCount, not cylinder number
|
||||
*/
|
||||
static int getIgnitionPinForIndex(int cylinderIndex DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
switch (getCurrentIgnitionMode(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
case IM_ONE_COIL:
|
||||
return 0;
|
||||
|
@ -446,11 +449,11 @@ static int getIgnitionPinForIndex(int i DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
// we do not want to divide by zero
|
||||
return 0;
|
||||
}
|
||||
return i % (CONFIG(specs.cylindersCount) / 2);
|
||||
return cylinderIndex % (CONFIG(specs.cylindersCount) / 2);
|
||||
}
|
||||
break;
|
||||
case IM_INDIVIDUAL_COILS:
|
||||
return i;
|
||||
return cylinderIndex;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -462,8 +465,8 @@ static int getIgnitionPinForIndex(int i DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
void prepareIgnitionPinIndices(ignition_mode_e ignitionMode DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
if (ignitionMode != engine->ignitionModeForPinIndices) {
|
||||
#if EFI_ENGINE_CONTROL
|
||||
for (int i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
ENGINE(ignitionPin[i]) = getIgnitionPinForIndex(i PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
for (int cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
||||
ENGINE(ignitionPin[cylinderIndex]) = getIgnitionPinForIndex(cylinderIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
#endif /* EFI_ENGINE_CONTROL */
|
||||
engine->ignitionModeForPinIndices = ignitionMode;
|
||||
|
@ -509,7 +512,7 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
for (int i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
ENGINE(ignitionPositionWithinEngineCycle[i])= ENGINE(engineCycle) * i / CONFIG(specs.cylindersCount);
|
||||
ENGINE(ignitionPositionWithinEngineCycle[i]) = ENGINE(engineCycle) * i / CONFIG(specs.cylindersCount);
|
||||
}
|
||||
|
||||
prepareIgnitionPinIndices(CONFIG(ignitionMode) PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
Loading…
Reference in New Issue