PID reset counter for all!
This commit is contained in:
parent
19bece5493
commit
a03ad2f9ca
|
@ -25,8 +25,6 @@ EXTERN_ENGINE
|
||||||
|
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
|
||||||
int alternatorPidResetCounter = 0;
|
|
||||||
|
|
||||||
static SimplePwm alternatorControl;
|
static SimplePwm alternatorControl;
|
||||||
static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl;
|
static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl;
|
||||||
static Pid altPid(altPidS);
|
static Pid altPid(altPidS);
|
||||||
|
@ -53,7 +51,6 @@ static msg_t AltCtrlThread(int param) {
|
||||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
if (shouldResetPid) {
|
if (shouldResetPid) {
|
||||||
pidReset();
|
pidReset();
|
||||||
alternatorPidResetCounter++;
|
|
||||||
shouldResetPid = false;
|
shouldResetPid = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +62,6 @@ static msg_t AltCtrlThread(int param) {
|
||||||
// this block could be executed even in on/off alternator control mode
|
// this block could be executed even in on/off alternator control mode
|
||||||
// but at least we would reflect latest state
|
// but at least we would reflect latest state
|
||||||
altPid.postState(&tsOutputChannels);
|
altPid.postState(&tsOutputChannels);
|
||||||
tsOutputChannels.debugIntField3 = alternatorPidResetCounter;
|
|
||||||
}
|
}
|
||||||
#endif /* !EFI_UNIT_TEST */
|
#endif /* !EFI_UNIT_TEST */
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||||
tsOutputChannels->debugFloatField7 = pid->maxValue;
|
tsOutputChannels->debugFloatField7 = pid->maxValue;
|
||||||
tsOutputChannels->debugIntField1 = getP();
|
tsOutputChannels->debugIntField1 = getP();
|
||||||
tsOutputChannels->debugIntField2 = getOffset();
|
tsOutputChannels->debugIntField2 = getOffset();
|
||||||
|
tsOutputChannels->debugIntField3 = resetCounter;
|
||||||
tsOutputChannels->debugFloatField6 = dTerm;
|
tsOutputChannels->debugFloatField6 = dTerm;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue