gauges for raw TPS (#2831)

* ecu part

* gauges

* debug info for ford throttle

* sensible order
This commit is contained in:
Matthew Kennedy 2021-06-18 13:27:44 -07:00 committed by GitHub
parent be80c82b5f
commit c77686ce3b
3 changed files with 19 additions and 3 deletions

View File

@ -275,7 +275,11 @@ typedef struct {
scaled_percent fuelTrim[2]; // 296 & 298
uint8_t unusedAtTheEnd[38]; // we have some unused bytes to allow compatible TS changes
scaled_voltage rawTps1Secondary; // 300
scaled_voltage rawTps2Primary; // 302
scaled_voltage rawTps2Secondary; // 304
uint8_t unusedAtTheEnd[32]; // we have some unused bytes to allow compatible TS changes
// Temporary - will remove soon
TsDebugChannels* getDebugChannels() {

View File

@ -524,6 +524,9 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
// Set raw sensors
tsOutputChannels->rawTps1Primary = Sensor::getRaw(SensorType::Tps1Primary);
tsOutputChannels->rawTps1Secondary = Sensor::getRaw(SensorType::Tps1Secondary);
tsOutputChannels->rawTps2Primary = Sensor::getRaw(SensorType::Tps2Primary);
tsOutputChannels->rawTps2Secondary = Sensor::getRaw(SensorType::Tps2Secondary);
tsOutputChannels->rawPpsPrimary = Sensor::getRaw(SensorType::AcceleratorPedalPrimary);
tsOutputChannels->rawPpsSecondary = Sensor::getRaw(SensorType::AcceleratorPedalSecondary);
tsOutputChannels->rawClt = Sensor::getRaw(SensorType::Clt);
@ -867,6 +870,9 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->debugFloatField3 = Sensor::get(SensorType::Tps1).value_or(0) - Sensor::get(SensorType::Tps2).value_or(0);
// Pedal pri/sec split
tsOutputChannels->debugFloatField4 = Sensor::get(SensorType::AcceleratorPedalPrimary).value_or(0) - Sensor::get(SensorType::AcceleratorPedalSecondary).value_or(0);
// TPS 1 pri/sec ratio - useful for ford ETB that has partial-range second channel
tsOutputChannels->debugFloatField5 = 100 * Sensor::get(SensorType::Tps1Primary).value_or(0) / Sensor::get(SensorType::Tps1Secondary).value_or(0);
break;
case DBG_INSTANT_RPM:
{

View File

@ -402,6 +402,9 @@ enable2ndByteCanID = false
vvtPositionBank2= scalar, U16, 292, "deg",{1/@@PACK_MULT_ANGLE@@}, 0
secondVvtPositionBank2=scalar,U16, 294, "deg",{1/@@PACK_MULT_ANGLE@@}, 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
;
; see TunerStudioOutputChannels struct
;
@ -441,7 +444,7 @@ enable2ndByteCanID = false
debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "GPPWM 2", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "VVT Ratio", "", "Ign CLT Corr", "", "", "Write Cnt","", "", "", "ETB I-Term", "", "", "df2", "df2", "InstantRPM Ratio","fsio 2", "24:df2", "CJ125: i-term", "", "", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude", "", "fsio 9", "idle min", "Pressure ratio vs. nominal", "Speed", "", "WB: ESR", "", "Lua Debug 2"
debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "GPPWM 3", "prev error", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "Sync Cnt", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "fsio 3", "24:df3", "CJ125: err", "", "", "", "", "", "", "TPS1/2 Diff", "", "", "", "", "S unused" "", "Tu", "", "fsio 10", "", "Flow ratio vs. configured", "DeltaSpeed", "", "WB: Nernst Voltage", "", "Lua Debug 3"
debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "GPPWM 4", "I Gain", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "File Cnt", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "fsio 4", "24:df4", "CJ125: UA", "", "MAP Estimate", "", "", "", "", "Acc Pedal Pri/Sec Diff","", "", "", "", "S unused" "", "Ku", "", "fsio 11", "", "", "accel", "", "WB: Lambda", "", "Lua Debug 4"
debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "D Gain", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "fsio 5", "24:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp", "", "fsio 12", "", "", "", "", "", "", "Lua Debug 5"
debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "D Gain", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "fsio 5", "24:df5", "CJ125: UR", "", "", "", "", "", "", "TPS1 Pri/Sec Ratio", "", "", "", "", "S unused" "", "Kp", "", "fsio 12", "", "", "", "", "", "", "Lua Debug 5"
debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "D Term", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "fsio 6", "24:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki", "", "fsio 13", "", "", "", "", "", "", "Lua Debug 6"
debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "Max-Value", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "fsio 7", "24:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd", "", "fsio 14", "", "", "", "", "", "", "Lua Debug 7"
@ -1087,11 +1090,14 @@ gaugeCategory = Throttle Body (incl. ETB)
gaugeCategory = Sensors - Raw
rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawTps1SecondaryGauge = rawTps1Secondary, "Raw TPS 1 Secondary", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawTps2PrimaryGauge = rawTps2Primary, "Raw TPS 2 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawTps2SecondaryGauge = rawTps2Secondary, "Raw TPS 2 Secondary", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawPpsSecondaryGauge = rawPpsSecondary,"Raw Pedal Secondary","volts",0, 5, 0, 0, 5, 5, 3, 0
rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0
rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0
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
rawLowFuelPressureGauge = rawLowFuelPressure,"Raw fuel pressure (low) voltage","volts", 0, 5, 0, 0, 5, 5, 3, 0