Skip to content

Commit

Permalink
fix(app): accept protocols with Thermocycler Gen2 (#10850)
Browse files Browse the repository at this point in the history
* add tc2 to shared_data typescript files
  • Loading branch information
fsinapi authored Jun 27, 2022
1 parent 8c4bbe0 commit 02c7c79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion shared-data/js/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const TEMPERATURE_MODULE_V2: 'temperatureModuleV2' =
'temperatureModuleV2'
export const THERMOCYCLER_MODULE_V1: 'thermocyclerModuleV1' =
'thermocyclerModuleV1'
export const THERMOCYCLER_MODULE_V2: 'thermocyclerModuleV2' =
'thermocyclerModuleV2'
export const HEATERSHAKER_MODULE_V1: 'heaterShakerModuleV1' =
'heaterShakerModuleV1'

Expand Down Expand Up @@ -64,7 +66,10 @@ export const TEMPERATURE_MODULE_MODELS = [
TEMPERATURE_MODULE_V2,
]

export const THERMOCYCLER_MODULE_MODELS = [THERMOCYCLER_MODULE_V1]
export const THERMOCYCLER_MODULE_MODELS = [
THERMOCYCLER_MODULE_V1,
THERMOCYCLER_MODULE_V2,
]

export const HEATERSHAKER_MODULE_MODELS = [HEATERSHAKER_MODULE_V1]

Expand Down
5 changes: 5 additions & 0 deletions shared-data/js/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import magneticModuleV2 from '../module/definitions/3/magneticModuleV2.json'
import temperatureModuleV1 from '../module/definitions/3/temperatureModuleV1.json'
import temperatureModuleV2 from '../module/definitions/3/temperatureModuleV2.json'
import thermocyclerModuleV1 from '../module/definitions/3/thermocyclerModuleV1.json'
import thermocyclerModuleV2 from '../module/definitions/3/thermocyclerModuleV2.json'
import heaterShakerModuleV1 from '../module/definitions/3/heaterShakerModuleV1.json'

import {
Expand All @@ -14,6 +15,7 @@ import {
TEMPERATURE_MODULE_V2,
THERMOCYCLER,
THERMOCYCLER_MODULE_V1,
THERMOCYCLER_MODULE_V2,
HEATERSHAKER_MODULE_V1,
} from './constants'

Expand Down Expand Up @@ -43,6 +45,9 @@ export const getModuleDef2 = (moduleModel: ModuleModel): ModuleDefinition => {
case THERMOCYCLER_MODULE_V1:
return thermocyclerModuleV1 as ModuleDefinition

case THERMOCYCLER_MODULE_V2:
return (thermocyclerModuleV2 as unknown) as ModuleDefinition

case HEATERSHAKER_MODULE_V1:
return (heaterShakerModuleV1 as unknown) as ModuleDefinition

Expand Down
5 changes: 4 additions & 1 deletion shared-data/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TEMPERATURE_MODULE_V1,
TEMPERATURE_MODULE_V2,
THERMOCYCLER_MODULE_V1,
THERMOCYCLER_MODULE_V2,
HEATERSHAKER_MODULE_V1,
MAGNETIC_MODULE_TYPE,
TEMPERATURE_MODULE_TYPE,
Expand Down Expand Up @@ -180,7 +181,9 @@ export type TemperatureModuleModel =
| typeof TEMPERATURE_MODULE_V1
| typeof TEMPERATURE_MODULE_V2

export type ThermocyclerModuleModel = typeof THERMOCYCLER_MODULE_V1
export type ThermocyclerModuleModel =
| typeof THERMOCYCLER_MODULE_V1
| typeof THERMOCYCLER_MODULE_V2

export type HeaterShakerModuleModel = typeof HEATERSHAKER_MODULE_V1

Expand Down

0 comments on commit 02c7c79

Please sign in to comment.