Skip to content

Commit

Permalink
bugfix in getMotorTorqueParams
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiraz committed Aug 31, 2023
1 parent 0f5cd47 commit e0a1bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices/RemoteControlBoard/RemoteControlBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2234,9 +2234,9 @@ bool RemoteControlBoard::getMotorTorqueParams(int j, MotorTorqueParameters *para
return false;
}
Bottle& l = *lp;
if (l.size() != 8)
if (l.size() != 9)

Check warning on line 2237 in src/devices/RemoteControlBoard/RemoteControlBoard.cpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/devices/RemoteControlBoard/RemoteControlBoard.cpp#L2237

9 is a magic number; consider replacing it with a named constant
{
yCError(REMOTECONTROLBOARD, "getMotorTorqueParams return value not understood, size != 8");
yCError(REMOTECONTROLBOARD, "getMotorTorqueParams return value not understood, size != 9");
return false;
}
params->bemf = l.get(0).asFloat64();
Expand Down

0 comments on commit e0a1bf2

Please sign in to comment.