From b03ebc94f52da467349dd54b841fabbc4623eeb7 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 13 Apr 2017 23:37:17 -0400 Subject: [PATCH] #382 --- firmware/console/status_loop.cpp | 12 ++++----- firmware/controllers/algo/rusefi_generated.h | 8 ++++++ firmware/integration/rusefi_config.txt | 10 +++++++ firmware/tunerstudio/rusefi.input | 28 ++++++++++---------- 4 files changed, 38 insertions(+), 20 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index dbf12698c6..b141fa8941 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -179,7 +179,7 @@ static void printSensors(Logging *log, bool fileFormat) { #endif #if EFI_PROD_CODE || defined(__DOXYGEN__) - reportSensorF(log, fileFormat, "int_temp", "C", getMCUInternalTemperature(), 2); // log column #3 + reportSensorF(log, fileFormat, GAUGE_NAME_CPU_TEMP, "C", getMCUInternalTemperature(), 2); // log column #3 #endif reportSensorI(log, fileFormat, "mode", "v", packEngineMode(PASS_ENGINE_PARAMETER_F)); // log column #3 @@ -192,7 +192,7 @@ static void printSensors(Logging *log, bool fileFormat) { } if (hasVBatt(PASS_ENGINE_PARAMETER_F)) { - reportSensorF(log, fileFormat, "vbatt", "V", getVBatt(PASS_ENGINE_PARAMETER_F), 2); // log column #6 + reportSensorF(log, fileFormat, GAUGE_NAME_VBAT, "V", getVBatt(PASS_ENGINE_PARAMETER_F), 2); // log column #6 } if (hasIatSensor()) { @@ -247,13 +247,13 @@ 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_F)) { - reportSensorF(log, fileFormat, "curVE", "%", veMap.getValue(rpm, getMap()), 2); + reportSensorF(log, fileFormat, GAUGE_NAME_FUEL_VR, "%", veMap.getValue(rpm, getMap()), 2); } reportSensorF(log, fileFormat, GAUGE_NAME_VVT, "deg", engine->triggerCentral.vvtPosition, 1); } float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F); - reportSensorF(log, fileFormat, "ENGINE_LOAD", "x", engineLoad, 2); + reportSensorF(log, fileFormat, GAUGE_NAME_ENGINE_LOAD, "x", engineLoad, 2); reportSensorF(log, fileFormat, GAUGE_COIL_DWELL_TIME, "ms", ENGINE(engineState.sparkDwell), 2); @@ -314,8 +314,8 @@ static void printSensors(Logging *log, bool fileFormat) { } } - reportSensorI(log, fileFormat, "warn", "count", engine->engineState.warningCounter); - reportSensorI(log, fileFormat, "error", "code", engine->engineState.lastErrorCode); + reportSensorI(log, fileFormat, GAUGE_NAME_WARNING_COUNTER, "count", engine->engineState.warningCounter); + reportSensorI(log, fileFormat, GAUGE_NAME_WARNING_LAST, "code", engine->engineState.lastErrorCode); } diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 246393cdf9..c45f006f28 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -1501,10 +1501,18 @@ #define GAUGE_NAME_VVT "VVT postion" #define GAUGE_NAME_TIMING_ADVANCE "timing" #define GAUGE_NAME_VVS "Vehicle Speed" +#define GAUGE_NAME_VBAT "VBatt" +#define GAUGE_NAME_ENGINE_LOAD "Engine Load" +#define GAUGE_NAME_CPU_TEMP "CPU Temperature" +#define GAUGE_NAME_WARNING_LAST "warning: last" +#define GAUGE_NAME_WARNING_COUNTER "warning: counter" #define GAUGE_NAME_KNOCK_LEVEL "knock: current level" #define GAUGE_NAME_INJECTOR_LAG "fuel: injector lag" #define GAUGE_NAME_FUEL_TPS_EXTRA "fuel: TPS acceleration extra fuel" #define GAUGE_NAME_FUEL_EL_EXTRA "fuel: engine load acceleration extra fuel" +#define GAUGE_NAME_FUEL_CLT_CORR "fuel: CLT correction" +#define GAUGE_NAME_FUEL_IAT_CORR "fuel: IAT correction" +#define GAUGE_NAME_FUEL_VR "fuel: VE" #define GAUGE_NAME_FUEL_INJ_DUTY "fuel: injector duty cycle" #define GAUGE_NAME_TCHARGE "fuel: SD tCharge" #define GAUGE_NAME_DWELL_DUTY "dwell: coil duty cycle" diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index b061e9c7b3..1bb8dc61eb 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -878,12 +878,22 @@ end_struct #define GAUGE_NAME_VVT "VVT postion" #define GAUGE_NAME_TIMING_ADVANCE "timing" #define GAUGE_NAME_VVS "Vehicle Speed" +#define GAUGE_NAME_VBAT "VBatt" +#define GAUGE_NAME_ENGINE_LOAD "Engine Load" +#define GAUGE_NAME_CPU_TEMP "CPU Temperature" + +#define GAUGE_NAME_WARNING_LAST "warning: last" +#define GAUGE_NAME_WARNING_COUNTER "warning: counter" + #define GAUGE_NAME_KNOCK_LEVEL "knock: current level" #define GAUGE_NAME_INJECTOR_LAG "fuel: injector lag" #define GAUGE_NAME_FUEL_TPS_EXTRA "fuel: TPS acceleration extra fuel" #define GAUGE_NAME_FUEL_EL_EXTRA "fuel: engine load acceleration extra fuel" +#define GAUGE_NAME_FUEL_CLT_CORR "fuel: CLT correction" +#define GAUGE_NAME_FUEL_IAT_CORR "fuel: IAT correction" +#define GAUGE_NAME_FUEL_VR "fuel: VE" #define GAUGE_NAME_FUEL_INJ_DUTY "fuel: injector duty cycle" #define GAUGE_NAME_TCHARGE "fuel: SD tCharge" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index c963cc2c73..f17448f264 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -130,7 +130,7 @@ fileVersion = { 20161225 } crankingFuel = scalar, F32, 44, "ms", 1, 0.0; baseFuel = scalar, F32, 48, "ms", 1, 0 tCharge = scalar, F32, 52, "T", 1, 0.0; - ign_adv = scalar, F32, 56, "deg", 1, 0.0; + ignitionAdvance = scalar, F32, 56, "deg", 1, 0.0; sparkDwellValue = scalar, F32, 60, "ms", 1, 0.0; ; actual total Ms time per engine cycle with all corrections pulseWidth = scalar, F32, 64, "ms", 1, 0.0; @@ -456,7 +456,7 @@ fileVersion = { 20161225 } tpsADCGauge = tpsADC, "tps ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0 atmPresCGauge = baroPressure, "Baro", "kPa", 0, 1024, 0, 0, 0, 0, 0, 0 mapGaugeValue = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 - ignadvGauge = ign_adv, "Ignition Advance 1", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 + ignadvGauge = ignitionAdvance, "Ignition Advance 1", "degrees", -100, 100, -999, -999, 999, 999, 1, 1 ; warmupEnrichGauge = warmupEnrich, "Warmup Enrichment", "%", 100, 150, -1, -1, 101, 105, 0, 0 ; accelEnrichGauge = accDecEnrich, "Accel Enrich", "%", 50, 150, -1, -1, 999, 999, 0, 0 dwellGauge = sparkDwellValue, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 @@ -567,18 +567,18 @@ fileVersion = { 20161225 } ; Channel Label Type Format entry = time, "Time", float, "%.3f" entry = rpm, "RPM", int, "%d" - entry = firmwareVersion, "version", int, "%d" + entry = firmwareVersion, @@GAUGE_NAME_VERSION@@, int, "%d" entry = coolant, "CLT", float, "%.2f" entry = intake, "IAT", float, "%.2f" entry = TPS, "TPS", float, "%.2f" entry = MAF, "MAF", float, "%.2f" entry = MAPValue, "MAP", float, "%.1f" entry = AFRactual, "AFR", float, "%.2f" - entry = VBatt, "vBatt", float, "%.2f" - entry = engineLoad, "Load", float, "%.1f" - entry = ign_adv, "ignAdv", float, "%.2f" - entry = knockLevel, "Knock", float, "%.2f" - entry = vehicleSpeedKph, "speed", float, "%.2f" + entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" + entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" + entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" + entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" + entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" entry = speedToRpmRatio, "s2rpm", float, "%.3f" entry = rpmAcceleration, "dRPM", float, "%.3f" entry = massAirFlowValue,"airMass", float, "%.3f" @@ -590,7 +590,7 @@ fileVersion = { 20161225 } entry = pulseWidth, "fuel: pulse", float, "%.3f" entry = baseFuel, "fuel: base", float, "%.2f" entry = fuelPidCorrection,"fuel: pid", float, "%.2f" - entry = veValue, "fuel: VE", float, "%.3f" + entry = veValue, @@GAUGE_NAME_FUEL_VR@@, float, "%.3f" entry = injectorDutyCycle,@@GAUGE_NAME_FUEL_INJ_DUTY@@,float,"%.3f" entry = coilDutyCycle, @@GAUGE_NAME_DWELL_DUTY@@, float,"%.3f" @@ -604,11 +604,11 @@ fileVersion = { 20161225 } entry = wallFuelAmount, "fuel: wall amount", float, "%.3f" entry = baroCorrection, "baroCorrection",float,"%.3f" - entry = iatCorrection, "fuel: IAT corr", float, "%.3f" - entry = cltCorrection, "cltCorrection", float,"%.3f" + entry = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, float, "%.3f" + entry = cltCorrection, @@GAUGE_NAME_FUEL_CLT_CORR@@, float,"%.3f" entry = sparkDwellValue, @@GAUGE_COIL_DWELL_TIME@@, float,"%.3f" - entry = vvtPosition, "VVT", float,"%.2f" + entry = vvtPosition, @@GAUGE_NAME_VVT@@, float,"%.2f" ; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d" ; Alternator_PID: alternator duty cycle @@ -646,9 +646,9 @@ fileVersion = { 20161225 } entry = debugIntField3, "debug i3",int,"%d" entry = engineMode, "mode",int,"%d" - entry = warningCounter, "err: count",int,"%d" + entry = warningCounter, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" entry = lastErrorCode, "err: last",int,"%d" - entry = internalMcuTemperature, "int temp",float,"%.2f" + entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f" entry = tCharge, "tCharge",float,"%.3f"