diff --git a/app/src/pages/Protocols/hooks/__tests__/hooks.test.tsx b/app/src/pages/Protocols/hooks/__tests__/hooks.test.tsx index b0783097138..ce09a610ff7 100644 --- a/app/src/pages/Protocols/hooks/__tests__/hooks.test.tsx +++ b/app/src/pages/Protocols/hooks/__tests__/hooks.test.tsx @@ -38,24 +38,28 @@ const mockRTPData = [ displayName: 'Dry Run', variableName: 'DRYRUN', description: 'a dry run description', + type: 'boolean', default: false, }, { displayName: 'Use Gripper', variableName: 'USE_GRIPPER', description: '', + type: 'boolean', default: true, }, { displayName: 'Trash Tips', variableName: 'TIP_TRASH', description: 'throw tip in trash', + type: 'boolean', default: true, }, { displayName: 'Deactivate Temperatures', variableName: 'DEACTIVATE_TEMP', description: 'deactivate temperature?', + type: 'boolean', default: true, }, { @@ -63,22 +67,34 @@ const mockRTPData = [ variableName: 'COLUMNS', description: '', suffix: 'mL', + type: 'int', min: 1, max: 14, default: 4, }, { displayName: 'PCR Cycles', - variableName: 'PCRCYCLES', + variableName: 'PCR_CYCLES', description: '', + type: 'int', min: 1, max: 10, default: 6, }, + { + displayName: 'EtoH Volume', + variableName: 'ETOH_VOLUME', + description: '', + type: 'float', + min: 1.5, + max: 10.0, + default: 6.5, + }, { displayName: 'Default Module Offsets', variableName: 'DEFAULT_OFFSETS', description: '', + type: 'str', choices: [ { displayName: 'no offsets', diff --git a/app/src/pages/Protocols/hooks/index.ts b/app/src/pages/Protocols/hooks/index.ts index 5db38090c00..3b196dee63c 100644 --- a/app/src/pages/Protocols/hooks/index.ts +++ b/app/src/pages/Protocols/hooks/index.ts @@ -205,24 +205,28 @@ export const useRunTimeParameters = ( displayName: 'Dry Run', variableName: 'DRYRUN', description: 'a dry run description', + type: 'boolean', default: false, }, { displayName: 'Use Gripper', variableName: 'USE_GRIPPER', description: '', + type: 'boolean', default: true, }, { displayName: 'Trash Tips', variableName: 'TIP_TRASH', description: 'throw tip in trash', + type: 'boolean', default: true, }, { displayName: 'Deactivate Temperatures', variableName: 'DEACTIVATE_TEMP', description: 'deactivate temperature?', + type: 'boolean', default: true, }, { @@ -230,22 +234,34 @@ export const useRunTimeParameters = ( variableName: 'COLUMNS', description: '', suffix: 'mL', + type: 'int', min: 1, max: 14, default: 4, }, { displayName: 'PCR Cycles', - variableName: 'PCRCYCLES', + variableName: 'PCR_CYCLES', description: '', + type: 'int', min: 1, max: 10, default: 6, }, + { + displayName: 'EtoH Volume', + variableName: 'ETOH_VOLUME', + description: '', + type: 'float', + min: 1.5, + max: 10.0, + default: 6.5, + }, { displayName: 'Default Module Offsets', variableName: 'DEFAULT_OFFSETS', description: '', + type: 'str', choices: [ { displayName: 'no offsets', diff --git a/shared-data/js/types.ts b/shared-data/js/types.ts index 6424fe8b7df..02c51469a54 100644 --- a/shared-data/js/types.ts +++ b/shared-data/js/types.ts @@ -599,13 +599,13 @@ interface IntParameter { default: number } -interface EnumChoice { +interface Choice { displayName: string - value: string + value: unknown } -interface EnumParameter { - choices: EnumChoice[] +interface ChoiceParameter { + choices: Choice[] default: string } @@ -613,11 +613,14 @@ interface BooleanParameter { default: boolean } -type RunTimeParameter = IntParameter | EnumParameter | BooleanParameter +type RunTimeParamterTypes = 'int' | 'float' | 'str' | 'boolean' + +type RunTimeParameter = IntParameter | ChoiceParameter | BooleanParameter interface BaseRunTimeParameters { displayName: string variableName: string description: string + type: RunTimeParamterTypes suffix?: string }