unconditional VVT PID logging
This commit is contained in:
parent
9d63673dc5
commit
db8a965288
|
@ -90,12 +90,7 @@ expected<percent_t> VvtController::getClosedLoop(angle_t target, angle_t observa
|
|||
}
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
static constexpr const debug_mode_e debugModeByIndex[4] = {DBG_VVT_1_PID, DBG_VVT_2_PID, DBG_VVT_3_PID, DBG_VVT_4_PID};
|
||||
|
||||
if (engineConfiguration->debugMode == debugModeByIndex[index]) {
|
||||
m_pid.postState(&engine->outputChannels);
|
||||
engine->outputChannels.debugIntField3 = (int)(10 * target);
|
||||
}
|
||||
m_pid.postState(engine->outputChannels.vvtStatus[index]);
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
// User labels say "advance" and "retard"
|
||||
|
|
|
@ -136,14 +136,8 @@ case DBG_UNUSED41:
|
|||
return "DBG_UNUSED41";
|
||||
case DBG_UNUSED_42:
|
||||
return "DBG_UNUSED_42";
|
||||
case DBG_VVT_1_PID:
|
||||
return "DBG_VVT_1_PID";
|
||||
case DBG_VVT_2_PID:
|
||||
return "DBG_VVT_2_PID";
|
||||
case DBG_VVT_3_PID:
|
||||
return "DBG_VVT_3_PID";
|
||||
case DBG_VVT_4_PID:
|
||||
return "DBG_VVT_4_PID";
|
||||
case DBG_7:
|
||||
return "DBG_7";
|
||||
case UNUSED23:
|
||||
return "UNUSED23";
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
DBG_EL_ACCEL = 4,
|
||||
DBG_TRIGGER_COUNTERS = 5,
|
||||
DBG_SOFT_SPARK_CUT = 6,
|
||||
DBG_VVT_1_PID = 7,
|
||||
DBG_7 = 7,
|
||||
DBG_8 = 8,
|
||||
DBG_9 = 9,
|
||||
DBG_10 = 10,
|
||||
|
@ -299,9 +299,6 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
DBG_46 = 46,
|
||||
DBG_TCU = 47,
|
||||
DBG_LUA = 48,
|
||||
DBG_VVT_2_PID = 49,
|
||||
DBG_VVT_3_PID = 50,
|
||||
DBG_VVT_4_PID = 51,
|
||||
|
||||
} debug_mode_e;
|
||||
|
||||
|
|
|
@ -298,9 +298,7 @@ void CJ125::calibrate() {
|
|||
cjPrintData();
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_CJ125) {
|
||||
cjPostState(&engine->outputChannels);
|
||||
}
|
||||
// todo: reimplement as explicit CJ PID status if desired cjPostState(&engine->outputChannels);
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
vUaCal += vUa;
|
||||
|
|
|
@ -302,7 +302,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", "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"
|
||||
#define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "INVALID", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "INVALID", "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"
|
||||
custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@
|
||||
|
||||
#define VM_VVT_INACTIVE 0
|
||||
|
|
|
@ -131,9 +131,6 @@ void Pid::setErrorAmplification(float coef) {
|
|||
}
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) const {
|
||||
postState(tsOutputChannels, 1);
|
||||
}
|
||||
|
||||
void Pid::postState(pid_status_s& pidStatus) const {
|
||||
pidStatus.output = output;
|
||||
|
@ -142,24 +139,6 @@ void Pid::postState(pid_status_s& pidStatus) const {
|
|||
pidStatus.iTerm = iTerm;
|
||||
pidStatus.dTerm = dTerm;
|
||||
}
|
||||
|
||||
/**
|
||||
* see https://rusefi.com/wiki/index.php?title=Manual:Debug_fields
|
||||
*/
|
||||
void Pid::postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) const {
|
||||
tsOutputChannels->debugFloatField1 = output;
|
||||
tsOutputChannels->debugFloatField2 = iTerm;
|
||||
tsOutputChannels->debugFloatField3 = getPrevError();
|
||||
tsOutputChannels->debugFloatField4 = getI();
|
||||
tsOutputChannels->debugFloatField5 = getD();
|
||||
tsOutputChannels->debugFloatField6 = dTerm;
|
||||
// tsOutputChannels->debugFloatField6 = parameters->minValue;
|
||||
tsOutputChannels->debugFloatField7 = parameters->maxValue;
|
||||
tsOutputChannels->debugIntField1 = getP() * pMult;
|
||||
tsOutputChannels->debugIntField2 = getOffset();
|
||||
tsOutputChannels->debugIntField3 = resetCounter;
|
||||
tsOutputChannels->debugIntField4 = parameters->periodMs;
|
||||
}
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
void Pid::sleep() {
|
||||
|
|
|
@ -59,8 +59,6 @@ public:
|
|||
void setErrorAmplification(float coef);
|
||||
#if EFI_TUNER_STUDIO
|
||||
void postState(pid_status_s& pidStatus) const;
|
||||
void postState(TunerStudioOutputChannels *tsOutputChannels) const;
|
||||
void postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) const;
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
void showPidStatus(const char* msg) const;
|
||||
void sleep();
|
||||
|
|
Loading…
Reference in New Issue