This commit is contained in:
Matthew Kennedy 2019-12-16 17:36:40 -08:00 committed by rusefi
parent 2bff85ad16
commit f90a5e48eb
2 changed files with 6 additions and 6 deletions

View File

@ -124,14 +124,14 @@ void Pid::setErrorAmplification(float coef) {
} }
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO
void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) { void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) const {
postState(tsOutputChannels, 1); postState(tsOutputChannels, 1);
} }
/** /**
* see https://rusefi.com/wiki/index.php?title=Manual:Debug_fields * see https://rusefi.com/wiki/index.php?title=Manual:Debug_fields
*/ */
void Pid::postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) { void Pid::postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) const {
tsOutputChannels->debugFloatField1 = output; tsOutputChannels->debugFloatField1 = output;
tsOutputChannels->debugFloatField2 = iTerm; tsOutputChannels->debugFloatField2 = iTerm;
tsOutputChannels->debugFloatField3 = getPrevError(); tsOutputChannels->debugFloatField3 = getPrevError();

View File

@ -60,8 +60,8 @@ public:
float getPrevError(void) const; float getPrevError(void) const;
void setErrorAmplification(float coef); void setErrorAmplification(float coef);
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO
void postState(TunerStudioOutputChannels *tsOutputChannels); void postState(TunerStudioOutputChannels *tsOutputChannels) const;
void postState(TunerStudioOutputChannels *tsOutputChannels, int pMult); void postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) const;
#endif /* EFI_TUNER_STUDIO */ #endif /* EFI_TUNER_STUDIO */
void showPidStatus(Logging *logging, const char*msg) const; void showPidStatus(Logging *logging, const char*msg) const;
void sleep(); void sleep();
@ -122,8 +122,8 @@ public:
public: public:
// todo: move this to pid_s one day // todo: move this to pid_s one day
float_t antiwindupFreq = 0.0f; // = 1/ResetTime float antiwindupFreq = 0.0f; // = 1/ResetTime
float_t derivativeFilterLoss = 0.0f; // = 1/Gain float derivativeFilterLoss = 0.0f; // = 1/Gain
private: private:
float limitOutput(float v) const; float limitOutput(float v) const;