108 lines
5.0 KiB
C++
108 lines
5.0 KiB
C++
/**
|
|
* @file trigger_gm.cpp
|
|
*
|
|
* @date Mar 28, 2014
|
|
* @author Andrey Belomutskiy, (c) 2012-2016
|
|
*/
|
|
|
|
#include "trigger_gm.h"
|
|
|
|
// GM7X looks like this is not complete
|
|
void configureGmTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
|
s->initialize(FOUR_STROKE_CAM_SENSOR, false);
|
|
|
|
// all angles are x2 here - so, 5 degree width is 10
|
|
float w = 10;
|
|
|
|
s->addEvent2(120 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(120.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(240 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(240.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(360 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(360.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(480 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(480.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(600 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(600.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(700 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(700.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->addEvent2(720 - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(720.0, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
|
}
|
|
|
|
/**
|
|
* https://www.mediafire.com/?40mfgeoe4ctti
|
|
* http://www.ls1gto.com/forums/archive/index.php/t-190549.htm
|
|
* http://www.ls2.com/forums/showthread.php/834483-LS-Timing-Reluctor-Wheels-Explained
|
|
*
|
|
*/
|
|
void initGmLS24(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
|
s->initialize(FOUR_STROKE_CRANK_SENSOR, false);
|
|
trigger_wheel_e ch = T_PRIMARY;
|
|
|
|
/**
|
|
* based on http://rusefi.com/forum/viewtopic.php?f=3&t=936&start=30 logs
|
|
*/
|
|
s->addEvent2(22.2733333333334, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(27.59333333333338, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(51.18333333333338, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(57.58333333333338, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(81.17333333333337, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(87.61333333333339, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(111.30666666666671, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(117.81000000000004, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(141.50000000000006, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(148.05666666666673, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(153.41333333333338, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(178.29333333333338, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(183.51000000000005, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(208.3266666666667, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(213.50000000000006, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(238.26000000000005, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(243.51000000000005, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(268.27000000000004, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(273.53666666666675, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(298.35, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(321.86333333333334, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(328.4966666666667, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(333.81000000000006, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(358.66, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(363.8633333333334, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(388.7033333333334, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(393.88000000000005, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(418.62000000000006, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(441.9566666666667, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(448.6700000000001, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(472.1000000000001, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(478.9333333333334, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(484.08000000000004, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(509.1333333333334, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(514.2666666666667, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(539.1733333333334, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(562.5166666666668, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(569.1133333333333, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(592.5400000000001, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(599.1433333333334, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(622.6300000000001, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(629.2633333333334, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(634.6, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(659.5, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(683.1133333333333, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(689.77, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(695.0666666666667, ch, TV_RISE PASS_ENGINE_PARAMETER);
|
|
s->addEvent2(720.0, ch, TV_FALL PASS_ENGINE_PARAMETER);
|
|
|
|
s->useOnlyPrimaryForSync = true;
|
|
|
|
s->setTriggerSynchronizationGap(1.6);
|
|
s->setSecondTriggerSynchronizationGap(1);
|
|
s->setThirdTriggerSynchronizationGap(2.5);
|
|
}
|
|
|