From 047f62b2b9bc48d22b431664e07a62e25ea09575 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Mon, 10 May 2021 05:30:41 -0700 Subject: [PATCH] remove deprecated getEngineLoadT (#2676) * remove * few more --- firmware/console/binary/tunerstudio_outputs.h | 2 +- .../console/binary_log/binary_logging.cpp | 1 - firmware/console/status_loop.cpp | 3 --- firmware/controllers/math/engine_math.cpp | 20 ------------------- firmware/controllers/math/engine_math.h | 2 -- firmware/integration/rusefi_config.txt | 1 - firmware/tunerstudio/rusefi.input | 2 -- 7 files changed, 1 insertion(+), 30 deletions(-) diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 92cd5a8b4b..37dfcf7d5f 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -106,7 +106,7 @@ typedef struct { scaled_pressure baroPressure; // 32 scaled_lambda lambda; // 34 - scaled_channel engineLoad; // 36 + uint16_t unused36; // 36 // misc sensors scaled_voltage vBatt; // 38 diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 2339fc9dbe..9457d7b9ab 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -69,7 +69,6 @@ static constexpr LogField fields[] = { {tsOutputChannels.flexPercent, GAUGE_NAME_FLEX, "%", 1}, {tsOutputChannels.fuelFlowRate, GAUGE_NAME_FUEL_FLOW, "g/s", 3}, {tsOutputChannels.totalFuelConsumption, GAUGE_NAME_FUEL_CONSUMPTION, "g", 1}, - {tsOutputChannels.engineLoad, GAUGE_NAME_ENGINE_LOAD, "%", 1}, {tsOutputChannels.knockLevel, GAUGE_NAME_KNOCK_LEVEL, "dBv", 0}, }; diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index cfd864e383..5ff6f62d43 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -541,9 +541,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->lambda2 = lambda2Value; tsOutputChannels->airFuelRatio2 = lambda2Value * ENGINE(engineState.stoichiometricRatio); - // offset 24 - tsOutputChannels->engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE); - tsOutputChannels->fuelingLoad = getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE); tsOutputChannels->ignitionLoad = getIgnitionLoad(PASS_ENGINE_PARAMETER_SIGNATURE); tsOutputChannels->veTableYAxis = ENGINE(engineState.currentVeLoad); diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 6f44e7259d..6830be3110 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -57,26 +57,6 @@ float getIgnitionLoad(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return ENGINE(engineState.ignitionLoad); } -/** - * @brief Returns engine load according to selected engine_load_mode - * - */ -float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - efiAssert(CUSTOM_ERR_ASSERT, engine!=NULL, "engine 2NULL", NAN); - efiAssert(CUSTOM_ERR_ASSERT, engineConfiguration!=NULL, "engineConfiguration 2NULL", NAN); - switch (engineConfiguration->fuelAlgorithm) { - case LM_SPEED_DENSITY: - return Sensor::get(SensorType::Map).value_or(0); - case LM_ALPHA_N: - return Sensor::get(SensorType::Tps1).value_or(0); - case LM_REAL_MAF: - return Sensor::get(SensorType::Maf).value_or(0); - default: - firmwareError(CUSTOM_UNKNOWN_ALGORITHM, "Unexpected engine load parameter: %d", engineConfiguration->fuelAlgorithm); - return 0; - } -} - /** * see also setConstantDwell */ diff --git a/firmware/controllers/math/engine_math.h b/firmware/controllers/math/engine_math.h index 5d34a5d6c6..0e4486a421 100644 --- a/firmware/controllers/math/engine_math.h +++ b/firmware/controllers/math/engine_math.h @@ -39,8 +39,6 @@ floatms_t getEngineCycleDuration(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); float getFuelingLoad(DECLARE_ENGINE_PARAMETER_SIGNATURE); float getIgnitionLoad(DECLARE_ENGINE_PARAMETER_SIGNATURE); -// getEngineLoadT is deprecated - please use one of the above functions, getFuelingLoad or getIgnitionMode -float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE); floatms_t getSparkDwell(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index e67e1fd619..12a1071a53 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1683,7 +1683,6 @@ end_struct #define GAUGE_NAME_TPS2 "TPS2" #define GAUGE_NAME_MAP "MAP" #define GAUGE_NAME_MAF "MAF" -#define GAUGE_NAME_ENGINE_LOAD "Engine Load" #define GAUGE_NAME_CPU_TEMP "CPU Temperature" #define GAUGE_NAME_ETB_TARGET "ETB position target" #define GAUGE_NAME_WG_POSITION "Wastegate position sensor" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 70fee0c121..e925aef54e 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -232,7 +232,6 @@ enable2ndByteCanID = false MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0 lambdaValue = scalar, U16, 34, "",{1/@@PACK_MULT_LAMBDA@@}, 0.0 - engineLoad = scalar, U16, 36, "%",{1/@@PACK_MULT_PERCENT@@}, 0.0 ; Blend of MAP and TPS, depends on algorithm ; misc sensors VBatt = scalar, U16, 38, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 @@ -1240,7 +1239,6 @@ gaugeCategory = DynoView entry = lambdaValue, @@GAUGE_NAME_LAMBDA@@, float, "%.2f" entry = lambdaValue2, @@GAUGE_NAME_LAMBDA2@@, float, "%.2f" entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" - entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" entry = fuelingLoad, @@GAUGE_NAME_FUEL_LOAD@@, float, "%.1f" entry = ignitionLoad, @@GAUGE_NAME_IGNITION_LOAD@@, float, "%.1f" entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f"