diff --git a/api-client/src/modules/api-types.ts b/api-client/src/modules/api-types.ts index 60203dba15e..c8560ae3980 100644 --- a/api-client/src/modules/api-types.ts +++ b/api-client/src/modules/api-types.ts @@ -80,6 +80,12 @@ export interface HeaterShakerData { errorDetails: string | null status: HeaterShakerStatus } +export interface AbsorbanceReaderData { + lidStatus: 'open' | 'closed' | 'unknown' + platePresence: 'present' | 'absent' | 'unknown' + sampleWavelength: number | null + status: AbsorbanceReaderStatus +} export type TemperatureStatus = | 'idle' @@ -112,3 +118,5 @@ export type LatchStatus = | 'idle_closed' | 'idle_unknown' | 'unknown' + +export type AbsorbanceReaderStatus = 'idle' | 'measuring' | 'error' diff --git a/api-client/src/modules/types.ts b/api-client/src/modules/types.ts index f138680dafd..7aaf48030ca 100644 --- a/api-client/src/modules/types.ts +++ b/api-client/src/modules/types.ts @@ -3,13 +3,16 @@ import type { ThermocyclerModuleModel, MagneticModuleModel, HeaterShakerModuleModel, + AbsorbanceReaderModel, TEMPERATURE_MODULE_TYPE, MAGNETIC_MODULE_TYPE, THERMOCYCLER_MODULE_TYPE, HEATERSHAKER_MODULE_TYPE, + ABSORBANCE_READER_TYPE, } from '@opentrons/shared-data' import type * as ApiTypes from './api-types' +import { A } from 'vitest/dist/reporters-1evA5lom' export * from './api-types' @@ -44,11 +47,18 @@ export interface HeaterShakerModule extends CommonModuleInfo { data: ApiTypes.HeaterShakerData } +export interface AbsorbanceReaderModule extends CommonModuleInfo { + moduleType: typeof ABSORBANCE_READER_TYPE + moduleModel: AbsorbanceReaderModel + data: ApiTypes.AbsorbanceReaderData +} + export type AttachedModule = | TemperatureModule | MagneticModule | ThermocyclerModule | HeaterShakerModule + | AbsorbanceReaderModule export interface ModulesMeta { cursor: number diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.tsx index b8297db8f84..c6e978758b0 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.tsx @@ -22,6 +22,9 @@ import { import { getCutoutDisplayName, getFixtureDisplayName, + ABSORBANCE_READER_CUTOUTS, + ABSORBANCE_READER_V1, + ABSORBANCE_READER_V1_FIXTURE, HEATER_SHAKER_CUTOUTS, HEATERSHAKER_MODULE_V1, HEATERSHAKER_MODULE_V1_FIXTURE, @@ -234,6 +237,24 @@ export function AddFixtureModal({ ...unconfiguredTemperatureModules, ] } + if ( + ABSORBANCE_READER_CUTOUTS.includes(cutoutId) && + unconfiguredMods.some(m => m.moduleModel === ABSORBANCE_READER_V1) + ) { + const unconfiguredAbsorbanceReaders = unconfiguredMods + .filter(mod => mod.moduleModel === ABSORBANCE_READER_V1) + .map(mod => [ + { + cutoutId, + cutoutFixtureId: ABSORBANCE_READER_V1_FIXTURE, + opentronsModuleSerialNumber: mod.serialNumber, + }, + ]) + availableOptions = [ + ...availableOptions, + ...unconfiguredAbsorbanceReaders, + ] + } } } else if (optionStage === 'wasteChuteOptions') { availableOptions = WASTE_CHUTE_FIXTURES.map(fixture => [