diff --git a/firmware/controllers/trigger/trigger_chrysler.cpp b/firmware/controllers/trigger/trigger_chrysler.cpp index 57c8d903d0..8393d87208 100644 --- a/firmware/controllers/trigger/trigger_chrysler.cpp +++ b/firmware/controllers/trigger/trigger_chrysler.cpp @@ -212,16 +212,20 @@ void configureDodgeStratusTriggerShape(TriggerShape *s) { s->reset(FOUR_STROKE_CAM_SENSOR, false); s->isSynchronizationNeeded = true; - s->tdcPosition = 510; + s->tdcPosition = 150; float w = 7; 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; + // 2 teeth float angle = base + 120.0 - w; s->addEvent(angle, T_PRIMARY, TV_HIGH); 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; // 3 teeth @@ -251,6 +255,7 @@ void configureDodgeStratusTriggerShape(TriggerShape *s) { s->addEvent(angle + w, T_PRIMARY, TV_LOW); base += 120; + // 3 teeth angle = base + 120.0 - w; s->addEvent(angle, T_PRIMARY, TV_HIGH); s->addEvent(angle + w, T_PRIMARY, TV_LOW); diff --git a/firmware/controllers/trigger/trigger_chrysler.h b/firmware/controllers/trigger/trigger_chrysler.h index db88a9f5f1..5979c89074 100644 --- a/firmware/controllers/trigger/trigger_chrysler.h +++ b/firmware/controllers/trigger/trigger_chrysler.h @@ -11,7 +11,7 @@ #include "trigger_structure.h" #define CHRYSLER_NGC4_GAP 3.4390 -#define CHRYSLER_NGC6_GAP 5 +#define CHRYSLER_NGC6_GAP 1.5 void configureNeon1995TriggerShape(TriggerShape *s); void configureNeon2003TriggerShape(TriggerShape *s); diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp index 3aa759bb48..467e95f1fc 100644 --- a/unit_tests/test_trigger_decoder.cpp +++ b/unit_tests/test_trigger_decoder.cpp @@ -546,7 +546,7 @@ void testTriggerDecoder(void) { testTriggerDecoder2("sachs", SACHS, 0, 0.4800, 0.000); 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);