From 4463ca1fdb9260d7035ecd466a00e92892844e80 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 26 Jun 2021 23:01:47 -0400 Subject: [PATCH] depressing code comment --- firmware/controllers/algo/engine_configuration.cpp | 4 ++++ firmware/controllers/trigger/trigger_central.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 0a4523dc65..dcc76f95c8 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1153,12 +1153,16 @@ 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; diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index d76420158f..8c846d585f 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -474,6 +474,9 @@ bool TriggerNoiseFilter::noiseFilter(efitick_t nowNt, return false; } +/** + * todo: why is this method NOT reciprocal to getRpmMultiplier?! + */ int getCrankDivider(operation_mode_e operationMode) { if (operationMode == FOUR_STROKE_CAM_SENSOR || operationMode == TWO_STROKE) { // That's easy - trigger cycle matches engine cycle