diff --git a/PID_v1.cpp b/PID_v1.cpp index cb6637c..039c51d 100644 --- a/PID_v1.cpp +++ b/PID_v1.cpp @@ -216,9 +216,8 @@ void PID::SetControllerDirection(int Direction) * functions query the internal state of the PID. they're here for display * purposes. this are the functions the PID Front-end uses for example ******************************************************************************/ -double PID::GetKp(){ return dispKp; } -double PID::GetKi(){ return dispKi;} -double PID::GetKd(){ return dispKd;} -int PID::GetMode(){ return inAuto ? AUTOMATIC : MANUAL;} -int PID::GetDirection(){ return controllerDirection;} - +double PID::GetKp() const { return dispKp; } +double PID::GetKi() const { return dispKi; } +double PID::GetKd() const { return dispKd; } +int PID::GetMode() const { return inAuto ? AUTOMATIC : MANUAL; } +int PID::GetDirection() const { return controllerDirection; } diff --git a/PID_v1.h b/PID_v1.h index 9cba046..d562995 100644 --- a/PID_v1.h +++ b/PID_v1.h @@ -54,11 +54,11 @@ class PID //Display functions **************************************************************** - double GetKp(); // These functions query the pid for interal values. - double GetKi(); // they were created mainly for the pid front-end, - double GetKd(); // where it's important to know what is actually - int GetMode(); // inside the PID. - int GetDirection(); // + double GetKp() const; // These functions query the pid for interal values. + double GetKi() const; // they were created mainly for the pid front-end, + double GetKd() const; // where it's important to know what is actually + int GetMode() const; // inside the PID. + int GetDirection() const; // private: void Initialize();