From 82790492a60697e9875aecc58d1a8dc2a36d9b8d Mon Sep 17 00:00:00 2001 From: andreika-git Date: Wed, 24 Jan 2018 04:59:50 +0200 Subject: [PATCH] Fix currentVE display (#548) * Fix currentVE display * Use PERCENT_MULT & remove dead code --- firmware/console/status_loop.cpp | 4 ++-- firmware/controllers/algo/rusefi_enums.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index d06cd02ca7..fc277aad1e 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -253,7 +253,7 @@ static void printSensors(Logging *log, bool fileFormat) { reportSensorF(log, fileFormat, GAUGE_NAME_TCHARGE, "K", engine->engineState.tChargeK, 2); // log column #8 if (hasMapSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) { - reportSensorF(log, fileFormat, GAUGE_NAME_FUEL_VR, "%", veMap.getValue(rpm, getMap()), 2); + reportSensorF(log, fileFormat, GAUGE_NAME_FUEL_VR, "%", engine->engineState.currentVE * PERCENT_MULT, 2); } reportSensorF(log, fileFormat, GAUGE_NAME_VVT, "deg", engine->triggerCentral.vvtPosition, 1); } @@ -696,7 +696,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ if (hasMapSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) { float mapValue = getMap(); - tsOutputChannels->veValue = veMap.getValue(rpm, mapValue); + tsOutputChannels->veValue = engine->engineState.currentVE * PERCENT_MULT; // todo: bug here? target afr could work based on real MAF? tsOutputChannels->currentTargetAfr = afrMap.getValue(rpm, mapValue); tsOutputChannels->manifoldAirPressure = mapValue; diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 1a43310f12..eeff757a7e 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -28,7 +28,7 @@ // I believe that TunerStudio curve editor has a bug with F32 support // because of that bug we cannot have '1.05' for 5% extra multiplier -#define PERCENT_MULT 100.0 +#define PERCENT_MULT 100.0f typedef enum { CUSTOM_ENGINE = 0,