Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions ev3dev/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,15 @@ def wait_until(self, s, timeout=None):
Blocks until ``s`` is in ``self.state``. The condition is checked when
there is an I/O event related to the ``state`` attribute. Exits early
when ``timeout`` (in milliseconds) is reached.


**Warning:** In ev3dev kernel release cycles 16 and earlier, there is
a bug which causes the ``state`` attribute to include ``stalled``
immediately after starting the motor even if it is not actually being
prevented from rotating. As a workaround, we recommend sleeping your
code for around 100ms after starting a motor if you are going to use
this method to wait for it to be ``stalled``. A fix for this has not
yet been released.

Returns ``True`` if the condition is met, and ``False`` if the timeout
is reached.

Expand All @@ -858,7 +866,15 @@ def wait_while(self, s, timeout=None):
Blocks until ``s`` is not in ``self.state``. The condition is checked
when there is an I/O event related to the ``state`` attribute. Exits
early when ``timeout`` (in milliseconds) is reached.


**Warning:** In ev3dev kernel release cycles 16 and earlier, there is
a bug which causes the ``state`` attribute to include ``stalled``
immediately after starting the motor even if it is not actually being
prevented from rotating. As a workaround, we recommend sleeping your
code for around 100ms after starting a motor if you are going to use
this method to wait for it to be ``stalled``. A fix for this has not
yet been released.

Returns ``True`` if the condition is met, and ``False`` if the timeout
is reached.

Expand Down