static void configureOnePlus60_2(TriggerShape *s, operation_mode_e operationMode) { s->reset(FOUR_STROKE_CAM_SENSOR, true); int totalTeethCount = 60; int skippedCount = 2; s->addEvent(2, T_PRIMARY, TV_HIGH); addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 360, 2, 20); s->addEvent(20, T_PRIMARY, TV_LOW); addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 360, 20, NO_RIGHT_FILTER); addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 360, 360, NO_LEFT_FILTER, NO_RIGHT_FILTER); s->isSynchronizationNeeded = false; }
void setVwConfiguration(TriggerShape *s) { efiAssertVoid(s != NULL, "TriggerShape is NULL"); operation_mode_e operationMode = FOUR_STROKE_CRANK_SENSOR; s->useRiseEdge = true; initializeSkippedToothTriggerShapeExt(s, 60, 2, operationMode); s->isSynchronizationNeeded = true; s->reset(operationMode, false); int totalTeethCount = 60; int skippedCount = 2; float engineCycle = getEngineCycle(operationMode); float toothWidth = 0.5; addSkippedToothTriggerEvents(T_PRIMARY, s, 60, 2, toothWidth, 0, engineCycle, NO_LEFT_FILTER, 690); float angleDown = engineCycle / totalTeethCount * (totalTeethCount - skippedCount - 1 + (1 - toothWidth) ); s->addEvent(0 + angleDown + 12, T_PRIMARY, TV_HIGH, NO_LEFT_FILTER, NO_RIGHT_FILTER); s->addEvent(0 + engineCycle, T_PRIMARY, TV_LOW, NO_LEFT_FILTER, NO_RIGHT_FILTER); s->setTriggerSynchronizationGap2(1.6, 4); }
void configureOnePlus60_2(TriggerShape *s, operation_mode_e operationMode) { s->initialize(FOUR_STROKE_CAM_SENSOR, true); int totalTeethCount = 60; int skippedCount = 2; s->addEvent720(2, T_PRIMARY, TV_RISE); addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 360, 2, 20); s->addEvent720(20, T_PRIMARY, TV_FALL); addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 360, 20, NO_RIGHT_FILTER); addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 360, 360, NO_LEFT_FILTER, NO_RIGHT_FILTER); s->isSynchronizationNeeded = false; s->useOnlyPrimaryForSync = true; }
void initializeSkippedToothTriggerShapeExt(TriggerShape *s, int totalTeethCount, int skippedCount, operation_mode_e operationMode) { efiAssertVoid(totalTeethCount > 0, "totalTeethCount is zero"); efiAssertVoid(s != NULL, "TriggerShape is NULL"); s->initialize(operationMode, false); s->setTriggerSynchronizationGap(skippedCount + 1); s->isSynchronizationNeeded = (skippedCount != 0); addSkippedToothTriggerEvents(T_PRIMARY, s, totalTeethCount, skippedCount, 0.5, 0, getEngineCycle(operationMode), NO_LEFT_FILTER, NO_RIGHT_FILTER); }
void initializeSkippedToothTriggerShapeExt(TriggerShape *s, int totalTeethCount, int skippedCount, operation_mode_e operationMode) { if (totalTeethCount <= 0) { warning(CUSTOM_OBD_TRIGGER_SHAPE, "totalTeethCount is zero or less: %d", totalTeethCount); s->shapeDefinitionError = true; return; } efiAssertVoid(CUSTOM_ERR_6588, s != NULL, "TriggerShape is NULL"); s->initialize(operationMode, false); s->setTriggerSynchronizationGap(skippedCount + 1); s->isSynchronizationNeeded = (totalTeethCount > 2) && (skippedCount != 0); addSkippedToothTriggerEvents(T_PRIMARY, s, totalTeethCount, skippedCount, 0.5, 0, getEngineCycle(operationMode), NO_LEFT_FILTER, NO_RIGHT_FILTER); }