From fadfc8d09b82b944d0b92b0fcade1064a6e7550e Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 9 Dec 2020 13:30:51 -0600 Subject: [PATCH] config for second lambda (#2047) * config * size Co-authored-by: Matthew Kennedy --- firmware/console/binary/tunerstudio_outputs.h | 6 +++++- firmware/integration/rusefi_config.txt | 2 ++ firmware/tunerstudio/rusefi.input | 12 +++++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index b01548a12c..a9b88673d4 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -261,8 +261,12 @@ typedef struct { scaled_afr airFuelRatio; // 282 scaled_ms VssAcceleration; //284 + + scaled_lambda lambda2; // 286 + scaled_afr airFuelRatio2; // 288 + //288 - uint8_t unusedAtTheEnd[54]; // we have some unused bytes to allow compatible TS changes + uint8_t unusedAtTheEnd[48]; // we have some unused bytes to allow compatible TS changes // Temporary - will remove soon TsDebugChannels* getDebugChannels() { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 6a384b63a7..f3a8a6c2b4 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1674,7 +1674,9 @@ end_struct #define GAUGE_NAME_TARGET_AFR "fuel: target AFR" #define GAUGE_NAME_TARGET_LAMBDA "fuel: target lambda" #define GAUGE_NAME_AFR "Air/Fuel Ratio" +#define GAUGE_NAME_AFR2 "Air/Fuel Ratio 2" #define GAUGE_NAME_LAMBDA "Lambda" +#define GAUGE_NAME_LAMBDA2 "Lambda 2" #define GAUGE_NAME_IAC "Idle Air Valve" #define GAUGE_NAME_DWELL_DUTY "dwell: coil duty cycle" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index a6e271e66c..11ff512c56 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -388,6 +388,8 @@ enable2ndByteCanID = false targetLambda = scalar, U16, 280, "",{1/@@PACK_MULT_LAMBDA@@}, 0.0 AFRValue = scalar, U16, 282, "AFR",{1/@@PACK_MULT_AFR@@}, 0.0 VssAcceleration = scalar, S16, 284, "m/s2", {1/@@PACK_MULT_MS@@}, 0.0 + lambdaValue2 = scalar, U16, 286, "",{1/@@PACK_MULT_LAMBDA@@}, 0.0 + AFRValue2 = scalar, U16, 288, "AFR",{1/@@PACK_MULT_AFR@@}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -977,8 +979,10 @@ gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 - afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 - lambda1Gauge = lambdaValue, "Lambda", "", 0.65, 1.2, 0.7, 0.75, 1.1, 1.15, 3, 2 + afr1Gauge = AFRValue, @@GAUGE_NAME_AFR@@, "", 10, 19.4, 12, 13, 15, 16, 2, 2 + afr2Gauge = AFRValue2, @@GAUGE_NAME_AFR2@@, "", 10, 19.4, 12, 13, 15, 16, 2, 2 + lambda1Gauge = lambdaValue, @@GAUGE_NAME_LAMBDA@@, "", 0.65, 1.2, 0.7, 0.75, 1.1, 1.15, 3, 2 + lambda2Gauge = lambdaValue2, @@GAUGE_NAME_LAMBDA2@@, "", 0.65, 1.2, 0.7, 0.75, 1.1, 1.15, 3, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 MAPGauge = MAPValue, "MAP", "kPa", 0, 300, 10, 10, 200, 200, 0, 0 @@ -1186,7 +1190,9 @@ gaugeCategory = DynoView entry = MAFValue, @@GAUGE_NAME_MAF@@, float, "%.2f" entry = MAPValue, @@GAUGE_NAME_MAP@@, float, "%.1f" entry = AFRValue, @@GAUGE_NAME_AFR@@, float, "%.2f" - entry = lambdaValue, @@GAUGE_NAME_LAMBDA@@, float, "%.2f" + entry = AFRValue2, @@GAUGE_NAME_AFR2@@, float, "%.2f" + entry = lambdaValue, @@GAUGE_NAME_LAMBDA@@, float, "%.2f" + entry = lambdaValue2, @@GAUGE_NAME_LAMBDA2@@, float, "%.2f" entry = VBatt, @@GAUGE_NAME_VBAT@@, float, "%.2f" entry = engineLoad, @@GAUGE_NAME_ENGINE_LOAD@@, float, "%.1f" entry = fuelingLoad, @@GAUGE_NAME_FUEL_LOAD@@, float, "%.1f"