Skip to content
Merged
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions ev3dev/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,8 @@ def wait(self, cond, timeout=None):
if cond(self.state):
return True

def wait_until_not_moving(self, timeout=None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a documentation comment here so that it shows up on the docs site.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used it when solving a 5x5x5 cube which was about 9 minutes of off/on movement of three large motors and a medium motor. If it had exited early it would have caused the cube to jam up but it was smooth sailing so I think it is good to go.

I'll add a docstring to it in the morning.

return self.wait(lambda state: self.STATE_RUNNING not in state or self.STATE_STALLED in state, timeout)

def wait_until(self, s, timeout=None):
"""
Expand Down