map averaging usability (#3603)

This commit is contained in:
Matthew Kennedy 2021-11-24 11:39:54 -08:00 committed by GitHub
parent ffe525c160
commit 09bf989995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -70,7 +70,6 @@ static float v_averagedMapValue;
static float averagedMapRunningBuffer[MAX_MAP_BUFFER_LENGTH];
int mapMinBufferLength = 0;
static int averagedMapBufIdx = 0;
static adcsample_t fastestRawAdc;
/**
* here we have averaging start and averaging end points for each cylinder
@ -112,7 +111,6 @@ static void startAveraging(scheduling_s *endAveragingScheduling) {
void mapAveragingAdcCallback(adcsample_t adcValue) {
efiAssertVoid(CUSTOM_ERR_6650, getCurrentRemainingStack() > 128, "lowstck#9a");
fastestRawAdc = adcValue;
if (!isAveraging && engine->sensorChartMode != SC_MAP) {
return;
}
@ -130,6 +128,13 @@ void mapAveragingAdcCallback(adcsample_t adcValue) {
}
#endif /* EFI_SENSOR_CHART */
#if EFI_TUNER_STUDIO
if (engineConfiguration->debugMode == DBG_MAP) {
float voltage = adcToVoltsDivided(adcValue);
tsOutputChannels.debugFloatField5 = convertMap(voltage).value_or(0);
}
#endif // EFI_TUNER_STUDIO
/* Calculates the average values from the ADC samples.*/
if (isAveraging) {
// with locking we will have a consistent state
@ -190,7 +195,6 @@ void postMapState(TunerStudioOutputChannels *tsOutputChannels) {
tsOutputChannels->debugFloatField2 = engine->engineState.mapAveragingDuration;
tsOutputChannels->debugFloatField3 = Sensor::getOrZero(SensorType::MapFast);
tsOutputChannels->debugIntField1 = mapMeasurementsCounter;
tsOutputChannels->debugIntField1 = fastestRawAdc;
}
#endif /* EFI_TUNER_STUDIO */

View File

@ -468,7 +468,7 @@ enable2ndByteCanID = false
debugFieldF2List = bits, U08, [0:7], "Alt: I Term", "To TPS", "GPPWM 2", "Idle: I Term", "Idle df2", "Channel 2 Rise Counter", "", "VVT1: I Term", "VVT Ratio", "", "Ign CLT Corr", "", "", "Write Cnt","last filtered","", "WW: Beta", "ETB I Term", "", "", "df2", "df2", "InstantRPM Ratio","", "24:df2", "CJ125: i term", "", "MAP Duration", "", "", "", "", "TPS2 Pri/Sec Diff", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude", "", "", "", "Pressure ratio vs. nominal", "Speed", "", "WB: ESR", "", "Lua Debug 2", "VVT2: I Term", "VVT3: I Term", "VVT4: I Term"
debugFieldF3List = bits, U08, [0:7], "Alt: Previous Error", "Current TPS<>TPS", "GPPWM 3", "Idle: prev error", "Idle df3", "ICU sum", "", "VVT1: prev error", "", "", "", "", "", "Sync Cnt", "", "", "WW: film mass", "ETB err", "", "", "df3", "df3", "22df3", "", "24:df3", "CJ125: err", "", "MAP Fast", "", "", "", "", "TPS1/2 Diff", "", "", "", "Boost Duty", "S unused" "", "Tu", "", "", "", "Flow ratio vs. configured", "DeltaSpeed", "", "WB: Nernst Voltage", "", "Lua Debug 3", "VVT2: prev error", "VVT3: prev error", "VVT4: prev error"
debugFieldF4List = bits, U08, [0:7], "Alt: I Gain", "Extra Fuel", "GPPWM 4", "Idle: I Gain", "Idle df4", "VVT rise", "", "VVT1: I Gain", "", "", "Ign PID Adj", "", "", "File Cnt", "", "", "WW: m_cmd", "ETB I setting", "", "", "df4", "df4", "22df4", "", "24:df4", "CJ125: UA", "", "MAP Estimate", "", "", "", "", "Acc Pedal Pri/Sec Diff","", "", "", "Boost Target", "S unused" "", "Ku", "", "", "", "", "accel", "", "WB: Lambda", "", "Lua Debug 4", "VVT2: I Gain", "VVT3: I Gain", "VVT4: I Gain"
debugFieldF5List = bits, U08, [0:7], "Alt: D Gain", "df5", "df5", "Idle: D Gain", "Idle df5", "VVT fall", "df5", "VVT1: D Gain", "", "", "", "", "", "", "", "", "WW: film mass next","ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "24:df5", "CJ125: UR", "", "", "", "", "", "", "TPS1 Pri/Sec Ratio", "", "", "", "", "S unused" "", "Kp", "", "", "", "", "", "", "", "", "Lua Debug 5", "VVT2: D Gain", "VVT3: D Gain", "VVT4: D Gain"
debugFieldF5List = bits, U08, [0:7], "Alt: D Gain", "df5", "df5", "Idle: D Gain", "Idle df5", "VVT fall", "df5", "VVT1: D Gain", "", "", "", "", "", "", "", "", "WW: film mass next","ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "24:df5", "CJ125: UR", "", "MAP Instant", "", "", "", "", "TPS1 Pri/Sec Ratio", "", "", "", "", "S unused" "", "Kp", "", "", "", "", "", "", "", "", "Lua Debug 5", "VVT2: D Gain", "VVT3: D Gain", "VVT4: D Gain"
debugFieldF6List = bits, U08, [0:7], "Alt: D Term", "", "", "Idle: D Term", "Idle df6", "Current Gap", "", "VVT1: D Term", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "24:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki", "", "", "", "", "", "", "", "", "Lua Debug 6", "VVT2: D Term", "VVT3: D Term", "VVT4: D Term"
debugFieldF7List = bits, U08, [0:7], "Alt: Max-Value", "", "", "Idle: Max-Value", "Idle df7", "", "", "VVT1: Max-Value", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "24:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd", "", "", "", "", "", "", "", "", "Lua Debug 7", "", "", ""
debugFieldI1List = bits, U08, [0:7], "Alt: P Gain", "", "", "Idle: P Gain", "Idle di1", "Channel 1 Fall Counter", "", "VVT1: P Gain", "VVT Sync Counter", "Cycle Counter", "Multispark Count", "", "", "", "hip corr", "", "", "ETB P-Gain", "t counter", "", "di1", "di1", "Spark Event Gap","", "24:di1", "CJ125: state", "read count","MAP counter", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count", "", "", "", "", "", "", "deltatime", "", "", "Solenoid 1 State", "Lua memory used","VVT2: P Gain", "VVT3: P Gain", "VVT4: P Gain"