Skip to content

Commit

Permalink
Removed const getGains function
Browse files Browse the repository at this point in the history
  • Loading branch information
davetcoleman committed Jul 26, 2013
1 parent 76761cd commit 17e41b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
8 changes: 1 addition & 7 deletions include/control_toolbox/pid.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,6 @@ class Pid
*/
Gains getGains();

/*!
* \brief Get PID gains for the const controller, without modifying the realtime buffer
* \return gains A struct of the PID gain values
*/
Gains getGains() const;

/*!
* \brief Set PID gains for the controller.
* \param p The proportional gain.
Expand Down Expand Up @@ -346,7 +340,7 @@ class Pid
/*!
* \brief Print to console the current parameters
*/
void printValues() const;
void printValues();

/*!
* @brief Custom assignment operator
Expand Down
9 changes: 2 additions & 7 deletions src/pid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ Pid::Gains Pid::getGains()
return *gains_buffer_.readFromRT();
}

Pid::Gains Pid::getGains() const
{
return *gains_buffer_.readFromNonRT();
}

void Pid::setGains(double p, double i, double d, double i_max, double i_min)
{
Gains gains(p,i,d,i_max,i_min);
Expand Down Expand Up @@ -399,9 +394,9 @@ void Pid::getCurrentPIDErrors(double *pe, double *ie, double *de)
*de = d_error_;
}

void Pid::printValues() const
void Pid::printValues()
{
const Gains gains = getGains();
Gains gains = getGains();

ROS_INFO_STREAM_NAMED("pid","Current Values of PID Class:\n"
<< " P Gain: " << gains.p_gain_ << "\n"
Expand Down

0 comments on commit 17e41b5

Please sign in to comment.