From 520b23793592dabd13dbe3d38c398076f1fea0f4 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 3 Oct 2021 22:45:47 -0400 Subject: [PATCH] rusEFI console logs are missing some fields #3314 --- firmware/console/binary_log/binary_logging.cpp | 10 ++++++---- .../models/src/main/java/com/rusefi/core/Sensor.java | 8 +++++++- .../main/java/com/rusefi/sensor_logs/SensorLogger.java | 4 ++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 68cec10cae..68a5446bf3 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -59,6 +59,8 @@ static constexpr LogField fields[] = { {tsOutputChannels.vvtPositionB1E, GAUGE_NAME_VVT_B1E, "deg", 1}, {tsOutputChannels.vvtPositionB2I, GAUGE_NAME_VVT_B2I, "deg", 1}, {tsOutputChannels.vvtPositionB2E, GAUGE_NAME_VVT_B2E, "deg", 1}, + {tsOutputChannels.wastegatePosition, GAUGE_NAME_WG_POSITION, "%", 2}, + {tsOutputChannels.idlePositionSensor, GAUGE_NAME_IDLE_POSITION, "%", 2}, {tsOutputChannels.chargeAirMass, GAUGE_NAME_AIR_MASS, "g", 3}, {tsOutputChannels.currentTargetAfr, GAUGE_NAME_TARGET_AFR, "afr", 2}, {tsOutputChannels.targetLambda, GAUGE_NAME_TARGET_LAMBDA, "", 3}, @@ -67,7 +69,7 @@ static constexpr LogField fields[] = { {tsOutputChannels.actualLastInjection, GAUGE_NAME_FUEL_LAST_INJECTION, "ms", 3}, {tsOutputChannels.injectorDutyCycle, GAUGE_NAME_FUEL_INJ_DUTY, "%", 0}, {tsOutputChannels.veValue, GAUGE_NAME_FUEL_VE, "%", 1}, - {tsOutputChannels.tCharge, "tCharge", "C", 1}, + {tsOutputChannels.tCharge, GAUGE_NAME_TCHARGE, "C", 1}, {tsOutputChannels.injectorLagMs, GAUGE_NAME_INJECTOR_LAG, "ms", 3}, {tsOutputChannels.fuelTrim[0], GAUGE_NAME_FUEL_TRIM, "%", 2}, {tsOutputChannels.fuelTrim[1], GAUGE_NAME_FUEL_TRIM_2, "%", 2}, @@ -77,9 +79,9 @@ static constexpr LogField fields[] = { {tsOutputChannels.sparkDwell, GAUGE_COIL_DWELL_TIME, "ms", 1}, {tsOutputChannels.coilDutyCycle, GAUGE_NAME_DWELL_DUTY, "%", 0}, {tsOutputChannels.idlePosition, GAUGE_NAME_IAC, "%", 1}, - {tsOutputChannels.etbTarget, "ETB Target", "%", 2}, - {tsOutputChannels.etb1DutyCycle, "ETB Duty", "%", 1}, - {tsOutputChannels.etb1Error, "ETB Error", "%", 3}, + {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.fuelingLoad, GAUGE_NAME_FUEL_LOAD, "%", 1}, {tsOutputChannels.ignitionLoad, GAUGE_NAME_IGNITION_LOAD, "%", 1}, 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 02dced7835..ed34e87d56 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 @@ -90,6 +90,7 @@ public enum Sensor { // Fuel system // Knock + knockLevel(GAUGE_NAME_KNOCK_LEVEL, SensorCategory.DEBUG, FieldType.FLOAT, 108, 0, 5), // Mode, firmware, protocol, run time TIME_SECONDS(GAUGE_NAME_TIME, SensorCategory.OPERATIONS, FieldType.INT, 112, 1, 0, 5, ""), @@ -100,7 +101,7 @@ public enum Sensor { engineMakeCodeNameCrc16("engine crc16", SensorCategory.STATUS, FieldType.UINT16, 138, 0, 5), // Errors totalTriggerErrorCounter(GAUGE_NAME_TRG_ERR, SensorCategory.STATUS, FieldType.INT, 140, 0, 5), - lastErrorCode("last error", SensorCategory.STATUS, FieldType.INT, 150, 0, 5), + lastErrorCode(GAUGE_NAME_WARNING_LAST, SensorCategory.STATUS, FieldType.INT, 150, 0, 5), // Debug debugFloatField1(GAUGE_NAME_DEBUG_F1, SensorCategory.DEBUG, FieldType.FLOAT, 168, 0, 5), @@ -115,6 +116,8 @@ public enum Sensor { debugIntField3(GAUGE_NAME_DEBUG_I3, SensorCategory.DEBUG, FieldType.INT, 204, 0, 5), debugIntField4("debug i4", SensorCategory.DEBUG, FieldType.INT16, 208, 0, 5), debugIntField5("debug i5", SensorCategory.DEBUG, FieldType.INT16, 210, 0, 5), + // accelerationX; // 212 + // accelerationY; // 214 tuneCrc16("tune crc16", SensorCategory.STATUS, FieldType.UINT16, 244, 0, 5), @@ -122,6 +125,9 @@ public enum Sensor { rawClt("raw CLT", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 238, 1.0 / PACK_MULT_VOLTAGE, 0, 5, "volts"), rawIat("raw IAT", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 240, 1.0 / PACK_MULT_VOLTAGE, 0, 5, "volts"), + 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, "%"), + 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 d41613e92c..16f21d45ca 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 @@ -79,6 +79,10 @@ public class SensorLogger { Sensor.debugIntField4, Sensor.debugIntField5, + Sensor.knockLevel, + Sensor.wastegatePosition, + Sensor.idlePositionSensor, + Sensor.totalTriggerErrorCounter, Sensor.lastErrorCode,