auto-sync
This commit is contained in:
parent
94398777bb
commit
ec475d5aef
|
@ -133,7 +133,9 @@ typedef struct {
|
|||
float internalMcuTemperature; // 244
|
||||
float vvtPosition; // 248
|
||||
int engineMode; // 252
|
||||
int unused3[5];
|
||||
float debugFloatField6; // 256
|
||||
float debugFloatField7; // 260
|
||||
int unused3[3];
|
||||
} TunerStudioOutputChannels;
|
||||
|
||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||
|
|
|
@ -23,7 +23,7 @@ void Pid::init(pid_s *pid, float minResult, float maxResult) {
|
|||
this->minResult = minResult;
|
||||
this->maxResult = maxResult;
|
||||
|
||||
iTerm = 0;
|
||||
dTerm = iTerm = 0;
|
||||
prevError = 0;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ float Pid::getValue(float target, float input, float dTime) {
|
|||
|
||||
float pTerm = pid->pFactor * error;
|
||||
iTerm += pid->iFactor * dTime * error;
|
||||
float dTerm = pid->dFactor / dTime * (error - prevError);
|
||||
dTerm = pid->dFactor / dTime * (error - prevError);
|
||||
|
||||
prevError = error;
|
||||
|
||||
|
@ -90,11 +90,12 @@ float Pid::getOffset(void) {
|
|||
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||
tsOutputChannels->debugFloatField2 = getIntegration();
|
||||
tsOutputChannels->debugFloatField2 = iTerm;
|
||||
tsOutputChannels->debugFloatField3 = getPrevError();
|
||||
tsOutputChannels->debugFloatField4 = getI();
|
||||
tsOutputChannels->debugFloatField5 = getD();
|
||||
tsOutputChannels->debugIntField1 = getP();
|
||||
tsOutputChannels->debugIntField2 = getOffset();
|
||||
tsOutputChannels->debugFloatField6 = dTerm;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -40,6 +40,7 @@ private:
|
|||
float maxResult;
|
||||
|
||||
float iTerm;
|
||||
float dTerm; // we are remembering this only for debugging purposes
|
||||
float prevError;
|
||||
};
|
||||
|
||||
|
|
|
@ -293,5 +293,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20160917;
|
||||
return 20160920;
|
||||
}
|
||||
|
|
|
@ -848,6 +848,9 @@ fileVersion = { 20160702 }
|
|||
lastErrorCode = scalar,U32, 240, "error", 1, 0
|
||||
internalMcuTemperature = scalar,F32, 244, "C", 1, 0
|
||||
vvtPosition = scalar,F32, 248, "deg", 1, 0
|
||||
engineMode = scalar, U32, 252, "em", 1, 0.0;
|
||||
debugFloatField6 = scalar, F32, 256, "val", 1, 0.0;
|
||||
debugFloatField7 = scalar, F32, 260, "val", 1, 0.0;
|
||||
|
||||
egoCorrection = { 100 }
|
||||
time = { timeNow }
|
||||
|
@ -1254,6 +1257,12 @@ fileVersion = { 20160702 }
|
|||
; Alternator_PID: D setting
|
||||
entry = debugFloatField5, "debug f5",float,"%.4f"
|
||||
|
||||
; Alternator_PID: dTerm
|
||||
entry = debugFloatField6, "debug f6",float,"%.4f"
|
||||
|
||||
entry = debugFloatField7, "debug f7",float,"%.4f"
|
||||
|
||||
|
||||
; Alternator_PID: P setting
|
||||
entry = debugIntField1, "debug i1",int,"%d"
|
||||
|
||||
|
@ -1262,6 +1271,8 @@ fileVersion = { 20160702 }
|
|||
|
||||
; Alternator_PID: PID reset counter
|
||||
entry = debugIntField3, "debug i3",int,"%d"
|
||||
|
||||
entry = engineMode, "mode",int,"%d"
|
||||
entry = warningCounter, "warn",int,"%d"
|
||||
entry = lastErrorCode, "error",int,"%d"
|
||||
entry = internalMcuTemperature, "int temp",float,"%.2f"
|
||||
|
|
Loading…
Reference in New Issue