From 433d526ee554d1e2f7393a323f79d00647420827 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 4 Nov 2021 19:43:22 -0400 Subject: [PATCH] turbo speed turbospeed input #2935 --- firmware/console/binary/tunerstudio_outputs.h | 3 ++- firmware/console/status_loop.cpp | 2 ++ firmware/integration/rusefi_config.txt | 1 + firmware/tunerstudio/rusefi.input | 6 +++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 2a40d4fbcd..129b222cc6 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -289,8 +289,9 @@ struct TunerStudioOutputChannels { scaled_channel accelerationYaw; // 312 scaled_channel vvtTargets[4]; // 314 + scaled_channel turboSpeed; // 318 - uint8_t unusedAtTheEnd[20]; // we have some unused bytes to allow compatible TS changes + uint8_t unusedAtTheEnd[18]; // we have some unused bytes to allow compatible TS changes // Temporary - will remove soon TsDebugChannels* getDebugChannels() { diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 55a2c84ed0..cb2683495a 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -741,6 +741,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->VssAcceleration = getDynoviewAcceleration(PASS_ENGINE_PARAMETER_SIGNATURE); #endif + tsOutputChannels->turboSpeed = Sensor::getOrZero(SensorType::TurbochargerSpeed); + #if HW_CHECK_MODE tsOutputChannels->hasCriticalError = 1; #else diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index c73e78b813..cc20e2318e 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1641,6 +1641,7 @@ end_struct #define GAUGE_NAME_TIMING_ADVANCE "timing" #define GAUGE_NAME_VVS "Vehicle Speed" +#define GAUGE_NAME_TURBO_SPEED "Turbocharger Speed" #define GAUGE_NAME_VBAT "VBatt" #define GAUGE_NAME_TIME "Time" #define GAUGE_NAME_RPM "RPM" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 1dc09ee1ae..add4df419a 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -421,6 +421,8 @@ enable2ndByteCanID = false vvtTargetB2I = scalar, S08, 316, "deg", 1, 0 vvtTargetB2E = scalar, S08, 317, "deg", 1, 0 + turboSpeed = scalar, U16, 318, "hz", 1, 0 + rawTps1Secondary = scalar, U16, 300, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 rawTps2Primary = scalar, U16, 302, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 rawTps2Secondary = scalar, U16, 304, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 @@ -1057,7 +1059,8 @@ gaugeCategory = Sensors - Basic gaugeCategory = Sensors - Extra 1 - VSSGauge = vehicleSpeedKph, "Vehicle speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + VSSGauge = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, "kmh", 0, 200, 0, 1, 3, 4, 1, 1 + turboSpeedGauge = turboSpeed, @@GAUGE_NAME_TURBO_SPEED@@, "hz", 0, 200, 0, 1, 3, 4, 1, 1 accelerationXGauge = accelerationX, @@GAUGE_NAME_ACCEL_X@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 accelerationYGauge = accelerationY, @@GAUGE_NAME_ACCEL_Y@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 accelerationZGauge = accelerationZ, @@GAUGE_NAME_ACCEL_Z@@, "acc", -11, 11, 1.0, 1.2, 100, 100, 3, 1 @@ -1292,6 +1295,7 @@ gaugeCategory = DynoView entry = ignitionAdvance, @@GAUGE_NAME_TIMING_ADVANCE@@, float, "%.2f" entry = knockLevel, @@GAUGE_NAME_KNOCK_LEVEL@@, float, "%.2f" entry = vehicleSpeedKph, @@GAUGE_NAME_VVS@@, float, "%.2f" + entry = turboSpeed, @@GAUGE_NAME_TURBO_SPEED@@ int, "%d" entry = speedToRpmRatio, "s2rpm", float, "%.3f" entry = rpmAcceleration, "dRPM", int, "%d" entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f"