minor trigger refactoring

This commit is contained in:
rusefillc 2022-11-05 22:42:33 -04:00
parent 6402e61484
commit 4c3c34518a
4 changed files with 8 additions and 15 deletions

View File

@ -426,17 +426,6 @@ void findTriggerPosition(TriggerWaveform *triggerShape,
}
}
void TriggerWaveform::prepareShape(TriggerFormDetails& details) {
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
if (shapeDefinitionError) {
// Nothing to do here if there's a problem with the trigger shape
return;
}
details.prepareEventAngles(this);
#endif
}
void TriggerWaveform::setTriggerSynchronizationGap(float syncRatio) {
setTriggerSynchronizationGap3(/*gapIndex*/0, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
}

View File

@ -223,7 +223,6 @@ public:
size_t getSize() const;
int getTriggerWaveformSynchPointIndex() const;
void prepareShape(TriggerFormDetails& details);
/**
* This private method should only be used to prepare the array of pre-calculated values

View File

@ -55,7 +55,14 @@ public:
void updateWaveform();
void prepareTriggerShape() {
triggerShape.prepareShape(triggerFormDetails);
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
if (triggerShape.shapeDefinitionError) {
// Nothing to do here if there's a problem with the trigger shape
return;
}
triggerFormDetails.prepareEventAngles(&triggerShape);
#endif
}
// this is useful at least for real hardware integration testing - maybe a proper solution would be to simply

View File

@ -272,5 +272,3 @@ public:
};
angle_t getEngineCycle(operation_mode_e operationMode);
void prepareEventAngles(TriggerWaveform *shape, TriggerFormDetails *details);