minor trigger refactoring
This commit is contained in:
parent
fd86dc2b0f
commit
43e3fce9b1
|
@ -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) {
|
void TriggerWaveform::setTriggerSynchronizationGap(float syncRatio) {
|
||||||
setTriggerSynchronizationGap3(/*gapIndex*/0, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
|
setTriggerSynchronizationGap3(/*gapIndex*/0, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,6 @@ public:
|
||||||
size_t getSize() const;
|
size_t getSize() const;
|
||||||
|
|
||||||
int getTriggerWaveformSynchPointIndex() const;
|
int getTriggerWaveformSynchPointIndex() const;
|
||||||
void prepareShape(TriggerFormDetails& details);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This private method should only be used to prepare the array of pre-calculated values
|
* This private method should only be used to prepare the array of pre-calculated values
|
||||||
|
|
|
@ -55,7 +55,14 @@ public:
|
||||||
void updateWaveform();
|
void updateWaveform();
|
||||||
|
|
||||||
void prepareTriggerShape() {
|
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
|
// this is useful at least for real hardware integration testing - maybe a proper solution would be to simply
|
||||||
|
|
|
@ -272,5 +272,3 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
angle_t getEngineCycle(operation_mode_e operationMode);
|
angle_t getEngineCycle(operation_mode_e operationMode);
|
||||||
|
|
||||||
void prepareEventAngles(TriggerWaveform *shape, TriggerFormDetails *details);
|
|
||||||
|
|
Loading…
Reference in New Issue