From fd736254ae1a8f37808561eabddbf5100d730304 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 13 May 2023 11:39:07 -0400 Subject: [PATCH] Ford Coyote VVT Decoder #5275 enum/header --- .../controllers/algo/auto_generated_enginetypes.cpp | 2 +- firmware/controllers/algo/engine_types.h | 2 +- firmware/controllers/algo/rusefi_enums.h | 2 ++ .../controllers/trigger/decoders/trigger_ford.cpp | 12 ++++++++++++ firmware/controllers/trigger/decoders/trigger_ford.h | 11 +++++++++++ .../trigger/decoders/trigger_structure.cpp | 2 +- firmware/controllers/trigger/trigger.mk | 1 + firmware/integration/rusefi_config.txt | 5 +++-- 8 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 firmware/controllers/trigger/decoders/trigger_ford.cpp create mode 100644 firmware/controllers/trigger/decoders/trigger_ford.h diff --git a/firmware/controllers/algo/auto_generated_enginetypes.cpp b/firmware/controllers/algo/auto_generated_enginetypes.cpp index 8b1c6f1230..c30fe8eb11 100644 --- a/firmware/controllers/algo/auto_generated_enginetypes.cpp +++ b/firmware/controllers/algo/auto_generated_enginetypes.cpp @@ -498,7 +498,7 @@ case TT_UNUSED: return "TT_UNUSED"; case TT_UNUSED_11: return "TT_UNUSED_11"; -case TT_UNUSED_4: +case TT_VVT_FORD_COYOTE: return "TT_UNUSED_4"; case TT_UNUSED_75: return "TT_UNUSED_75"; diff --git a/firmware/controllers/algo/engine_types.h b/firmware/controllers/algo/engine_types.h index 989711a6b2..5b7e7d1d9b 100644 --- a/firmware/controllers/algo/engine_types.h +++ b/firmware/controllers/algo/engine_types.h @@ -318,7 +318,7 @@ typedef enum { TT_DODGE_NEON_1995 = 2, // https://rusefi.com/wiki/index.php?title=Manual:Software:Trigger#Mazda_Miata_NA TT_MAZDA_MIATA_NA = 3, - TT_UNUSED_4 = 4, + TT_VVT_FORD_COYOTE = 4, TT_GM_7X = 5, TT_DAIHATSU = 6, TT_MAZDA_SOHC_4 = 7, diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 27937c75b4..edc38897b1 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -110,6 +110,8 @@ typedef enum __attribute__ ((__packed__)) { VVT_MITSUBISHI_4G9x = 17, VVT_MITSUBISHI_4G63 = 18, + VVT_FORD_COYOTE = 19, + } vvt_mode_e; /** diff --git a/firmware/controllers/trigger/decoders/trigger_ford.cpp b/firmware/controllers/trigger/decoders/trigger_ford.cpp new file mode 100644 index 0000000000..57bd6d53dd --- /dev/null +++ b/firmware/controllers/trigger/decoders/trigger_ford.cpp @@ -0,0 +1,12 @@ +/** + * @file trigger_ford.cpp + * + * @author Andrey Belomutskiy, (c) rusEFI LLC 2012-2023 + */ + +#include "pch.h" + +#include "trigger_ford.h" + +void configureFordCoyote(TriggerWaveform *s) { +} diff --git a/firmware/controllers/trigger/decoders/trigger_ford.h b/firmware/controllers/trigger/decoders/trigger_ford.h new file mode 100644 index 0000000000..3be79ac109 --- /dev/null +++ b/firmware/controllers/trigger/decoders/trigger_ford.h @@ -0,0 +1,11 @@ +/** + * @file trigger_ford.h + * + * @author Andrey Belomutskiy, (c) rusEFI LLC 2012-2023 + */ + +#pragma once + +class TriggerWaveform; + +void configureFordCoyote(TriggerWaveform *s); \ No newline at end of file diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 61b3015b1c..647c1d49ec 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -626,7 +626,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio case TT_MITSU_4G63_CRANK: initializeMitsubishi4gSymmetricalCrank(this); break; - case TT_UNUSED_4: + case TT_VVT_FORD_COYOTE: case TT_UNUSED_11: case TT_UNUSED_75: case TT_UNUSED_77: diff --git a/firmware/controllers/trigger/trigger.mk b/firmware/controllers/trigger/trigger.mk index 9f3431e393..43ce6d8410 100644 --- a/firmware/controllers/trigger/trigger.mk +++ b/firmware/controllers/trigger/trigger.mk @@ -8,6 +8,7 @@ TRIGGER_DECODERS_SRC_CPP = \ $(CONTROLLERS_DIR)/trigger/decoders/auto_generated_sync_edge.cpp \ $(CONTROLLERS_DIR)/trigger/trigger_decoder.cpp \ $(CONTROLLERS_DIR)/trigger/trigger_simulator.cpp \ + $(CONTROLLERS_DIR)/trigger/decoders/trigger_ford.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_mitsubishi.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_nissan.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_subaru.cpp \ diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 562d871acf..b5b68aa35a 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -288,7 +288,7 @@ end_struct #define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "INVALID", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "INVALID", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "INVALID", "TCU", "Lua" custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@ -#define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2JZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K Intake", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "Honda K Exhaust", "Mitsubishi 4G92/93/94", "Mitsubishi 4G63" +#define vvt_mode_e_enum "Inactive", "Single Tooth Second Half", "2JZ", "Miata NB2", "Single Tooth First Half", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K Intake", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "Honda K Exhaust", "Mitsubishi 4G92/93/94", "Mitsubishi 4G63", "Ford Coyote" custom vvt_mode_e 1 bits, U08, @OFFSET@, [0:5], @@vvt_mode_e_enum@@ ! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU @@ -549,7 +549,8 @@ adc_channel_e fuelLevelSensor;This is the processor pin that your fuel level sen struct trigger_config_s @brief Trigger wheel(s) configuration -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "trg4", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Mercedes Two Segment", "trg11", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600", "Mitsubishi 4G92/93/94 Cam 29", "Honda CBR 600 custom", "3/1 skipped", "Dodge Neon 2003 crank", "Miata NB", "Mitsubishi 4G63 Cam 34", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12 tooth crank", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "TriTach", "GM 60/2/2/2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "Mitsubishi 3A92", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32/2", "36-2-1", "36-2-1-1", "INVALID", "INVALID", "GM 24x 3 degree", "trg75", "Mitsu 4G63 Crank", "trg77", "trg78", "trg79" +! 'INVALID' for TT_VVT_* wheels +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Mercedes Two Segment", "trg11", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600", "Mitsubishi 4G92/93/94 Cam 29", "Honda CBR 600 custom", "3/1 skipped", "Dodge Neon 2003 crank", "Miata NB", "Mitsubishi 4G63 Cam 34", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12 tooth crank", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "TriTach", "GM 60/2/2/2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "Mitsubishi 3A92", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32/2", "36-2-1", "36-2-1-1", "INVALID", "INVALID", "GM 24x 3 degree", "trg75", "Mitsu 4G63 Crank", "trg77", "trg78", "trg79" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:6], @@trigger_type_e_enum@@ trigger_type_e type;https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers\nset trigger_type X