From 2f1f042379e3e759befe9805a9a2dc94a4b1d4a5 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 11 Mar 2022 12:48:03 -0800 Subject: [PATCH] sd log blah (#3991) --- firmware/console/binary/output_channels.txt | 4 ++-- firmware/console/binary_log/binary_logging.cpp | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index e45f5ae80f..d3f2597e79 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -261,8 +261,8 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0 int16_t autoscale m_requested_pump;"DI: Pump Angle";"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 0 int16_t autoscale boostControlTarget;"Pump Angle";"deg",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0 - int8_t sparkCutReason;"Spark Cut Code";"code",1, 0, 0, 0, 0 - int8_t fuelCutReason;"Fuel Cut Code";"code",1, 0, 0, 0, 0 + int8_t autoscale sparkCutReason;"Spark Cut Code";"code",1, 0, 0, 0, 0 + int8_t autoscale fuelCutReason;"Fuel Cut Code";"code",1, 0, 0, 0, 0 float fuel_requested_percent;"DI: fuel_requested_percent";"v", 1, 0, 0, 100, 0 float fuel_requested_percent_pi;"DI: fuel_requested_percent_pi";"v", 1, 0, 0, 100, 0 float m_I_sum_percent;"DI: m_I_sum_percent";"v", 1, 0, 0, 100, 0 diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 4c5094fb28..ce2394d93e 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -85,7 +85,8 @@ static constexpr LogField fields[] = { {engine->outputChannels.injectorLagMs, GAUGE_NAME_INJECTOR_LAG, "ms", 3}, {engine->outputChannels.fuelPidCorrection[0], GAUGE_NAME_FUEL_TRIM, "%", 2}, {engine->outputChannels.fuelPidCorrection[1], GAUGE_NAME_FUEL_TRIM_2, "%", 2}, - {engine->outputChannels.wallFuelCorrection, GAUGE_NAME_FUEL_WALL_CORRECTION, "ms", 3}, + {engine->outputChannels.wallFuelCorrection, GAUGE_NAME_FUEL_WALL_CORRECTION, "mg", 3}, + {engine->outputChannels.wallFuelAmount, GAUGE_NAME_FUEL_WALL_CORRECTION, "mg", 3}, {engine->outputChannels.tpsAccelFuel, GAUGE_NAME_FUEL_TPS_EXTRA, "ms", 3}, {engine->outputChannels.ignitionAdvance, GAUGE_NAME_TIMING_ADVANCE, "deg", 1}, {engine->outputChannels.sparkDwellValue, GAUGE_COIL_DWELL_TIME, "ms", 1}, @@ -117,6 +118,8 @@ static constexpr LogField fields[] = { {engine->outputChannels.knock[9], GAUGE_NAME_KNOCK_10, "dBv", 0}, {engine->outputChannels.knock[10], GAUGE_NAME_KNOCK_11, "dBv", 0}, {engine->outputChannels.knock[11], GAUGE_NAME_KNOCK_12, "dBv", 0}, + {engine->outputChannels.sparkCutReason, "Spark Cut Code", "", 0}, + {engine->outputChannels.fuelCutReason, "Fuel Cut Code", "", 0}, }; static constexpr uint16_t computeFieldsRecordLength() {