Log gppwm output values (#4385)
* remove debug option * purpose built output channels * name * embiggen sd log buffer * Revert "embiggen sd log buffer" This reverts commit 37432a56535b24c221ae92e9aaded23de4d4a579. * embiggen SD log buffer
This commit is contained in:
parent
d740db8c55
commit
d4b8a036af
|
@ -337,5 +337,7 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 0
|
|||
uint16_t autoscale ISSValue;@@GAUGE_NAME_ISS@@;"RPM",1, 0, 0, 8000, 0
|
||||
|
||||
int16_t[AUX_ANALOG_INPUT_COUNT iterate] autoscale rawAnalogInput;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3
|
||||
uint8_t[62 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
uint8_t[4 iterate] autoscale gppwmOutput;GPPWM Output;"%", 0.5, 0, 0, 100, 2
|
||||
|
||||
uint8_t[58] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
end_struct
|
||||
|
|
|
@ -110,4 +110,8 @@ static constexpr LogField fields[] = {
|
|||
{engine->outputChannels.auxLinear2, GAUGE_NAME_AUX_LINEAR_2, "", 2},
|
||||
{engine->outputChannels.boostControllerOutput, GAUGE_NAME_BOOST_OUTPUT, "%", 1},
|
||||
{engine->outputChannels.boostControllerOpenLoopPart, GAUGE_NAME_BOOST_OPEN_LOOP, "%", 1},
|
||||
{engine->outputChannels.gppwmOutput[0], "GPPWM Output 1", "%", 1},
|
||||
{engine->outputChannels.gppwmOutput[1], "GPPWM Output 2", "%", 1},
|
||||
{engine->outputChannels.gppwmOutput[2], "GPPWM Output 3", "%", 1},
|
||||
{engine->outputChannels.gppwmOutput[3], "GPPWM Output 4", "%", 1},
|
||||
};
|
||||
|
|
|
@ -112,7 +112,7 @@ static void setWarningEnabled(int value) {
|
|||
|
||||
#if EFI_FILE_LOGGING
|
||||
// this one needs to be in main ram so that SD card SPI DMA works fine
|
||||
static NO_CACHE char sdLogBuffer[220];
|
||||
static NO_CACHE char sdLogBuffer[250];
|
||||
static uint64_t binaryLogCount = 0;
|
||||
|
||||
void writeLogLine(Writer& buffer) {
|
||||
|
|
|
@ -53,11 +53,6 @@ void updateGppwm() {
|
|||
for (size_t i = 0; i < efi::size(channels); i++) {
|
||||
float result = channels[i].update();
|
||||
|
||||
#ifdef EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_GPPWM) {
|
||||
scaled_channel<float>* debugFloats = &engine->outputChannels.debugFloatField1;
|
||||
debugFloats[i] = result;
|
||||
}
|
||||
#endif
|
||||
engine->outputChannels.gppwmOutput[i] = result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
typedef enum __attribute__ ((__packed__)) {
|
||||
DBG_0 = 0,
|
||||
DBG_TPS_ACCEL = 1,
|
||||
DBG_GPPWM = 2,
|
||||
DBG_2 = 2,
|
||||
DBG_STEPPER_IDLE_CONTROL = 3,
|
||||
DBG_EL_ACCEL = 4,
|
||||
DBG_TRIGGER_COUNTERS = 5,
|
||||
|
|
|
@ -304,7 +304,7 @@ float baseFuel;+Base mass of the per-cylinder fuel injected during cranking. Thi
|
|||
int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0
|
||||
end_struct
|
||||
|
||||
#define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "GPPWM", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "VVT1 PID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "CJ125", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "INVALID", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53"
|
||||
#define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "INVALID", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "VVT1 PID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "CJ125", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "INVALID", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53"
|
||||
custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@
|
||||
|
||||
#define VM_VVT_INACTIVE 0
|
||||
|
|
|
@ -208,14 +208,14 @@ enable2ndByteCanID = false
|
|||
|
||||
; wall of debug mode :)
|
||||
; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields
|
||||
; Alternator TPS Acceleration GPPWM Idle Engine Load Acc Trigger Counters VVT1 PID Cranking Ignition Timing Fu Corr VSS SD Card Knock Wall Wetting ETB PID Executor InstantRpm CJ125 CAN MAP TLE8888 Analog inputs 2 Start ETB Autotune DYNO_VIEW LOGIC_ANALYZER Wideband TCU Lua VVT2 PID VVT3 PID VVT4 PID
|
||||
; Alternator TPS Acceleration Idle Engine Load Acc Trigger Counters VVT1 PID Cranking Ignition Timing Fu Corr VSS SD Card Knock Wall Wetting ETB PID Executor InstantRpm CJ125 CAN MAP TLE8888 Analog inputs 2 Start ETB Autotune 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", " ", "", "VVT1: Controller Output"," ", "", "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", "", "", "", "","S unused" "", "Osc Amplitude", "", "", "", "" , "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", " ", "", "VVT1: I Term", " ", "", "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", "", "", "", "","S unused" "", "Duty Amplitude", "", "", "", "" , "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", "", "", "", "","S unused" "", "Tu", "", "", "", "" , "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", " ", "", "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","", "", "", "","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", " ", "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"
|
||||
; DBG_ALTERNATOR_PID DBG_TPS_ACCEL DBG_IDLE_CONTROL
|
||||
debugFieldF1List = bits, U08, [0:7], "Alt: Controller Output", "From TPS", "", "Idle: Controller Output", "Idle output", " ", "", "VVT1: Controller Output"," ", "", "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", "", "", "", "","S unused" "", "Osc Amplitude", "", "", "", "" , "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", "", "Idle: I Term", "Idle df2", " ", "", "VVT1: I Term", " ", "", "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", "", "", "", "","S unused" "", "Duty Amplitude", "", "", "", "" , "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", "", "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", "", "", "", "","S unused" "", "Tu", "", "", "", "" , "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", "", "Idle: I Gain", "Idle df4", " ", "", "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","", "", "", "","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", "", "Idle: D Gain", "Idle df5", " ", "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", " ", "", "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", " ", "", "VVT1: P Gain", " ", "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"
|
||||
|
@ -1033,21 +1033,21 @@ luaLastCycleDurationGauge = luaLastCycleDuration,"luaLastCycleDuration", "nt", 0
|
|||
testBenchIterGauge = testBenchIter, "Test Bench Iterations", "count", -10, {benchTestCount + 10}, -5, 0, {benchTestCount}, {benchTestCount + 5}, 1, 1
|
||||
|
||||
gaugeCategory = PIDs
|
||||
alternatorStatus_iTermGauge = alternatorStatus_iTerm,"alternatorStatus_ iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_dTermGauge = alternatorStatus_dTerm,"alternatorStatus_ dTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_outputGauge = alternatorStatus_output,"alternatorStatus_ output", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_errorGauge = alternatorStatus_error,"alternatorStatus_ error", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_resetCounterGauge = alternatorStatus_resetCounter,"alternatorStatus_ resetCounter", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
idleStatus_iTermGauge = idleStatus_iTerm,"idleStatus_ iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_dTermGauge = idleStatus_dTerm,"idleStatus_ dTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_outputGauge = idleStatus_output,"idleStatus_ output", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_errorGauge = idleStatus_error,"idleStatus_ error", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_resetCounterGauge = idleStatus_resetCounter,"idleStatus_ resetCounter", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
etbStatus_iTermGauge = etbStatus_iTerm,"etbStatus_ iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_dTermGauge = etbStatus_dTerm,"etbStatus_ dTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_outputGauge = etbStatus_output,"etbStatus_ output", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_errorGauge = etbStatus_error,"etbStatus_ error", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_resetCounterGauge = etbStatus_resetCounter,"etbStatus_ resetCounter", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
alternatorStatus_iTermGauge = alternatorStatus_iTerm,"Alternator PID iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_dTermGauge = alternatorStatus_dTerm,"Alternator PID dTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_outputGauge = alternatorStatus_output,"Alternator PID output", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_errorGauge = alternatorStatus_error,"Alternator PID error", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alternatorStatus_resetCounterGauge = alternatorStatus_resetCounter,"Alternator PID resetCounter", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
idleStatus_iTermGauge = idleStatus_iTerm,"Idle PID iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_dTermGauge = idleStatus_dTerm,"Idle PID dTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_outputGauge = idleStatus_output,"Idle PID output", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_errorGauge = idleStatus_error,"Idle PID error", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
idleStatus_resetCounterGauge = idleStatus_resetCounter,"Idle PID resetCounter", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
etbStatus_iTermGauge = etbStatus_iTerm,"ETB 1 PID iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_dTermGauge = etbStatus_dTerm,"ETB 1 PID dTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_outputGauge = etbStatus_output,"ETB 1 PID output", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_errorGauge = etbStatus_error,"ETB 1 PID error", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
etbStatus_resetCounterGauge = etbStatus_resetCounter,"ETB 1 PID resetCounter", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
canReadCounterGauge = canReadCounter,"canReadCounter", "", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
||||
canWriteOkGauge = canWriteOk,"canWriteOk", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
canWriteNotOkGauge = canWriteNotOk,"canWriteNotOk", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
|
@ -1261,6 +1261,12 @@ gaugeCategory = Knock
|
|||
gaugeCategory = DynoView
|
||||
accelGauge = VssAcceleration, "Vehicle acceleration", "m/s2", -10, 10, -6, -4, 4, 6, 2, 2
|
||||
|
||||
gaugeCategory = Outputs
|
||||
gppwmGauge = gppwmOutput1, "GPPWM Output 1", "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
gppwmGauge = gppwmOutput2, "GPPWM Output 2", "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
gppwmGauge = gppwmOutput3, "GPPWM Output 3", "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
gppwmGauge = gppwmOutput4, "GPPWM Output 4", "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
|
||||
[WueAnalyze]
|
||||
|
||||
; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition
|
||||
|
|
Loading…
Reference in New Issue