From edd7cc34d149c2488f58ce767217f818cb52e60c Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 22 Oct 2020 23:17:29 -0400 Subject: [PATCH] GDI Epic #1448 --- firmware/console/binary/tunerstudio_outputs.h | 5 ++++- firmware/console/status_loop.cpp | 10 ++++++++++ firmware/tunerstudio/rusefi.input | 5 +++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 1b160386f6..183fd8a2ea 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -250,7 +250,10 @@ typedef struct { scaled_percent wastegatePosition; // 268 scaled_percent idlePositionSensor; // 270 - uint8_t unusedAtTheEnd[16]; // we have some unused bytes to allow compatible TS changes + scaled_voltage lowFuelPressure; // 272 + scaled_voltage highFuelPressure1; // 274 + + uint8_t unusedAtTheEnd[12]; // 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 ebf5c9a4fc..d4eece9d54 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -523,6 +523,16 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ // offset 16 tsOutputChannels->massAirFlowVoltage = hasMafSensor() ? getMafVoltage(PASS_ENGINE_PARAMETER_SIGNATURE) : 0; + + if (engineConfiguration->high_fuel_pressure_sensor_1 != EFI_ADC_NONE) { + tsOutputChannels->highFuelPressure1 = getVoltage("highFP", engineConfiguration->high_fuel_pressure_sensor_1 PASS_ENGINE_PARAMETER_SUFFIX); + } + + if (engineConfiguration->low_fuel_pressure_sensor != EFI_ADC_NONE) { + tsOutputChannels->lowFuelPressure = getVoltage("lowFP", engineConfiguration->low_fuel_pressure_sensor PASS_ENGINE_PARAMETER_SUFFIX); + } + + // offset 20 tsOutputChannels->airFuelRatio = Sensor::get(SensorType::Lambda).value_or(0) * 14.7f; diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index c54add81e4..b42c420d42 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -364,6 +364,9 @@ enable2ndByteCanID = false wastegatePositionSensor = scalar, S16, 268, "%",{1/@@PACK_MULT_PERCENT@@}, 0 idlePositionSensor = scalar, S16, 270, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + lowFPValue = scalar, U16, 272, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + highFP1Value = scalar, U16, 274, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0 + ; ; see TunerStudioOutputChannels struct ; @@ -1001,6 +1004,8 @@ gaugeCategory = Sensors - Raw rawPpsSecondaryGauge = rawPpsSecondary,"Raw Pedal Secondary","volts", 0, 5, 0, 0, 5, 5, 3, 0 rawIdlePositionSensorGauge = rawIdlePositionSensor, "Raw Idle Position", "volts", 0, 5, 0, 0, 5, 5, 3, 0 rawWastegatePositionGauge = rawWastegatePosition,"Raw Wastegate Position","volts", 0, 5, 0, 0, 5, 5, 3, 0 + lowFPValueGauge = lowFPValue,"Raw low fuel voltage","volts", 0, 5, 0, 0, 5, 5, 3, 0 + highFP1ValueGauge = highFP1Value,"Raw high1 fuel voltage","volts", 0, 5, 0, 0, 5, 5, 3, 0 gaugeCategory = Transmission desiredGearGauge = tcuDesiredGear, "Desired", "gear", -1, 10, -1, -1, 10, 10, 0, 0