Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Geithner, Thomas
desk-control
Commits
fd91aa14
Commit
fd91aa14
authored
Oct 11, 2017
by
Mall, Anon
Browse files
fix for small step on zero
parent
61a8dd8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/desk-controller.cpp
View file @
fd91aa14
...
@@ -268,7 +268,7 @@ LinakDesk::doDeskControl(void)
...
@@ -268,7 +268,7 @@ LinakDesk::doDeskControl(void)
}
}
}
while
(
m_finished
==
true
);
}
while
(
m_finished
==
true
);
uint
delta
=
abs
(
m_currentHeight
-
target_height
);
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
)
else
if
(
target_height
<=
(
m_currentHeight
+
STOP_DELAY
)
&&
target_height
>
m_currentHeight
&&
m_smallStep
)
{
{
...
@@ -300,7 +300,7 @@ LinakDesk::doDeskControl(void)
...
@@ -300,7 +300,7 @@ LinakDesk::doDeskControl(void)
bool
state
=
move
(
Command
::
up
);
bool
state
=
move
(
Command
::
up
);
usleep
(
10000
);
usleep
(
10000
);
}
}
else
else
{
{
cout
<<
"down"
<<
endl
;
cout
<<
"down"
<<
endl
;
bool
state
=
move
(
Command
::
down
);
bool
state
=
move
(
Command
::
down
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment