-
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
feat(api): support unversioned pipettes in JSON protocols #2605
Changes from 8 commits
7f0075f
93a76b1
6769cba
7f1ab2c
ff182e2
e54fd13
04bad65
09cea0d
e6c909f
d7b9b64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import * as React from 'react' | |
import {connect} from 'react-redux' | ||
import {push} from 'react-router-redux' | ||
|
||
import type {PipetteConfig} from '@opentrons/shared-data' | ||
import type {PipetteNameSpecs} from '@opentrons/shared-data' | ||
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. Can you do me a favor and remove this line instead? It's unused |
||
import type {Mount} from '../../robot' | ||
import type {CalibrateDeckProps} from './types' | ||
|
||
|
@@ -12,7 +12,7 @@ import {deckCalibrationCommand as dcCommand} from '../../http-api-client' | |
import ClearDeckAlertModal from '../ClearDeckAlertModal' | ||
|
||
type OP = CalibrateDeckProps & { | ||
pipette: PipetteConfig, | ||
pipette: PipetteNameSpecs, | ||
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. Same comment: |
||
mount: Mount, | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import cx from 'classnames' | |
import {Link} from 'react-router-dom' | ||
|
||
import {Icon, PrimaryButton, ModalPage} from '@opentrons/components' | ||
import {getPipetteChannelsByName} from '@opentrons/shared-data' | ||
import {getPipetteChannelsByDisplayName} from '@opentrons/shared-data' | ||
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. This function can and should go away once we can switch the app to checking 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. added comment to function definition in |
||
|
||
import type {ChangePipetteProps} from './types' | ||
import {getDiagramSrc} from './InstructionStep' | ||
|
@@ -91,7 +91,7 @@ function StatusDetails (props: ChangePipetteProps) { | |
className={styles.confirm_diagram} | ||
src={getDiagramSrc({ | ||
...props, | ||
channels: getPipetteChannelsByName(wantedPipetteName), | ||
channels: getPipetteChannelsByDisplayName(wantedPipetteName), | ||
diagram: 'tab', | ||
direction: 'attach', | ||
})} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ import * as React from 'react' | |
import {connect} from 'react-redux' | ||
import {push, goBack} from 'react-router-redux' | ||
import {Switch, Route, withRouter, type Match} from 'react-router' | ||
import {getPipette, getPipetteNames} from '@opentrons/shared-data' | ||
import {getPipetteNameSpecs, getPipetteDisplayNames} from '@opentrons/shared-data' | ||
|
||
import type {PipetteConfig} from '@opentrons/shared-data' | ||
import type {PipetteNameSpecs} from '@opentrons/shared-data' | ||
import type {State, Dispatch} from '../../types' | ||
import type {Mount} from '../../robot' | ||
import type {Robot} from '../../discovery' | ||
|
@@ -40,7 +40,7 @@ const TITLE = 'Pipette Setup' | |
// used to guarentee mount param in route is left or right | ||
const RE_MOUNT = '(left|right)' | ||
// used to guarentee model param in route is a pipettes model | ||
const RE_NAME = `(${getPipetteNames().join('|')})` | ||
const RE_NAME = `(${getPipetteDisplayNames().join('|')})` | ||
|
||
const ConnectedChangePipetteRouter = withRouter( | ||
connect(makeMapStateToProps, mapDispatchToProps)(ChangePipetteRouter) | ||
|
@@ -90,7 +90,7 @@ type OP = { | |
type SP = { | ||
moveRequest: RobotMove, | ||
homeRequest: RobotHome, | ||
actualPipette: ?PipetteConfig, | ||
actualPipette: ?PipetteNameSpecs, | ||
displayName: string, | ||
direction: Direction, | ||
success: boolean, | ||
|
@@ -154,7 +154,7 @@ function makeMapStateToProps () { | |
const {mount, wantedPipetteName} = ownProps | ||
const pipettes = getRobotPipettes(state, ownProps.robot).response | ||
const model = pipettes && pipettes[mount] && pipettes[mount].model | ||
const actualPipette = model ? getPipette(model) : null | ||
const actualPipette = model ? getPipetteNameSpecs(model) : null | ||
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. @mcous should this be getPipettenameSpecs or getPipetteModelSpecs? If it's name, that 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. This definitely needs to be |
||
const direction = actualPipette ? 'detach' : 'attach' | ||
|
||
const success = ( | ||
|
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.
Does this need to be updated?