auto-sync

This commit is contained in:
rusEfi 2015-09-06 14:01:29 -04:00
parent e32383522c
commit 71953d6efb
3 changed files with 9 additions and 4 deletions

View File

@ -212,16 +212,20 @@ void configureDodgeStratusTriggerShape(TriggerShape *s) {
s->reset(FOUR_STROKE_CAM_SENSOR, false); s->reset(FOUR_STROKE_CAM_SENSOR, false);
s->isSynchronizationNeeded = true; s->isSynchronizationNeeded = true;
s->tdcPosition = 510; s->tdcPosition = 150;
float w = 7; float w = 7;
float g = 20; float g = 20;
s->setTriggerSynchronizationGap2(CHRYSLER_NGC6_GAP - 0.5, CHRYSLER_NGC6_GAP + 0.5); s->setTriggerSynchronizationGap2(CHRYSLER_NGC6_GAP - 0.25, CHRYSLER_NGC6_GAP + 0.4);
float base = 0; float base = 0;
// 2 teeth
float angle = base + 120.0 - w; float angle = base + 120.0 - w;
s->addEvent(angle, T_PRIMARY, TV_HIGH); s->addEvent(angle, T_PRIMARY, TV_HIGH);
s->addEvent(angle + w, T_PRIMARY, TV_LOW); s->addEvent(angle + w, T_PRIMARY, TV_LOW);
angle += g;
s->addEvent(angle, T_PRIMARY, TV_HIGH);
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
base += 120; base += 120;
// 3 teeth // 3 teeth
@ -251,6 +255,7 @@ void configureDodgeStratusTriggerShape(TriggerShape *s) {
s->addEvent(angle + w, T_PRIMARY, TV_LOW); s->addEvent(angle + w, T_PRIMARY, TV_LOW);
base += 120; base += 120;
// 3 teeth
angle = base + 120.0 - w; angle = base + 120.0 - w;
s->addEvent(angle, T_PRIMARY, TV_HIGH); s->addEvent(angle, T_PRIMARY, TV_HIGH);
s->addEvent(angle + w, T_PRIMARY, TV_LOW); s->addEvent(angle + w, T_PRIMARY, TV_LOW);

View File

@ -11,7 +11,7 @@
#include "trigger_structure.h" #include "trigger_structure.h"
#define CHRYSLER_NGC4_GAP 3.4390 #define CHRYSLER_NGC4_GAP 3.4390
#define CHRYSLER_NGC6_GAP 5 #define CHRYSLER_NGC6_GAP 1.5
void configureNeon1995TriggerShape(TriggerShape *s); void configureNeon1995TriggerShape(TriggerShape *s);
void configureNeon2003TriggerShape(TriggerShape *s); void configureNeon2003TriggerShape(TriggerShape *s);

View File

@ -546,7 +546,7 @@ void testTriggerDecoder(void) {
testTriggerDecoder2("sachs", SACHS, 0, 0.4800, 0.000); testTriggerDecoder2("sachs", SACHS, 0, 0.4800, 0.000);
printTriggerDebug = true; printTriggerDebug = true;
testTriggerDecoder3("stratus NGC6", DODGE_STRATUS, 12, 0.8930, 0.0, CHRYSLER_NGC6_GAP); testTriggerDecoder3("stratus NGC6", DODGE_STRATUS, 0, 0.8833, 0.0, CHRYSLER_NGC6_GAP);
testTriggerDecoder2("vw ABA", VW_ABA, 114, 0.5000, 0.0); testTriggerDecoder2("vw ABA", VW_ABA, 114, 0.5000, 0.0);