refactoring

This commit is contained in:
Andrey 2021-07-17 00:53:23 -04:00
parent 4a0f9bebf6
commit d583c91a7a
2 changed files with 70 additions and 73 deletions

View File

@ -29,73 +29,72 @@ void configureNeon2003TriggerWaveformCrank(TriggerWaveform *s DECLARE_ENGINE_PAR
s->useRiseEdge = true;
s->setTriggerSynchronizationGap(3);
int m = CRANK_MODE_MULTIPLIER;
s->addEvent720(m * 25, T_PRIMARY, TV_FALL);
s->addEvent720(m * 30, T_PRIMARY, TV_RISE);
s->addEvent720(m * 35, T_PRIMARY, TV_FALL);
s->addEvent720(m * 40, T_PRIMARY, TV_RISE);
s->addEvent720(m * 45, T_PRIMARY, TV_FALL);
s->addEvent720(m * 50, T_PRIMARY, TV_RISE);
s->addEvent720(m * 55, T_PRIMARY, TV_FALL);
s->addEvent720(m * 60, T_PRIMARY, TV_RISE);
s->addEvent720(m * 65, T_PRIMARY, TV_FALL);
s->addEvent720(m * 70, T_PRIMARY, TV_RISE);
s->addEvent720(m * 75, T_PRIMARY, TV_FALL);
s->addEvent720(m * 80, T_PRIMARY, TV_RISE);
s->addEvent720(m * 85, T_PRIMARY, TV_FALL);
s->addEvent720(m * 90, T_PRIMARY, TV_RISE);
s->addEvent720(m * 95, T_PRIMARY, TV_FALL);
s->addEvent720(m * 100, T_PRIMARY, TV_RISE);
s->addEvent720(m * 105, T_PRIMARY, TV_FALL);
s->addEvent720(m * 110, T_PRIMARY, TV_RISE);
s->addEvent720(m * 115, T_PRIMARY, TV_FALL);
s->addEvent720(m * 120, T_PRIMARY, TV_RISE);
s->addEvent720(m * 125, T_PRIMARY, TV_FALL);
s->addEvent720(m * 130, T_PRIMARY, TV_RISE);
s->addEvent720(m * 135, T_PRIMARY, TV_FALL);
s->addEvent720(m * 140, T_PRIMARY, TV_RISE);
s->addEvent720(m * 145,T_PRIMARY, TV_FALL);
s->addEvent720(m * 150, T_PRIMARY, TV_RISE);
s->addEvent720(m * 155, T_PRIMARY, TV_FALL);
s->addEvent720(m * 160, T_PRIMARY, TV_RISE);
s->addEvent720(m * 165, T_PRIMARY, TV_FALL);
s->addEvent720(m * 170, T_PRIMARY, TV_RISE);
s->addEvent720(m * 175, T_PRIMARY, TV_FALL);
s->addEvent720(m * 180, T_PRIMARY, TV_RISE);
s->addEvent720(m * 185, T_PRIMARY, TV_FALL);
s->addEvent360(25, T_PRIMARY, TV_FALL);
s->addEvent360(30, T_PRIMARY, TV_RISE);
s->addEvent360(35, T_PRIMARY, TV_FALL);
s->addEvent360(40, T_PRIMARY, TV_RISE);
s->addEvent360(45, T_PRIMARY, TV_FALL);
s->addEvent360(50, T_PRIMARY, TV_RISE);
s->addEvent360(55, T_PRIMARY, TV_FALL);
s->addEvent360(60, T_PRIMARY, TV_RISE);
s->addEvent360(65, T_PRIMARY, TV_FALL);
s->addEvent360(70, T_PRIMARY, TV_RISE);
s->addEvent360(75, T_PRIMARY, TV_FALL);
s->addEvent360(80, T_PRIMARY, TV_RISE);
s->addEvent360(85, T_PRIMARY, TV_FALL);
s->addEvent360(90, T_PRIMARY, TV_RISE);
s->addEvent360(95, T_PRIMARY, TV_FALL);
s->addEvent360(100, T_PRIMARY, TV_RISE);
s->addEvent360(105, T_PRIMARY, TV_FALL);
s->addEvent360(110, T_PRIMARY, TV_RISE);
s->addEvent360(115, T_PRIMARY, TV_FALL);
s->addEvent360(120, T_PRIMARY, TV_RISE);
s->addEvent360(125, T_PRIMARY, TV_FALL);
s->addEvent360(130, T_PRIMARY, TV_RISE);
s->addEvent360(135, T_PRIMARY, TV_FALL);
s->addEvent360(140, T_PRIMARY, TV_RISE);
s->addEvent360(145,T_PRIMARY, TV_FALL);
s->addEvent360(150, T_PRIMARY, TV_RISE);
s->addEvent360(155, T_PRIMARY, TV_FALL);
s->addEvent360(160, T_PRIMARY, TV_RISE);
s->addEvent360(165, T_PRIMARY, TV_FALL);
s->addEvent360(170, T_PRIMARY, TV_RISE);
s->addEvent360(175, T_PRIMARY, TV_FALL);
s->addEvent360(180, T_PRIMARY, TV_RISE);
s->addEvent360(185, T_PRIMARY, TV_FALL);
// gap 25
s->addEvent720(m * 210, T_PRIMARY, TV_RISE);
s->addEvent720(m * 215, T_PRIMARY, TV_FALL);
s->addEvent720(m * 220, T_PRIMARY, TV_RISE);
s->addEvent720(m * 225, T_PRIMARY, TV_FALL);
s->addEvent720(m * 230, T_PRIMARY, TV_RISE);
s->addEvent720(m * 235, T_PRIMARY, TV_FALL);
s->addEvent720(m * 240, T_PRIMARY, TV_RISE);
s->addEvent720(m * 245, T_PRIMARY, TV_FALL);
s->addEvent720(m * 250, T_PRIMARY, TV_RISE);
s->addEvent720(m * 255, T_PRIMARY, TV_FALL);
s->addEvent720(m * 260, T_PRIMARY, TV_RISE);
s->addEvent720(m * 265, T_PRIMARY, TV_FALL);
s->addEvent720(m * 270, T_PRIMARY, TV_RISE);
s->addEvent720(m * 275, T_PRIMARY, TV_FALL);
s->addEvent720(m * 280, T_PRIMARY, TV_RISE);
s->addEvent720(m * 285, T_PRIMARY, TV_FALL);
s->addEvent720(m * 290, T_PRIMARY, TV_RISE);
s->addEvent720(m * 295, T_PRIMARY, TV_FALL);
s->addEvent720(m * 300, T_PRIMARY, TV_RISE);
s->addEvent720(m * 305, T_PRIMARY, TV_FALL);
s->addEvent720(m * 310, T_PRIMARY, TV_RISE);
s->addEvent720(m * 315, T_PRIMARY, TV_FALL);
s->addEvent720(m * 320, T_PRIMARY, TV_RISE);
s->addEvent720(m * 325, T_PRIMARY, TV_FALL);
s->addEvent720(m * 330, T_PRIMARY, TV_RISE);
s->addEvent720(m * 335, T_PRIMARY, TV_FALL);
s->addEvent720(m * 340, T_PRIMARY, TV_RISE);
s->addEvent720(m * 345, T_PRIMARY, TV_FALL);
s->addEvent720(m * 350, T_PRIMARY, TV_RISE);
s->addEvent720(m * 355, T_PRIMARY, TV_FALL);
s->addEvent720(m * 360, T_PRIMARY, TV_RISE);
s->addEvent360(210, T_PRIMARY, TV_RISE);
s->addEvent360(215, T_PRIMARY, TV_FALL);
s->addEvent360(220, T_PRIMARY, TV_RISE);
s->addEvent360(225, T_PRIMARY, TV_FALL);
s->addEvent360(230, T_PRIMARY, TV_RISE);
s->addEvent360(235, T_PRIMARY, TV_FALL);
s->addEvent360(240, T_PRIMARY, TV_RISE);
s->addEvent360(245, T_PRIMARY, TV_FALL);
s->addEvent360(250, T_PRIMARY, TV_RISE);
s->addEvent360(255, T_PRIMARY, TV_FALL);
s->addEvent360(260, T_PRIMARY, TV_RISE);
s->addEvent360(265, T_PRIMARY, TV_FALL);
s->addEvent360(270, T_PRIMARY, TV_RISE);
s->addEvent360(275, T_PRIMARY, TV_FALL);
s->addEvent360(280, T_PRIMARY, TV_RISE);
s->addEvent360(285, T_PRIMARY, TV_FALL);
s->addEvent360(290, T_PRIMARY, TV_RISE);
s->addEvent360(295, T_PRIMARY, TV_FALL);
s->addEvent360(300, T_PRIMARY, TV_RISE);
s->addEvent360(305, T_PRIMARY, TV_FALL);
s->addEvent360(310, T_PRIMARY, TV_RISE);
s->addEvent360(315, T_PRIMARY, TV_FALL);
s->addEvent360(320, T_PRIMARY, TV_RISE);
s->addEvent360(325, T_PRIMARY, TV_FALL);
s->addEvent360(330, T_PRIMARY, TV_RISE);
s->addEvent360(335, T_PRIMARY, TV_FALL);
s->addEvent360(340, T_PRIMARY, TV_RISE);
s->addEvent360(345, T_PRIMARY, TV_FALL);
s->addEvent360(350, T_PRIMARY, TV_RISE);
s->addEvent360(355, T_PRIMARY, TV_FALL);
s->addEvent360(360, T_PRIMARY, TV_RISE);
}
void configureNeon2003TriggerWaveformCam(TriggerWaveform *s) {

View File

@ -12,16 +12,14 @@
void setSkodaFavorit(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CRANK_SENSOR);
int m = 2;
s->addEvent360(46, T_PRIMARY, TV_RISE);
s->addEvent360(177, T_PRIMARY, TV_FALL);
s->addEvent720(m * 46, T_PRIMARY, TV_RISE);
s->addEvent720(m * 177, T_PRIMARY, TV_FALL);
s->addEvent360(180, T_PRIMARY, TV_RISE);
s->addEvent360(183, T_PRIMARY, TV_FALL);
s->addEvent720(m * 180, T_PRIMARY, TV_RISE);
s->addEvent720(m * 183, T_PRIMARY, TV_FALL);
s->addEvent720(m * 226, T_PRIMARY, TV_RISE);
s->addEvent720(m * 360, T_PRIMARY, TV_FALL);
s->addEvent360(226, T_PRIMARY, TV_RISE);
s->addEvent360(360, T_PRIMARY, TV_FALL);
s->tdcPosition = 180 - 46;
s->setTriggerSynchronizationGap(3.91);