rusefi-1/firmware/controllers/trigger/decoders/trigger_nissan.cpp

40 lines
1.0 KiB
C++
Raw Normal View History

2015-09-19 16:01:46 -07:00
/**
* @file trigger_nissan.cpp
*
* @date Sep 19, 2015
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2015-09-19 16:01:46 -07:00
*/
#include "trigger_nissan.h"
2017-03-18 17:59:52 -07:00
/**
* Nissan Primera p11 year 1995-2002
*/
2017-03-18 17:18:21 -07:00
void initializeNissanSR20VE(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
2015-10-29 11:02:52 -07:00
s->initialize(FOUR_STROKE_CAM_SENSOR, false);
2017-03-18 17:59:52 -07:00
s->isSynchronizationNeeded = true;
s->gapBothDirections = true;
2015-09-19 17:01:38 -07:00
float w = 5;
2017-03-22 04:07:02 -07:00
s->setTriggerSynchronizationGap2(9.67 * 0.75, 16);
2015-09-19 17:01:38 -07:00
float base = 180;
2017-03-18 17:59:52 -07:00
s->addEvent2(base - 15, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
2017-03-18 17:18:21 -07:00
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
2015-09-19 17:01:38 -07:00
2015-12-28 15:01:45 -08:00
// was is the the one with 360 opto sensor?
2015-09-19 17:01:38 -07:00
base += 180;
2017-03-18 17:18:21 -07:00
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
2015-09-19 17:01:38 -07:00
base += 180;
2017-03-18 17:18:21 -07:00
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
2015-09-19 17:01:38 -07:00
2017-03-18 17:18:21 -07:00
base += 180;
2016-10-31 19:02:12 -07:00
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
2015-09-19 16:01:46 -07:00
}