Commit fd91aa14 authored by Mall, Anon's avatar Mall, Anon
Browse files

fix for small step on zero

parent 61a8dd8a
......@@ -268,7 +268,7 @@ LinakDesk::doDeskControl(void)
}
} while (m_finished == true);
uint delta = abs(m_currentHeight - target_height);
m_smallStep = (delta <= STOP_DELAY) ? true : false;
m_smallStep = (delta <= STOP_DELAY) && (delta != 0)? true : false;
}
else if (target_height <= (m_currentHeight + STOP_DELAY) && target_height > m_currentHeight && m_smallStep)
{
......@@ -300,7 +300,7 @@ LinakDesk::doDeskControl(void)
bool state = move(Command::up);
usleep(10000);
}
else
else
{
cout << "down" << endl;
bool state = move(Command::down);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment