From bfd5fb88d5cb56bdd47099d230c0478a511474c0 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 25 Aug 2020 01:38:56 -0400 Subject: [PATCH] oh, here it is --- firmware/controllers/algo/rusefi_enums.h | 8 +++----- firmware/controllers/trigger/decoders/trigger_mazda.h | 6 ++++-- .../controllers/trigger/decoders/trigger_structure.cpp | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 434a90fdd9..bce2f232a5 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -333,9 +333,9 @@ typedef enum { TT_MAZDA_Z5 = 42, /** - * This shape for camshaft ONLY + * cam sensor of Mazda Miata NB2 - the VVT signal shape */ - TT_MIATA_NB2_VVT_CAM = 43, + TT_VVT_MIATA_NB2 = 43, TT_RENIX_44_2_2 = 44, @@ -352,15 +352,13 @@ typedef enum { TT_SUBARU_SVX = 49, - TT_VVT_MIATA_NB2 = 50, - // do not forget to edit "#define trigger_type_e_enum" line in integration/rusefi_config.txt file to propogate new value to rusefi.ini TS project // do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt // todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic // // Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests // - TT_UNUSED = 51, // this is used if we want to iterate over all trigger types + TT_UNUSED = 50, // this is used if we want to iterate over all trigger types Force_4_bytes_size_trigger_type = ENUM_32_BITS, } trigger_type_e; diff --git a/firmware/controllers/trigger/decoders/trigger_mazda.h b/firmware/controllers/trigger/decoders/trigger_mazda.h index 1fdf82b2f8..ab79ae4166 100644 --- a/firmware/controllers/trigger/decoders/trigger_mazda.h +++ b/firmware/controllers/trigger/decoders/trigger_mazda.h @@ -20,8 +20,10 @@ void configureMazdaProtegeLx(TriggerWaveform *s); void initialize_Mazda_Engine_z5_Shape(TriggerWaveform *s); /** - * TT_MIATA_NB2_VVT_CAM - * if you unplug VVT you can start & run your engine on it + * TT_VVT_MIATA_NB2 + * if you unplug crank sensor you can start & run your engine on just this cam decoder * trigger offset "-90" seems to be doing the job + * + * same decoder is used for VVT processing */ void initializeMazdaMiataVVtCamShape(TriggerWaveform *s); diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index 8e48fe9ebd..d9e736fc8f 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -474,7 +474,7 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ initialize_Mazda_Engine_z5_Shape(this); break; - case TT_MIATA_NB2_VVT_CAM: + case TT_VVT_MIATA_NB2: initializeMazdaMiataVVtCamShape(this); break; @@ -563,7 +563,6 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ setToothedWheelConfiguration(this, 36, 1, ambiguousOperationMode); break; - case TT_VVT_MIATA_NB2: case TT_VVT_BOSCH_QUICK_START: configureQuickStartSenderWheel(this); break;