Skip to content

Commit

Permalink
Fix setRefCurrent methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lrapetti authored Jun 7, 2018
1 parent 347a5d9 commit d5ed893
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/controlboard/src/ControlBoardDriverCurrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace yarp {
{
if (!checkIfTorqueIsValid(v * m_kPWM[j]))
return false;
if (v && j >= 0 && static_cast<size_t>(j) < m_numberOfJoints) {
if (j >= 0 && static_cast<size_t>(j) < m_numberOfJoints) {
m_jntReferenceTorques[j] = v * m_kPWM[j];
return true;
}
Expand All @@ -52,7 +52,7 @@ namespace yarp {
if (!joints || !t) return false;
bool ret = true;
for (int i = 0; i < n_joint && ret; i++) {
ret = setRefCurrent(joints[i], t[i]);
m_jntReferenceTorques[joints[i]] = t[i] * m_kPWM[joints[i]];
}
return ret;
}
Expand Down

0 comments on commit d5ed893

Please sign in to comment.