nissan 4/360 progress

This commit is contained in:
rusefi 2017-04-02 17:36:59 -04:00
parent f6a33aa014
commit cbc77ef07b
2 changed files with 18 additions and 8 deletions

View File

@ -7,14 +7,11 @@
#include "trigger_nissan.h"
/**
* Nissan Primera p11 year 1995-2002
*/
void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
s->initialize(FOUR_STROKE_CAM_SENSOR, false);
static void initializeNissanSR20VE_4_optional_360(TriggerShape *s, bool with2nd DECLARE_ENGINE_PARAMETER_S) {
s->initialize(FOUR_STROKE_CAM_SENSOR, with2nd);
s->isSynchronizationNeeded = true;
s->gapBothDirections = true;
s->useOnlyPrimaryForSync = true;
s->tdcPosition = 630;
@ -38,8 +35,18 @@ void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
base += 180;
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
}
/**
* Nissan Primera p11 year 1995-2002
*/
void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
initializeNissanSR20VE_4_optional_360(s, false PASS_ENGINE_PARAMETER);
}
void initializeNissanSR20VE_4_360(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
initializeNissanSR20VE_4_optional_360(s, true PASS_ENGINE_PARAMETER);
}

View File

@ -634,10 +634,13 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
break;
case TT_NISSAN_SR20VE:
case TT_TEMP_WIP:
initializeNissanSR20VE_4(this PASS_ENGINE_PARAMETER);
break;
case TT_TEMP_WIP:
initializeNissanSR20VE_4_360(this PASS_ENGINE_PARAMETER);
break;
case TT_ROVER_K:
initializeRoverK(this PASS_ENGINE_PARAMETER);
break;