better field name
This commit is contained in:
parent
d2c0373d75
commit
d7211d8c64
|
@ -412,9 +412,8 @@ public:
|
|||
/**
|
||||
* pre-calculated offset for given sequence index within engine cycle
|
||||
* (not cylinder ID)
|
||||
* todo: better name?
|
||||
*/
|
||||
angle_t angleExtra[IGNITION_PIN_COUNT];
|
||||
angle_t ignitionPositionWithEngineCycle[IGNITION_PIN_COUNT];
|
||||
/**
|
||||
* pre-calculated reference to which output pin should be used for
|
||||
* given sequence index within engine cycle
|
||||
|
|
|
@ -537,7 +537,7 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
for (int i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
ENGINE(angleExtra[i])= ENGINE(engineCycle) * i / CONFIG(specs.cylindersCount);
|
||||
ENGINE(ignitionPositionWithEngineCycle[i])= ENGINE(engineCycle) * i / CONFIG(specs.cylindersCount);
|
||||
}
|
||||
|
||||
prepareIgnitionPinIndices(CONFIG(ignitionMode) PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -224,7 +224,7 @@ void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFI
|
|||
// todo: clean up this implementation? does not look too nice as is.
|
||||
|
||||
// change of sign here from 'before TDC' to 'after TDC'
|
||||
const angle_t localAdvance = -ENGINE(engineState.timingAdvance) + ENGINE(angleExtra[event->cylinderIndex]) + CONFIG(timing_offset_cylinder[event->cylinderIndex]);
|
||||
const angle_t localAdvance = -ENGINE(engineState.timingAdvance) + ENGINE(ignitionPositionWithEngineCycle[event->cylinderIndex]) + CONFIG(timing_offset_cylinder[event->cylinderIndex]);
|
||||
efiAssertVoid(!cisnan(localAdvance), "localAdvance#1");
|
||||
const int index = ENGINE(ignitionPin[event->cylinderIndex]);
|
||||
const int coilIndex = ID2INDEX(getCylinderId(index PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
|
Loading…
Reference in New Issue