PID reset counter for all!

This commit is contained in:
rusefi 2017-06-03 10:37:26 -04:00
parent 19bece5493
commit a03ad2f9ca
2 changed files with 1 additions and 4 deletions

View File

@ -25,8 +25,6 @@ EXTERN_ENGINE
static Logging *logger;
int alternatorPidResetCounter = 0;
static SimplePwm alternatorControl;
static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl;
static Pid altPid(altPidS);
@ -53,7 +51,6 @@ static msg_t AltCtrlThread(int param) {
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
if (shouldResetPid) {
pidReset();
alternatorPidResetCounter++;
shouldResetPid = false;
}
#endif
@ -65,7 +62,6 @@ static msg_t AltCtrlThread(int param) {
// this block could be executed even in on/off alternator control mode
// but at least we would reflect latest state
altPid.postState(&tsOutputChannels);
tsOutputChannels.debugIntField3 = alternatorPidResetCounter;
}
#endif /* !EFI_UNIT_TEST */

View File

@ -114,6 +114,7 @@ void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) {
tsOutputChannels->debugFloatField7 = pid->maxValue;
tsOutputChannels->debugIntField1 = getP();
tsOutputChannels->debugIntField2 = getOffset();
tsOutputChannels->debugIntField3 = resetCounter;
tsOutputChannels->debugFloatField6 = dTerm;
}
#endif