This commit is contained in:
Matthew Kennedy 2021-09-20 21:27:14 -07:00 committed by GitHub
parent 4aeb0dc4d0
commit 35e1a7cc0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 13 deletions

View File

@ -12,37 +12,38 @@
* https://rusefi.com/forum/viewtopic.php?f=2&t=1932
*/
void initialize36_2_2_2(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
s->initialize(FOUR_STROKE_CRANK_SENSOR);
float wide = 30 * 2;
float narrow = 10 * 2;
s->setTriggerSynchronizationGap(0.6);
s->setSecondTriggerSynchronizationGap(0.9);
s->setTriggerSynchronizationGap(0.333f);
s->setSecondTriggerSynchronizationGap(1.0f);
s->setThirdTriggerSynchronizationGap(3.0f);
float base = 0;
for (int i = 0; i < 12; i++) {
s->addEvent720(base + narrow / 2, T_PRIMARY, TV_RISE);
s->addEvent720(base + narrow, T_PRIMARY, TV_FALL);
s->addEvent720(base + narrow / 2, T_PRIMARY, TV_FALL);
s->addEvent720(base + narrow, T_PRIMARY, TV_RISE);
base += narrow;
}
s->addEvent720(base + wide / 2, T_PRIMARY, TV_RISE);
s->addEvent720(base + wide, T_PRIMARY, TV_FALL);
s->addEvent720(base + wide / 2, T_PRIMARY, TV_FALL);
s->addEvent720(base + wide, T_PRIMARY, TV_RISE);
base += wide;
for (int i = 0; i < 15; i++) {
s->addEvent720(base + narrow / 2, T_PRIMARY, TV_RISE);
s->addEvent720(base + narrow, T_PRIMARY, TV_FALL);
s->addEvent720(base + narrow / 2, T_PRIMARY, TV_FALL);
s->addEvent720(base + narrow, T_PRIMARY, TV_RISE);
base += narrow;
}
s->addEvent720(720 - wide - wide / 2, T_PRIMARY, TV_RISE);
s->addEvent720(720 - wide, T_PRIMARY, TV_FALL);
s->addEvent720(720 - wide - wide / 2, T_PRIMARY, TV_FALL);
s->addEvent720(720 - wide, T_PRIMARY, TV_RISE);
s->addEvent720(720 - wide / 2, T_PRIMARY, TV_RISE);
s->addEvent720(720, T_PRIMARY, TV_FALL);
s->addEvent720(720 - wide / 2, T_PRIMARY, TV_FALL);
s->addEvent720(720, T_PRIMARY, TV_RISE);
s->useOnlyPrimaryForSync = true;
}