From e5b8e0e515a732e36db8852772d7e81e944b6cea Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 3 Oct 2020 10:39:43 -0400 Subject: [PATCH] new VVT trigger shape? #1847 --- firmware/controllers/algo/engine.cpp | 2 ++ firmware/controllers/algo/rusefi_enums.h | 5 +++++ firmware/controllers/trigger/trigger_central.cpp | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 0db93295b6..85ceb3db6a 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -85,6 +85,8 @@ trigger_type_e getVvtTriggerType(vvt_mode_e vvtMode) { return TT_ONE; case VVT_SECOND_HALF: return TT_ONE; + case VVT_4_1: + return TT_ONE; default: return TT_ONE; } diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 9732933b40..427a9aae41 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -433,6 +433,11 @@ typedef enum { */ VVT_BOSCH_QUICK_START = 5, + /** + * 1.8l Toyota 1ZZ-FE https://rusefi.com/forum/viewtopic.php?f=3&t=1735 + */ + VVT_4_1 = 6, + Force_4_bytes_size_vvt_mode = ENUM_32_BITS, } vvt_mode_e; diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 62e4d0cbc5..40743f16d5 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -86,7 +86,9 @@ void addTriggerEventListener(ShaftPositionListener listener, const char *name, E #define miataNbIndex (0) static bool vvtWithRealDecoder(vvt_mode_e vvtMode) { - return vvtMode == MIATA_NB2 || vvtMode == VVT_BOSCH_QUICK_START; + return vvtMode == MIATA_NB2 + || vvtMode == VVT_BOSCH_QUICK_START + || vvtMode == VVT_4_1; } void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX) {