rusefi/firmware/controllers/trigger/decoders/trigger_misc.cpp

52 lines
1.2 KiB
C++
Raw Normal View History

2018-10-30 01:46:13 -07:00
/*
* trigger_misc.cpp
*
* Created on: Oct 30, 2018
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2018-10-30 01:46:13 -07:00
*/
#include "trigger_misc.h"
2018-10-30 02:32:13 -07:00
// TT_FIAT_IAW_P8
void configureFiatIAQ_P8(TriggerWaveform * s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
2018-10-30 01:46:13 -07:00
2018-10-30 02:32:13 -07:00
s->isSynchronizationNeeded = true;
int width = 60;
s->tdcPosition = width;
2018-12-25 08:51:49 -08:00
s->addEvent720(width, T_PRIMARY, TV_RISE);
s->addEvent720(180, T_PRIMARY, TV_FALL);
2018-10-30 02:32:13 -07:00
2018-12-25 08:51:49 -08:00
s->addEvent720(180 + width, T_PRIMARY, TV_RISE);
s->addEvent720(720, T_PRIMARY, TV_FALL);
2018-10-30 02:32:13 -07:00
s->setTriggerSynchronizationGap(3);
2018-10-30 01:46:13 -07:00
}
void configureDaihatsu4(TriggerWaveform * s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
s->isSynchronizationNeeded = true;
int width = 10;
s->setTriggerSynchronizationGap(0.125);
s->addEvent720(30 - width, T_PRIMARY, TV_RISE);
s->addEvent720(30, T_PRIMARY, TV_FALL);
s->addEvent720(s->getCycleDuration() / 3 - width, T_PRIMARY, TV_RISE);
s->addEvent720(s->getCycleDuration() / 3, T_PRIMARY, TV_FALL);
s->addEvent720(s->getCycleDuration() / 3 * 2 - width, T_PRIMARY, TV_RISE);
s->addEvent720(s->getCycleDuration() / 3 * 2, T_PRIMARY, TV_FALL);
s->addEvent720(s->getCycleDuration() - width, T_PRIMARY, TV_RISE);
s->addEvent720(s->getCycleDuration(), T_PRIMARY, TV_FALL);
}