VVT support for VAG trigger #883
This commit is contained in:
parent
2bc9ec019a
commit
e4386be937
|
@ -66,6 +66,7 @@ private:
|
|||
class Engine;
|
||||
class TriggerState;
|
||||
class TriggerFormDetails;
|
||||
class TriggerConfiguration;
|
||||
|
||||
#define GAP_TRACKING_LENGTH 4
|
||||
|
||||
|
@ -250,6 +251,11 @@ public:
|
|||
* See findTriggerZeroEventIndex()
|
||||
*/
|
||||
int triggerShapeSynchPointIndex;
|
||||
|
||||
void initializeSyncPoint(TriggerState *state,
|
||||
const TriggerConfiguration * triggerConfiguration,
|
||||
trigger_config_s const*triggerConfig);
|
||||
|
||||
private:
|
||||
trigger_shape_helper h;
|
||||
|
||||
|
|
|
@ -114,6 +114,16 @@ float actualSynchGap;
|
|||
|
||||
static Logging * logger = nullptr;
|
||||
|
||||
void TriggerWaveform::initializeSyncPoint(TriggerState *state,
|
||||
const TriggerConfiguration * triggerConfiguration,
|
||||
trigger_config_s const*triggerConfig) {
|
||||
triggerShapeSynchPointIndex = state->findTriggerZeroEventIndex(this,
|
||||
triggerConfiguration, triggerConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate 'shape.triggerShapeSynchPointIndex' value using 'TriggerState *state'
|
||||
*/
|
||||
void calculateTriggerSynchPoint(TriggerWaveform *shape,
|
||||
TriggerState *state DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
#if EFI_PROD_CODE
|
||||
|
@ -122,7 +132,7 @@ void calculateTriggerSynchPoint(TriggerWaveform *shape,
|
|||
trigger_config_s const*triggerConfig = &engineConfiguration->trigger;
|
||||
|
||||
engine->triggerErrorDetection.clear();
|
||||
shape->triggerShapeSynchPointIndex = state->findTriggerZeroEventIndex(shape,
|
||||
shape->initializeSyncPoint(state,
|
||||
&engine->primaryTriggerConfiguration,
|
||||
triggerConfig);
|
||||
|
||||
|
|
Loading…
Reference in New Issue