Skip to content

Commit f75f1a5

Browse files
authored
Revert "wait_until_not_moving should consider 'running holding' as 'n… (ev3dev#607)
* Revert "wait_until_not_moving should consider 'running holding' as 'not moving' (ev3dev#548)" This reverts commit 95ccb36. For issue ev3dev#605 * Restore changelog entry * Updated changelog
1 parent daad42a commit f75f1a5

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎debian/changelog‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
python-ev3dev2 (2.0.0~beta4) UNRELEASED; urgency=medium
2+
3+
[Daniel Walton]
4+
* wait_until_not_moving should consider "running holding" as "moving"
5+
6+
-- Kaelin Laundry <wasabifan@outlook.com> Sun, 24 Mar 2019 00:25:00 -0800
7+
18
python-ev3dev2 (2.0.0~beta3) stable; urgency=medium
29

310
[Daniel Walton]

‎ev3dev2/motor.py‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,10 @@ def wait(self, cond, timeout=None):
875875

876876
def wait_until_not_moving(self, timeout=None):
877877
"""
878-
Blocks until one of the following conditions are met:
879-
- ``running`` is not in ``self.state``
880-
- ``stalled`` is in ``self.state``
881-
- ``holding`` is in ``self.state``
882-
The condition is checked when there is an I/O event related to
883-
the ``state`` attribute. Exits early when ``timeout`` (in
884-
milliseconds) is reached.
878+
Blocks until ``running`` is not in ``self.state`` or ``stalled`` is in
879+
``self.state``. The condition is checked when there is an I/O event
880+
related to the ``state`` attribute. Exits early when ``timeout``
881+
(in milliseconds) is reached.
885882
886883
Returns ``True`` if the condition is met, and ``False`` if the timeout
887884
is reached.
@@ -890,9 +887,7 @@ def wait_until_not_moving(self, timeout=None):
890887
891888
m.wait_until_not_moving()
892889
"""
893-
return self.wait(
894-
lambda state: self.STATE_RUNNING not in state or self.STATE_STALLED in state or self.STATE_HOLDING in state,
895-
timeout)
890+
return self.wait(lambda state: self.STATE_RUNNING not in state or self.STATE_STALLED in state, timeout)
896891

897892
def wait_until(self, s, timeout=None):
898893
"""

0 commit comments

Comments
 (0)