Skip to content

Commit

Permalink
step generator move labware cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyBatten committed Jan 17, 2025
1 parent d76f318 commit 02c7464
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions step-generation/src/commandCreators/atomic/moveLabware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const moveLabware: CommandCreator<MoveLabwareArgs> = (

const newLocationInWasteChute =
newLocation !== 'offDeck' &&
newLocation !== 'systemLocation' &&
'addressableAreaName' in newLocation &&
newLocation.addressableAreaName === 'gripperWasteChute'

Expand All @@ -56,7 +57,9 @@ export const moveLabware: CommandCreator<MoveLabwareArgs> = (
)

const newLocationSlot =
newLocation !== 'offDeck' && 'slotName' in newLocation
newLocation !== 'offDeck' &&
newLocation !== 'systemLocation' &&
'slotName' in newLocation
? newLocation.slotName
: null

Expand Down Expand Up @@ -134,12 +137,16 @@ export const moveLabware: CommandCreator<MoveLabwareArgs> = (
}
}
const destModuleId =
newLocation !== 'offDeck' && 'moduleId' in newLocation
newLocation !== 'offDeck' &&
newLocation !== 'systemLocation' &&
'moduleId' in newLocation
? newLocation.moduleId
: null

const destAdapterId =
newLocation !== 'offDeck' && 'labwareId' in newLocation
newLocation !== 'offDeck' &&
newLocation !== 'systemLocation' &&
'labwareId' in newLocation
? newLocation.labwareId
: null

Expand Down

0 comments on commit 02c7464

Please sign in to comment.