MAP phase sensing #3544

This commit is contained in:
rusefillc 2021-11-14 21:24:44 -05:00
parent e07987a601
commit 0722d6280d
3 changed files with 9 additions and 8 deletions

View File

@ -12,10 +12,6 @@ struct air_pressure_sensor_config_s;
void initMapDecoder(DECLARE_ENGINE_PARAMETER_SIGNATURE);
/**
* @return Raw MAP sensor value right now
*/
float getRawMap(DECLARE_ENGINE_PARAMETER_SIGNATURE);
float getBaroPressure(DECLARE_ENGINE_PARAMETER_SIGNATURE);
float decodePressure(float voltage, air_pressure_sensor_config_s * mapConfig DECLARE_ENGINE_PARAMETER_SUFFIX);

View File

@ -20,6 +20,10 @@ enum class SensorType : unsigned char {
Clt, // 1
Iat,
Rpm,
/**
* This value is result of averaging within user-defined window
* See also MapFast, MapSlow
*/
Map,
Maf,
@ -81,6 +85,7 @@ enum class SensorType : unsigned char {
// Fast MAP is synchronous to crank angle - user selectable phase/window
MapFast,
// Slow MAP is asynchronous - not synced to anything, normal analog sampling
// MAP decoding happens only that often thus this is NOT raw MAP as flows from ADC
MapSlow,
// Leave me at the end!

View File

@ -464,14 +464,14 @@ enable2ndByteCanID = false
; Alternator TPS Acceleration GPPWM Idle Engine Load Acc Trigger Counters VVT1 PID VVT Sync Cranking Ignition Timing Fu Corr VSS SD Card Knock Wall Wetting ETB PID Executor InstantRpm CJ125 CAN MAP TLE8888 Analog inputs 2 Boost Start Launcher ETB Autotune Injector flow compensation DYNO_VIEW LOGIC_ANALYZER Wideband TCU Lua VVT2 PID VVT3 PID VVT4 PID
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
; DBG_ALTERNATOR_PID DBG_TPS_ACCEL DBG_GPPWM DBG_IDLE_CONTROL
debugFieldF1List = bits, U08, [0:7], "Alt: Controller Output", "From TPS", "GPPWM 1", "Idle: Controller Output", "Idle output", "Channel 1 Rise Counter", "", "VVT1: Controller Output","VVT Event Position", "", "Ign IAT Corr", "", "", "Total SD", "last volts", "", "WW: Alpha", "ETB Controller Output", "", "", "df1", "df1", "InstantRpm", "", "24:df1", "CJ125: output", "", "", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude", "", "", "", "Pressure across injector(kpa)", "VSS", "", "WB: Pump DAC duty", "", "Lua Debug 1", "VVT2: Controller Output","VVT3: Controller Output","VVT4: Controller Output"
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", "", "", "", "", "", "", "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", "", "", "", "", "", "", "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"
debugFieldF1List = bits, U08, [0:7], "Alt: Controller Output", "From TPS", "GPPWM 1", "Idle: Controller Output", "Idle output", "Channel 1 Rise Counter", "", "VVT1: Controller Output","VVT Event Position", "", "Ign IAT Corr", "", "", "Total SD", "last volts", "", "WW: Alpha", "ETB Controller Output", "", "", "df1", "df1", "InstantRpm", "", "24:df1", "CJ125: output", "", "MAP Average", "", "", "", "", "TPS1 Pri/Sec Diff", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude", "", "", "", "Pressure across injector(kpa)", "VSS", "", "WB: Pump DAC duty", "", "Lua Debug 1", "VVT2: Controller Output","VVT3: Controller Output","VVT4: Controller Output"
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"
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","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count", "", "", "", "", "", "", "deltatime", "", "", "Solenoid 1 State", "Lua memory used","VVT2: P Gain", "VVT3: P Gain", "VVT4: P Gain"
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"
debugFieldI2List = bits, U08, [0:7], "Alt: Offset", "", "", "Idle: Offset", "Idle di2", "Channel 2 Fall Counter", "", "VVT1: Offset", "", "", "", "", "", "", "hip incor", "", "", "ETB di2", "invocationcounter", "", "di2", "di2", "Inj Event Gap", "", "24:di2", "", "write count","", "", "", "", "Latest Transmit","", "", "", "", "", "Starter Enable", "", "", "", "", "", "", "", "", "", "Solenoid 2 State", "", "VVT2: Offset", "VVT3: Offset", "VVT4: Offset"
debugFieldI3List = bits, U08, [0:7], "Alt: Reset Cnt", "", "", "Idle: Reset Cnt", "Idle di3", "Cycle Index", "", "VVT1: 10xTarget", "", "", "", "", "", "", "", "", "", "ETB di3", "s counter", "", "di3", "di3", "22di3", "", "24:di3", "", "write err", "", "", "", "", "Latest Received","", "", "", "", "", "Starter Disable","", "", "", "", "", "", "", "", "", "Solenoid 3 State", "", "VVT2: 10xTarger", "VVT3: 10xTarger", "VVT4: 10xTarger"
debugFieldI4List = bits, U08, [0:7], "Alt: Period", "", "", "Idle: State", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "executor", "", "di4", "di4", "22di4", "", "24:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "", "", "", "", "", "", "", "", "Solenoid 4 State", "", "", "", ""