From 82439b3ffdb4bde6a849f8ef6a054e91aabca2cd Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 27 Jun 2021 00:54:38 -0400 Subject: [PATCH] so many wonderful discoveries --- .../controllers/algo/engine_configuration.cpp | 15 --------------- firmware/controllers/algo/engine_configuration.h | 1 - .../trigger/trigger_emulator_algo.cpp | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index dcc76f95c8..f48b08f968 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1153,21 +1153,6 @@ void prepareShapes(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #endif -/** - * todo: why is this method NOT reciprocal to getCrankDivider?! - */ -float getRpmMultiplier(operation_mode_e mode) { - if (mode == FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR) { - return 2; - } else if (mode == FOUR_STROKE_CAM_SENSOR) { - return 0.5; - } else if (mode == FOUR_STROKE_CRANK_SENSOR) { - // unit test coverage still runs if the value below is changed to '2' not a great sign! - return 1; - } - return 1; -} - void setOperationMode(engine_configuration_s *engineConfiguration, operation_mode_e mode) { engineConfiguration->ambiguousOperationMode = mode; } diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index 907cc8d906..cf80204a8a 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -21,7 +21,6 @@ #define MOCK_UNDEFINED -1 -float getRpmMultiplier(operation_mode_e mode); void setOperationMode(engine_configuration_s *engineConfiguration, operation_mode_e mode); void prepareVoidConfiguration(engine_configuration_s *activeConfiguration); diff --git a/firmware/controllers/trigger/trigger_emulator_algo.cpp b/firmware/controllers/trigger/trigger_emulator_algo.cpp index f6d6237cc9..25f10ab8e4 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.cpp +++ b/firmware/controllers/trigger/trigger_emulator_algo.cpp @@ -88,6 +88,22 @@ static int atTriggerVersion = 0; extern WaveChart waveChart; #endif /* EFI_ENGINE_SNIFFER */ +/** + * todo: why is this method NOT reciprocal to getCrankDivider?! + * todo: oh this method has only one usage? there must me another very similar method! + */ +static float getRpmMultiplier(operation_mode_e mode) { + if (mode == FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR) { + return 2; + } else if (mode == FOUR_STROKE_CAM_SENSOR) { + return 0.5; + } else if (mode == FOUR_STROKE_CRANK_SENSOR) { + // unit test coverage still runs if the value below is changed to '2' not a great sign! + return 1; + } + return 1; +} + void setTriggerEmulatorRPM(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { engineConfiguration->triggerSimulatorFrequency = rpm; /**