-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(api): Add G Code for pipette config in driver #3388
Merged
Merged
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fc3f301
Add Gcode
Laura-Danielle 5181a75
Enable GCODE availability in driver
Laura-Danielle c7b4aba
Merge branch 'edge' into api-driver-add-g-code-config
Laura-Danielle d6c56da
Add firmware, syntax changes
Laura-Danielle 9f8fc15
Add tests
Laura-Danielle b34306c
Add simulating driver and tests
Laura-Danielle c29c885
Merge branch 'edge' into api-driver-add-g-code-config
Laura-Danielle e0d4614
Lint changes
Laura-Danielle ff6e53a
Update firmware to reflect changes in PR 7 of smoothieware
Laura-Danielle 901eae4
Merge branch 'edge' into api-driver-add-g-code-config
Laura-Danielle e529fc3
Made requested changes updated some tests
Laura-Danielle d9bf886
Merge branch 'edge' into api-driver-add-g-code-config
Laura-Danielle e468dab
Change int to float
Laura-Danielle 06d166d
fixup: don't set pipette config when simulating
sfoster1 0910c71
Change model name
Laura-Danielle 3b3ed44
Merge branch 'edge' into api-driver-add-g-code-config
Laura-Danielle 4aaccba
Merge branch 'edge' into api-driver-add-g-code-config
Laura-Danielle c1be0b9
Bug fixin
Laura-Danielle 129b953
fixups: rename smoothie, dont cache max axis, set travel
sfoster1 ff7d0ea
fixup: style
sfoster1 d984125
fixup: js tests for changed selectors
sfoster1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
from opentrons.drivers.smoothie_drivers import driver_3_0 | ||
from opentrons.trackers import pose_tracker | ||
from opentrons.config import feature_flags as fflags | ||
from opentrons.config.robot_configs import load | ||
from opentrons.config.robot_configs import load, DEFAULT_STEPS_PER_MM | ||
from opentrons.legacy_api import containers, modules | ||
from opentrons.legacy_api.containers import Container, load_new_labware,\ | ||
save_new_offsets | ||
|
@@ -271,6 +271,20 @@ def cache_instrument_models(self): | |
log.debug("Updating instrument model cache") | ||
for mount in self.model_by_mount.keys(): | ||
model_value = self._driver.read_pipette_model(mount) | ||
axis = 'B' if mount == 'left' else 'C' | ||
if model_value and 'v2' in model_value: | ||
# Check if new model of pipettes, load smoothie configs | ||
# for this particular model | ||
self._driver.update_steps_per_mm({axis: 2133.33}) | ||
# TODO(LC25-4-2019): Modify configs to update to as | ||
# testing informs better values | ||
self._driver.update_pipette_config(axis, {'home': 172.15}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here we need to update the pipette config back to defaults for non-v2 models (or take the time now to add this data to the model configs) |
||
else: | ||
if self._driver.steps_per_mm.get(axis) \ | ||
!= DEFAULT_STEPS_PER_MM[axis]: | ||
self._driver.update_steps_per_mm( | ||
{axis: DEFAULT_STEPS_PER_MM[axis]}) | ||
|
||
if model_value: | ||
id_response = self._driver.read_pipette_id(mount) | ||
else: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What happens if you replace a v2 with a v1.x? Don't we need to reset the steps per mm?