-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: internal-release->edge for 1.0.0
- Loading branch information
Showing
18 changed files
with
539 additions
and
1,301 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { | ||
getPipetteNameSpecs, | ||
PipetteName, | ||
RunTimeCommand, | ||
} from '@opentrons/shared-data' | ||
|
||
/** | ||
* @param pipetteName name of pipette being used | ||
* @param commands list of commands to search within | ||
* @param wellName the target well for pickup tip | ||
* @returns WellRange string of wells pipette will pickup tips from | ||
*/ | ||
export function getWellRange( | ||
pipetteId: string, | ||
commands: RunTimeCommand[], | ||
wellName: string, | ||
pipetteName?: PipetteName | ||
): string { | ||
const pipetteChannels = pipetteName | ||
? getPipetteNameSpecs(pipetteName)?.channels ?? 1 | ||
: 1 | ||
let usedChannels = pipetteChannels | ||
if (pipetteChannels === 96) { | ||
for (const c of commands.reverse()) { | ||
if ( | ||
c.commandType === 'configureNozzleLayout' && | ||
c.params?.pipetteId === pipetteId | ||
) { | ||
// TODO(sb, 11/9/23): add support for quadrant and row configurations when needed | ||
if (c.params.configuration_params.style === 'SINGLE') { | ||
usedChannels = 1 | ||
} else if (c.params.configuration_params.style === 'COLUMN') { | ||
usedChannels = 8 | ||
} | ||
break | ||
} | ||
} | ||
} | ||
if (usedChannels === 96) { | ||
return 'A1 - H12' | ||
} else if (usedChannels === 8) { | ||
const column = wellName.substr(1) | ||
return `A${column} - H${column}` | ||
} | ||
return wellName | ||
} |
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
Oops, something went wrong.