From e30bde38021f281451a9af25c7dcdec99e27d6f4 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 4 Oct 2021 00:30:20 -0400 Subject: [PATCH] rusEFI console logs are missing some fields #3314 --- firmware/console/binary/tunerstudio_outputs.h | 4 ++-- firmware/console/binary_log/binary_logging.cpp | 2 ++ java_console/models/src/main/java/com/rusefi/core/Sensor.java | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index a9bb60339d..424f546048 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -242,13 +242,13 @@ struct TunerStudioOutputChannels { uint8_t sd_msd : 1; // bit 1 uint8_t isFan2On : 1; // bit 2 - int8_t tcuCurrentGear; // 247 + scaled_channel tcuCurrentGear; // 247 scaled_voltage rawPpsSecondary; // 248 scaled_channel knockLevels[12]; // 250 - int8_t tcuDesiredGear; // 262 + scaled_channel tcuDesiredGear; // 262 scaled_channel flexPercent; // 263 scaled_voltage rawIdlePositionSensor; // 264 diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 7450c07dd5..8bac98594e 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -86,6 +86,8 @@ static constexpr LogField fields[] = { {tsOutputChannels.fuelingLoad, GAUGE_NAME_FUEL_LOAD, "%", 1}, {tsOutputChannels.ignitionLoad, GAUGE_NAME_IGNITION_LOAD, "%", 1}, {tsOutputChannels.massAirFlow, GAUGE_NAME_AIR_FLOW, "kg/h", 1}, + {tsOutputChannels.tcuDesiredGear, GAUGE_NAME_DESIRED_GEAR, "gear", 0}, + {tsOutputChannels.tcuCurrentGear, GAUGE_NAME_CURRENT_GEAR, "gear", 0}, {tsOutputChannels.flexPercent, GAUGE_NAME_FLEX, "%", 1}, {tsOutputChannels.fuelFlowRate, GAUGE_NAME_FUEL_FLOW, "g/s", 3}, {tsOutputChannels.totalFuelConsumption, GAUGE_NAME_FUEL_CONSUMPTION, "g", 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 02ffdb3f44..3a1278c85a 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 @@ -125,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"), + tcuDesiredGear(GAUGE_NAME_DESIRED_GEAR, SensorCategory.SENSOR_INPUTS, FieldType.INT8, 262, 1.0, 0, 100, "gear"), + flexPercent(GAUGE_NAME_FLEX, SensorCategory.SENSOR_INPUTS, FieldType.INT8, 263, 1.0 / 2, 0, 100, "%"), + 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, "%"),