@@ -157,12 +157,6 @@ export const getAdditionalEquipmentLocationUpdate = (
157
157
)
158
158
: null
159
159
160
- if ( trashBinCommand == null && robotType === OT2_ROBOT_TYPE ) {
161
- console . error (
162
- 'expected to find a fixedTrash command for the OT-2 but could not'
163
- )
164
- }
165
-
166
160
const moveLiquidStepWasteChute =
167
161
savedStepForms != null
168
162
? Object . values ( savedStepForms ) . find (
@@ -211,7 +205,7 @@ export const getAdditionalEquipmentLocationUpdate = (
211
205
}
212
206
: { }
213
207
214
- const hardcodedTrashBinIdOt2 = `${ uuid ( ) } :fixedTrash `
208
+ const hardcodedTrashBinIdOt2 = `${ uuid ( ) } :trashBin `
215
209
const hardcodedTrashBinOt2 = {
216
210
[ hardcodedTrashBinIdOt2 ] : getCutoutIdByAddressableArea (
217
211
'fixedTrash' as AddressableAreaName ,
@@ -220,30 +214,6 @@ export const getAdditionalEquipmentLocationUpdate = (
220
214
) ,
221
215
}
222
216
223
- const hardcodedTrashAddressableAreaName =
224
- unoccupiedSlotForTrash === WASTE_CHUTE_CUTOUT
225
- ? 'wasteChute'
226
- : `movableTrash${ unoccupiedSlotForTrash } `
227
-
228
- const hardcodedTrashIdFlex = `${ uuid ( ) } :${ hardcodedTrashAddressableAreaName } `
229
-
230
- const hardCodedTrashLocation =
231
- unoccupiedSlotForTrash === ''
232
- ? ''
233
- : unoccupiedSlotForTrash === WASTE_CHUTE_CUTOUT
234
- ? WASTE_CHUTE_CUTOUT
235
- : getCutoutIdByAddressableArea (
236
- hardcodedTrashAddressableAreaName as AddressableAreaName ,
237
- 'trashBinAdapter' ,
238
- FLEX_ROBOT_TYPE
239
- )
240
-
241
- const hardcodedTrashFlex = {
242
- [ hardcodedTrashIdFlex ] : hasWasteChuteCommands
243
- ? WASTE_CHUTE_CUTOUT
244
- : hardCodedTrashLocation ,
245
- }
246
-
247
217
let trashBinLocationUpdate : LocationUpdate = hasWasteChuteCommands
248
218
? { }
249
219
: hardcodedTrashBinOt2
@@ -252,11 +222,27 @@ export const getAdditionalEquipmentLocationUpdate = (
252
222
trashBinLocationUpdate = {
253
223
[ trashBinId ] : trashCutoutId as string ,
254
224
}
225
+ // in case the user has no pipetting steps, auto-generate a trashBin or wasteChute entity for Flex
255
226
} else if ( isFlex && ! hasWasteChuteCommands ) {
227
+ const hardCodedTrashIdFlex = `${ uuid ( ) } :movableTrash${ unoccupiedSlotForTrash } `
228
+ const hardCodedWasteChuteId = `${ uuid ( ) } :wasteChute`
229
+
256
230
trashBinLocationUpdate =
257
- unoccupiedSlotForTrash === WASTE_CHUTE_CUTOUT ? { } : hardcodedTrashFlex
231
+ unoccupiedSlotForTrash === WASTE_CHUTE_CUTOUT
232
+ ? { }
233
+ : {
234
+ [ hardCodedTrashIdFlex ] : getCutoutIdByAddressableArea (
235
+ `movableTrash${ unoccupiedSlotForTrash } ` as AddressableAreaName ,
236
+ 'trashBinAdapter' ,
237
+ FLEX_ROBOT_TYPE
238
+ ) ,
239
+ }
258
240
wasteChuteLocationUpdate =
259
- unoccupiedSlotForTrash === WASTE_CHUTE_CUTOUT ? hardcodedTrashFlex : { }
241
+ unoccupiedSlotForTrash === WASTE_CHUTE_CUTOUT
242
+ ? {
243
+ [ hardCodedWasteChuteId ] : WASTE_CHUTE_CUTOUT ,
244
+ }
245
+ : { }
260
246
}
261
247
262
248
const stagingAreaLocationUpdate : LocationUpdate = stagingAreaSlotNames . reduce (
0 commit comments