From dc1e90773b21c5e6e0ed5712a60c8cd0887ede1b Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Mon, 16 Dec 2019 17:36:40 -0800 Subject: [PATCH] const (#1062) --- firmware/util/math/pid.cpp | 4 ++-- firmware/util/math/pid.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/util/math/pid.cpp b/firmware/util/math/pid.cpp index 8546df9aa4..871a6af1a2 100644 --- a/firmware/util/math/pid.cpp +++ b/firmware/util/math/pid.cpp @@ -124,14 +124,14 @@ void Pid::setErrorAmplification(float coef) { } #if EFI_TUNER_STUDIO -void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) { +void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) const { postState(tsOutputChannels, 1); } /** * 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->debugFloatField2 = iTerm; tsOutputChannels->debugFloatField3 = getPrevError(); diff --git a/firmware/util/math/pid.h b/firmware/util/math/pid.h index 1374894317..966cec8812 100644 --- a/firmware/util/math/pid.h +++ b/firmware/util/math/pid.h @@ -60,8 +60,8 @@ public: float getPrevError(void) const; void setErrorAmplification(float coef); #if EFI_TUNER_STUDIO - void postState(TunerStudioOutputChannels *tsOutputChannels); - void postState(TunerStudioOutputChannels *tsOutputChannels, int pMult); + void postState(TunerStudioOutputChannels *tsOutputChannels) const; + void postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) const; #endif /* EFI_TUNER_STUDIO */ void showPidStatus(Logging *logging, const char*msg) const; void sleep(); @@ -122,8 +122,8 @@ public: public: // todo: move this to pid_s one day - float_t antiwindupFreq = 0.0f; // = 1/ResetTime - float_t derivativeFilterLoss = 0.0f; // = 1/Gain + float antiwindupFreq = 0.0f; // = 1/ResetTime + float derivativeFilterLoss = 0.0f; // = 1/Gain private: float limitOutput(float v) const;