From a2036ebc70dc2d29478189e740299df738c6eb72 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 3 Dec 2020 01:22:57 -0500 Subject: [PATCH] dead trigger, this would now be vvt+60/2 --- .../controllers/algo/auto_generated_enums.cpp | 4 +- .../controllers/algo/auto_generated_enums.cpp | 4 +- firmware/controllers/algo/rusefi_enums.h | 7 +- .../trigger/decoders/trigger_bmw.cpp | 74 ------------------- .../trigger/decoders/trigger_bmw.h | 13 ---- .../trigger/decoders/trigger_structure.cpp | 6 +- firmware/controllers/trigger/trigger.mk | 1 - 7 files changed, 9 insertions(+), 100 deletions(-) delete mode 100644 firmware/controllers/trigger/decoders/trigger_bmw.cpp delete mode 100644 firmware/controllers/trigger/decoders/trigger_bmw.h diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 5e175fbce6..1d871a3f90 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -1187,8 +1187,8 @@ case TT_MAZDA_Z5: return "TT_MAZDA_Z5"; case TT_MIATA_VVT: return "TT_MIATA_VVT"; -case TT_MINI_COOPER_R50: - return "TT_MINI_COOPER_R50"; +case TT_UNUSED_6: + return "TT_UNUSED_6"; case TT_MITSUBISHI: return "TT_MITSUBISHI"; case TT_NISSAN_SR20VE: diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index f2c0df3e8c..ed580aaf30 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -1333,8 +1333,8 @@ case TT_MAZDA_Z5: return "TT_MAZDA_Z5"; case TT_MIATA_VVT: return "TT_MIATA_VVT"; -case TT_MINI_COOPER_R50: - return "TT_MINI_COOPER_R50"; +case TT_UNUSED_6: + return "TT_UNUSED_6"; case TT_MITSUBISHI: return "TT_MITSUBISHI"; case TT_NISSAN_SR20VE: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 3c6a2951cc..fccf8621e7 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -226,8 +226,8 @@ typedef enum { */ TT_MAZDA_MIATA_NB1 = TT_TT_MAZDA_MIATA_NB1, TT_GM_7X = 5, - TT_MINI_COOPER_R50 = 6, - TT_MAZDA_SOHC_4 = 7, + TT_UNUSED_6 = 6, + TT_MAZDA_SOHC_4 = TT_TT_GM_7X, /** * "60/2" * See also TT_ONE_PLUS_TOOTHED_WHEEL_60_2 @@ -237,6 +237,7 @@ typedef enum { TT_HONDA_4_24_1 = 10, + // todo: this really looks to be same as Miata_NA shall we remove? TT_MITSUBISHI = 11, // this makes sense because mechanical spark distribution does not require synchronization @@ -283,7 +284,7 @@ typedef enum { TT_ROVER_K = 26, - TT_GM_LS_24 = 27, + TT_GM_LS_24 = TT_TT_GM_LS_24, TT_HONDA_CBR_600 = 28, diff --git a/firmware/controllers/trigger/decoders/trigger_bmw.cpp b/firmware/controllers/trigger/decoders/trigger_bmw.cpp deleted file mode 100644 index 5d97631b4d..0000000000 --- a/firmware/controllers/trigger/decoders/trigger_bmw.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file trigger_bmw.cpp - * - * @date May 11, 2014 - * @author Andrey Belomutskiy, (c) 2012-2020 - */ - -#include "trigger_bmw.h" - -static inline float addPair(TriggerWaveform *s, float a, float w) { - s->addEvent720(a, T_SECONDARY, TV_RISE); - a += w; - s->addEvent720(a, T_SECONDARY, TV_FALL); - a += w; - return a; -} - -void configureMiniCooperTriggerWaveform(TriggerWaveform *s) { - s->initialize(FOUR_STROKE_CAM_SENSOR); - -// s->initialState[0] = 1; - - float w = 360.0 / 121; - float a = w / 2; - s->addEvent720(a, T_SECONDARY, TV_FALL); - a += w; - - for (int i = 0; i <= 22; i++) { - a = addPair(s, a, w); - } - - a += 3 * w; - - float firstGapAngle = a; - /* may be */UNUSED(firstGapAngle); - - s->addEvent720(a, T_SECONDARY, TV_RISE); - a += 3 * w; - s->addEvent720(a, T_SECONDARY, TV_FALL); - a += w; - - for (int i = 0; i < 36; i++) { - a = addPair(s, a, w); - } - - s->addEvent720(376, T_PRIMARY, TV_RISE); - - for (int i = 0; i < 21; i++) { - a = addPair(s, a, w); - } - a += 3 * w; - - efiAssertVoid(CUSTOM_ERR_6584, absF(firstGapAngle + 360 - a) < 0.1, "shape constraint"); - - s->addEvent720(a, T_SECONDARY, TV_RISE); - a += 3 * w; - s->addEvent720(a, T_SECONDARY, TV_FALL); - a += w; - - for (int i = 0; i < 33; i++) { - a = addPair(s, a, w); - } - - efiAssertVoid(CUSTOM_ERR_6585, absF(720 - w / 2 - a) < 0.1, "shape constraint"); - s->addEvent720(a, T_SECONDARY, TV_RISE); - - s->addEvent720(720.0, T_PRIMARY, TV_FALL); - - /** - * With just one tooth on camshaft synchronization is not needed - */ - s->isSynchronizationNeeded = false; - s->useOnlyPrimaryForSync = true; -} diff --git a/firmware/controllers/trigger/decoders/trigger_bmw.h b/firmware/controllers/trigger/decoders/trigger_bmw.h deleted file mode 100644 index e9a2fe4304..0000000000 --- a/firmware/controllers/trigger/decoders/trigger_bmw.h +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file trigger_bmw.h - * - * @date May 11, 2014 - * @author Andrey Belomutskiy, (c) 2012-2020 - */ - -#pragma once - -#include "trigger_structure.h" - -void configureMiniCooperTriggerWaveform(TriggerWaveform *s); - diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 07dfffc6f2..b7f168dfa1 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -22,7 +22,6 @@ #include "global.h" #include "os_access.h" #include "engine.h" -#include "trigger_bmw.h" #include "trigger_chrysler.h" #include "trigger_gm.h" #include "trigger_nissan.h" @@ -546,10 +545,7 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ configureMazdaProtegeSOHC(this); break; - case TT_MINI_COOPER_R50: - configureMiniCooperTriggerWaveform(this); - break; - + case TT_UNUSED_6: case TT_VVT_JZ: setToothedWheelConfiguration(this, 3, 0, ambiguousOperationMode); break; diff --git a/firmware/controllers/trigger/trigger.mk b/firmware/controllers/trigger/trigger.mk index e387380cca..c88febcc43 100644 --- a/firmware/controllers/trigger/trigger.mk +++ b/firmware/controllers/trigger/trigger.mk @@ -1,6 +1,5 @@ TRIGGER_DECODERS_SRC_CPP = \ - $(CONTROLLERS_DIR)/trigger/decoders/trigger_bmw.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_mazda.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_chrysler.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_structure.cpp \