refactoring trigger sync layer
This commit is contained in:
parent
5fda164806
commit
fb34e5f36e
|
@ -268,12 +268,6 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
|||
}
|
||||
|
||||
|
||||
// isGapCondition[1] = cisnan(TRIGGER_SHAPE(syncronizationRatioFrom[1])) || (toothDurations[1] > toothDurations[2] * TRIGGER_SHAPE(syncronizationRatioFrom[1])
|
||||
// && toothDurations[1] < toothDurations[2] * TRIGGER_SHAPE(syncronizationRatioTo[1]));
|
||||
//
|
||||
// isGapCondition[2] = cisnan(TRIGGER_SHAPE(syncronizationRatioFrom[2])) || (toothDurations[2] > toothDurations[3] * TRIGGER_SHAPE(syncronizationRatioFrom[2])
|
||||
// && toothDurations[2] < toothDurations[3] * TRIGGER_SHAPE(syncronizationRatioTo[2]));
|
||||
|
||||
/**
|
||||
* Here I prefer to have two multiplications instead of one division, that's a micro-optimization
|
||||
*/
|
||||
|
|
|
@ -103,13 +103,12 @@ void TriggerShape::initialize(operation_mode_e operationMode, bool needSecondTri
|
|||
memset(expectedDutyCycle, 0, sizeof(expectedDutyCycle));
|
||||
memset(eventAngles, 0, sizeof(eventAngles));
|
||||
// memset(triggerIndexByAngle, 0, sizeof(triggerIndexByAngle));
|
||||
|
||||
setTriggerSynchronizationGap(2);
|
||||
|
||||
syncronizationRatioFrom[1] = NAN; // NaN means do not use this ratio
|
||||
syncronizationRatioTo[1] = 100000;
|
||||
syncronizationRatioFrom[2] = NAN; // NaN means do not use this ratio
|
||||
syncronizationRatioTo[2] = 100000;
|
||||
|
||||
for (int index = 1; index < GAP_TRACKING_LENGHT ; index++) {
|
||||
// NaN means do not use this gap ratio
|
||||
setTriggerSynchronizationGap3(index, NAN, 100000);
|
||||
}
|
||||
|
||||
tdcPosition = 0;
|
||||
shapeDefinitionError = useOnlyPrimaryForSync = false;
|
||||
|
|
Loading…
Reference in New Issue