From 167f2dbba0f18c97b80818beb993319a17dd731e Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 8 Aug 2021 04:56:56 -0400 Subject: [PATCH] Nissan 4 cylinder QR trigger wheel #3118 --- firmware/CHANGELOG.md | 1 + firmware/controllers/trigger/decoders/trigger_nissan.cpp | 4 ++++ firmware/controllers/trigger/decoders/trigger_structure.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index 73e240fdd7..8e17b937fd 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -29,6 +29,7 @@ All notable user-facing or behavior-altering changes will be documented in this ### Added - RUSEFI MSD now contains bundle-specific URL #2848 + - Nissan 4 cylinder QR trigger wheel #3118 ## Removed - TS file read feature #3004 diff --git a/firmware/controllers/trigger/decoders/trigger_nissan.cpp b/firmware/controllers/trigger/decoders/trigger_nissan.cpp index ff74ce17e1..0c6be6f4a0 100644 --- a/firmware/controllers/trigger/decoders/trigger_nissan.cpp +++ b/firmware/controllers/trigger/decoders/trigger_nissan.cpp @@ -145,6 +145,10 @@ void initializeNissanVQ35crank(TriggerWaveform *s) { void initializeNissanQR25crank(TriggerWaveform *s) { s->initialize(FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR); + s->setTriggerSynchronizationGap(0.33); + s->setSecondTriggerSynchronizationGap(3); + + s->tdcPosition = 675; float currentAngle = 20; for (int i = 0;i < 16;i++) { diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index c3970cf4f8..a927c4951d 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -553,6 +553,9 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e ambiguousOperat break; case TT_NISSAN_QR25: + initializeNissanQR25crank(this); + break; + case TT_NISSAN_VQ30: initializeNissanVQ30cam(this); break;