From 57b68d8b32f0260e712f3d70c79b114f747ec4e7 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 12 Nov 2015 14:01:28 -0500 Subject: [PATCH] auto-sync --- .../algo/engine_configuration_generated_structures.h | 6 +++--- firmware/controllers/trigger/rpm_calculator.cpp | 2 +- firmware/integration/rusefi_config.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index d511931b8d..ee0e8a10a0 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Nov 12 10:32:55 EST 2015 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Nov 12 12:52:17 EST 2015 // begin #include "rusefi_types.h" typedef struct { @@ -853,7 +853,7 @@ typedef struct { */ float cylinderBore; /** - * todo:eliminate this? + * todo:see getEngineCycle(operation_mode_e operationMode) eliminate this? * todo:operationMode should be enough * 360 for two-stroke * 720 for four-stroke @@ -1571,4 +1571,4 @@ typedef struct { } persistent_config_s; // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Nov 12 10:32:55 EST 2015 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Nov 12 12:52:17 EST 2015 diff --git a/firmware/controllers/trigger/rpm_calculator.cpp b/firmware/controllers/trigger/rpm_calculator.cpp index 46812afecc..121a5f598b 100644 --- a/firmware/controllers/trigger/rpm_calculator.cpp +++ b/firmware/controllers/trigger/rpm_calculator.cpp @@ -196,7 +196,7 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType, if (diffNt == 0) { rpmState->setRpmValue(NOISY_RPM); } else { - int mult = engineConfiguration->engineCycleDuration / 360; + int mult = getEngineCycle(engineConfiguration->operationMode) / 360; int rpm = (int) (60 * US2NT(US_PER_SECOND_LL) * mult / diffNt); rpmState->setRpmValue(rpm > UNREALISTIC_RPM ? NOISY_RPM : rpm); } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 8f980d99b2..aac72df9d2 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -187,7 +187,7 @@ end_struct specs_s specs float cylinderBore;Cylinder diameter, in mm. -int engineCycleDuration;todo:eliminate this?\ntodo:operationMode should be enough\n360 for two-stroke\n720 for four-stroke;"engine cycle", 1, 0, 0, 1000, 0 +int engineCycleDuration;todo:see getEngineCycle(operation_mode_e operationMode) eliminate this?\ntodo:operationMode should be enough\n360 for two-stroke\n720 for four-stroke;"engine cycle", 1, 0, 0, 1000, 0 int rpmHardLimit;;"rpm", 1, 0, 0, 20000.0, 2