-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
20160831 031700 polling motor driver #2
Conversation
…s://github.com/opentrons/opentrons_sdk into 8-protocol-ingestion-checklist-data-generation
…0.05mm from target
LGTM, but we need to test it IRL a lot to make sure. |
Ready to be merged. This branch has passed thorough testing, running multiple hours on the |
LGTM |
self.motor.move(x=-100) | ||
self.motor.wait_for_arrival() | ||
except RuntimeWarning as e: | ||
self.assertEqual(str(RuntimeWarning('limit switch hit')), str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting test. You could also do,
with self.assertRaises(RuntimeWarning) as e:
self.motor.move(x=-100)
self.motor.wait_for_arrival()
import sys | ||
import time | ||
|
||
from opentrons_sdk.drivers.motor import OpenTrons, GCodeLogger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GCodeLogger
is an unused import
This PR moves the motor driver away from the OT forked firmware, and works as follows:
b"ok"
or similar is received from motor controllerM114
"show current position" gcode commandwait_for_arrival()
method compares the target coordinate to the real-time coordinate, and returns when they're equal