Skip to content

Commit 2cdc0ad

Browse files
author
ergocub
committed
Avoid to check the temperature if negative
1 parent cfd5ee9 commit 2cdc0ad

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/RobotInterface/src/MotorTemperatureChecker.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ bool MotorsTemperatureChecker::setMotorTemperatures(const iDynTree::VectorDynSiz
8686

8787
for (int i = 0; i < temperature.size(); i++)
8888
{
89+
90+
if (m_limits(i) < 0)
91+
{
92+
continue;
93+
}
8994

90-
if (temperature(i) > m_limits(i))
95+
if (temperature(i) > m_limits(i))
9196
{
9297
m_samplesAboveTheLimit[i]++;
9398
}

0 commit comments

Comments
 (0)