From 9f35de24f02064db18f777d854a0bdca34ea08ed Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 3 Oct 2021 23:07:16 -0400 Subject: [PATCH] rusEFI console logs are missing some fields #3314 --- .../console/binary_log/binary_logging.cpp | 26 +++++++++---------- firmware/tunerstudio/rusefi.input | 2 +- .../src/main/java/com/rusefi/core/Sensor.java | 7 +++++ .../com/rusefi/sensor_logs/SensorLogger.java | 4 +++ 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 68a5446bf3..7450c07dd5 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -82,7 +82,7 @@ static constexpr LogField fields[] = { {tsOutputChannels.etbTarget, GAUGE_NAME_ETB_TARGET, "%", 2}, {tsOutputChannels.etb1DutyCycle, GAUGE_NAME_ETB_DUTY, "%", 1}, {tsOutputChannels.etb1Error, GAUGE_NAME_ETB_ERROR, "%", 3}, - {tsOutputChannels.fuelTankLevel, "fuel level", "%", 0}, + {tsOutputChannels.fuelTankLevel, GAUGE_NAME_FUEL_LEVEL, "%", 0}, {tsOutputChannels.fuelingLoad, GAUGE_NAME_FUEL_LOAD, "%", 1}, {tsOutputChannels.ignitionLoad, GAUGE_NAME_IGNITION_LOAD, "%", 1}, {tsOutputChannels.massAirFlow, GAUGE_NAME_AIR_FLOW, "kg/h", 1}, @@ -90,18 +90,18 @@ static constexpr LogField fields[] = { {tsOutputChannels.fuelFlowRate, GAUGE_NAME_FUEL_FLOW, "g/s", 3}, {tsOutputChannels.totalFuelConsumption, GAUGE_NAME_FUEL_CONSUMPTION, "g", 1}, {tsOutputChannels.knockLevel, GAUGE_NAME_KNOCK_LEVEL, "dBv", 0}, - {tsOutputChannels.knockLevels[0], "Knock 1", "dBv", 0}, - {tsOutputChannels.knockLevels[1], "Knock 2", "dBv", 0}, - {tsOutputChannels.knockLevels[2], "Knock 3", "dBv", 0}, - {tsOutputChannels.knockLevels[3], "Knock 4", "dBv", 0}, - {tsOutputChannels.knockLevels[4], "Knock 5", "dBv", 0}, - {tsOutputChannels.knockLevels[5], "Knock 6", "dBv", 0}, - {tsOutputChannels.knockLevels[6], "Knock 7", "dBv", 0}, - {tsOutputChannels.knockLevels[7], "Knock 8", "dBv", 0}, - {tsOutputChannels.knockLevels[8], "Knock 9", "dBv", 0}, - {tsOutputChannels.knockLevels[9], "Knock 10", "dBv", 0}, - {tsOutputChannels.knockLevels[10], "Knock 11", "dBv", 0}, - {tsOutputChannels.knockLevels[11], "Knock 12", "dBv", 0}, + {tsOutputChannels.knockLevels[0], GAUGE_NAME_KNOCK_1, "dBv", 0}, + {tsOutputChannels.knockLevels[1], GAUGE_NAME_KNOCK_2, "dBv", 0}, + {tsOutputChannels.knockLevels[2], GAUGE_NAME_KNOCK_3, "dBv", 0}, + {tsOutputChannels.knockLevels[3], GAUGE_NAME_KNOCK_4, "dBv", 0}, + {tsOutputChannels.knockLevels[4], GAUGE_NAME_KNOCK_5, "dBv", 0}, + {tsOutputChannels.knockLevels[5], GAUGE_NAME_KNOCK_6, "dBv", 0}, + {tsOutputChannels.knockLevels[6], GAUGE_NAME_KNOCK_7, "dBv", 0}, + {tsOutputChannels.knockLevels[7], GAUGE_NAME_KNOCK_8, "dBv", 0}, + {tsOutputChannels.knockLevels[8], GAUGE_NAME_KNOCK_9, "dBv", 0}, + {tsOutputChannels.knockLevels[9], GAUGE_NAME_KNOCK_10, "dBv", 0}, + {tsOutputChannels.knockLevels[10], GAUGE_NAME_KNOCK_11, "dBv", 0}, + {tsOutputChannels.knockLevels[11], GAUGE_NAME_KNOCK_12, "dBv", 0}, }; static constexpr uint16_t computeFieldsRecordLength() { diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 8532309105..cec69bffe8 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -370,7 +370,6 @@ enable2ndByteCanID = false ; Transmission tcuCurrentGear = scalar, S08, 247, "gear", 1, 0 - tcuDesiredGear = scalar, S08, 262, "gear", 1, 0 knock1 = scalar, S08, 250, "dbv", 1, 0 knock2 = scalar, S08, 251, "dbv", 1, 0 @@ -385,6 +384,7 @@ enable2ndByteCanID = false knock11 = scalar,S08, 260, "dbv", 1, 0 knock12 = scalar,S08, 261, "dbv", 1, 0 + tcuDesiredGear = scalar, S08, 262, "gear", 1, 0 flexPercent = scalar, U08, 263, "%", 0.5, 0 rawIdlePositionSensor = scalar, U16, 264, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 diff --git a/java_console/models/src/main/java/com/rusefi/core/Sensor.java b/java_console/models/src/main/java/com/rusefi/core/Sensor.java index ed34e87d56..02ffdb3f44 100644 --- a/java_console/models/src/main/java/com/rusefi/core/Sensor.java +++ b/java_console/models/src/main/java/com/rusefi/core/Sensor.java @@ -128,6 +128,13 @@ public enum Sensor { wastegatePosition(GAUGE_NAME_WG_POSITION, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 268, 1.0 / PACK_MULT_PERCENT, 0, 100, "%"), idlePositionSensor(GAUGE_NAME_IDLE_POSITION, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 270, 1.0 / PACK_MULT_PERCENT, 0, 100, "%"), + lowFuelPressure(GAUGE_NAME_FUEL_PRESSURE_LOW, SensorCategory.OPERATIONS, FieldType.INT16, 276, 1.0 / PACK_MULT_PRESSURE, 10, 20, "afr"), + highFuelPressure(GAUGE_NAME_FUEL_PRESSURE_HIGH, SensorCategory.OPERATIONS, FieldType.INT16, 278, 1.0 / PACK_MULT_HIGH_PRESSURE, 10, 20, "afr"), + + + airFuelRatio(GAUGE_NAME_AFR, SensorCategory.OPERATIONS, FieldType.INT16, 282, 1.0 / PACK_MULT_AFR, 10, 20, "afr"), + airFuelRatio2(GAUGE_NAME_AFR2, SensorCategory.OPERATIONS, FieldType.INT16, 288, 1.0 / PACK_MULT_AFR, 10, 20, "afr"), + vvtPositionB1E(GAUGE_NAME_VVT_B1E, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 290, 1.0 / PACK_MULT_ANGLE, 0, 5, "deg"), vvtPositionB2I(GAUGE_NAME_VVT_B2I, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 292, 1.0 / PACK_MULT_ANGLE, 0, 5, "deg"), vvtPositionB2E(GAUGE_NAME_VVT_B2E, SensorCategory.SENSOR_INPUTS, FieldType.INT16, 294, 1.0 / PACK_MULT_ANGLE, 0, 5, "deg"), diff --git a/java_console/ui/src/main/java/com/rusefi/sensor_logs/SensorLogger.java b/java_console/ui/src/main/java/com/rusefi/sensor_logs/SensorLogger.java index 16f21d45ca..b9dd86c7bd 100644 --- a/java_console/ui/src/main/java/com/rusefi/sensor_logs/SensorLogger.java +++ b/java_console/ui/src/main/java/com/rusefi/sensor_logs/SensorLogger.java @@ -82,6 +82,10 @@ public class SensorLogger { Sensor.knockLevel, Sensor.wastegatePosition, Sensor.idlePositionSensor, + Sensor.airFuelRatio, + Sensor.airFuelRatio2, + Sensor.lowFuelPressure, + Sensor.highFuelPressure, Sensor.totalTriggerErrorCounter, Sensor.lastErrorCode,