2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file trigger_mitsubishi.cpp
|
|
|
|
*
|
|
|
|
* @date Aug 5, 2014
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "trigger_mitsubishi.h"
|
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
void configureFordAspireTriggerShape(TriggerShape * s DECLARE_ENGINE_PARAMETER_S) {
|
2015-10-29 11:02:52 -07:00
|
|
|
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
2015-10-29 15:01:16 -07:00
|
|
|
s->isSynchronizationNeeded = false;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
float x = 121.90;
|
|
|
|
float y = 110.86;
|
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
s->addEvent2(x + y - 180, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(x, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(x + y, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(x + 180, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(360, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
|
|
|
|
s->addEvent2(x + 180 + y, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(x + 360, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(x + 360 + y, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(x + 540, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(720, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
2016-06-12 07:01:41 -07:00
|
|
|
s->useOnlyPrimaryForSync = true;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
void initializeMitsubishi4g18(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
2015-10-29 11:02:52 -07:00
|
|
|
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
2015-07-10 06:01:56 -07:00
|
|
|
s->useRiseEdge = false;
|
|
|
|
|
|
|
|
s->setTriggerSynchronizationGap(1.6666);
|
|
|
|
|
|
|
|
int secondaryWidth = 70;
|
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
s->addEvent2(180.0 - 131 + 5, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(180.0 - secondaryWidth, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(180.0, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(180.0 + 49 + 5, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
s->addEvent2(360.0 - secondaryWidth, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(360.0, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
s->addEvent2(540.0 - 131 + 5, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(540.0 - secondaryWidth, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(540.0 - 131 + 5 + 90, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(540.0, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2016-10-31 19:02:12 -07:00
|
|
|
s->addEvent2(720.0 - secondaryWidth, T_SECONDARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(720.0, T_SECONDARY, TV_FALL PASS_ENGINE_PARAMETER);
|
2016-06-13 23:01:37 -07:00
|
|
|
s->useOnlyPrimaryForSync = true;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|