@@ -843,7 +843,15 @@ def wait_until(self, s, timeout=None):
843
843
Blocks until ``s`` is in ``self.state``. The condition is checked when
844
844
there is an I/O event related to the ``state`` attribute. Exits early
845
845
when ``timeout`` (in milliseconds) is reached.
846
-
846
+
847
+ **Warning:** In ev3dev kernel release cycles 16 and earlier, there is
848
+ a bug which causes the ``state`` attribute to include ``stalled``
849
+ immediately after starting the motor even if it is not actually being
850
+ prevented from rotating. As a workaround, we recommend sleeping your
851
+ code for around 100ms after starting a motor if you are going to use
852
+ this method to wait for it to be ``stalled``. A fix for this has not
853
+ yet been released.
854
+
847
855
Returns ``True`` if the condition is met, and ``False`` if the timeout
848
856
is reached.
849
857
@@ -858,7 +866,15 @@ def wait_while(self, s, timeout=None):
858
866
Blocks until ``s`` is not in ``self.state``. The condition is checked
859
867
when there is an I/O event related to the ``state`` attribute. Exits
860
868
early when ``timeout`` (in milliseconds) is reached.
861
-
869
+
870
+ **Warning:** In ev3dev kernel release cycles 16 and earlier, there is
871
+ a bug which causes the ``state`` attribute to include ``stalled``
872
+ immediately after starting the motor even if it is not actually being
873
+ prevented from rotating. As a workaround, we recommend sleeping your
874
+ code for around 100ms after starting a motor if you are going to use
875
+ this method to wait for it to be ``stalled``. A fix for this has not
876
+ yet been released.
877
+
862
878
Returns ``True`` if the condition is met, and ``False`` if the timeout
863
879
is reached.
864
880
0 commit comments