Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions PID_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
10 changes: 5 additions & 5 deletions PID_v1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down