Skip to content

Commit

Permalink
update filePath to fileName to reflect protocol engine params
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Jan 16, 2025
1 parent 4f8af8f commit 4f92a98
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion protocol-designer/src/form-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export type AbsorbanceReaderFormType =

export interface HydratedAbsorbanceReaderFormData {
absorbanceReaderFormType: AbsorbanceReaderFormType | null
filePath: string | null
fileName: string | null
lidOpen: boolean | null
mode:
| typeof ABSORBANCE_READER_INITIALIZE_MODE_MULTI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function ReadSettings(props: ReadSettingsProps): JSX.Element {
</Flex>
<InputStepFormField
padding="0"
{...propsForFields.filePath}
{...propsForFields.fileName}
title={t('exported_file_name')}
/>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function getDefaultsForStepType(
case 'absorbanceReader':
return {
absorbanceReaderFormType: null,
filePath: null,
fileName: null,
lidOpen: null,
mode: null,
moduleId: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const updatePatchOnAbsorbanceReaderFormType = (
'referenceWavelength',
'lidOpen',
'mode',
'filePath'
'fileName'
),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const absorbanceReaderFormToArgs = (
): AbsorbanceReaderArgs | null => {
const {
absorbanceReaderFormType,
filePath,
fileName,
lidOpen,
moduleId,
// mode,
Expand All @@ -39,7 +39,7 @@ export const absorbanceReaderFormToArgs = (
return {
module: moduleId,
commandCreatorFnName: 'absorbanceReaderRead',
filePath,
fileName,
}
case ABSORBANCE_READER_LID:
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const absorbanceReaderRead: CommandCreator<AbsorbanceReaderReadArgs> = (
invariantContext,
prevRobotState
) => {
const { module, filePath } = args
const { module, fileName } = args
const errors: CommandCreatorError[] = []
const absorbanceReaderState = absorbanceReaderStateGetter(
prevRobotState,
Expand All @@ -37,7 +37,7 @@ export const absorbanceReaderRead: CommandCreator<AbsorbanceReaderReadArgs> = (
key: uuid(),
params: {
moduleId: module,
...(filePath != null ? { filePath } : {}),
...(fileName != null ? { fileName } : {}),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const absorbanceReaderCloseRead: CommandCreator<AbsorbanceReaderReadArgs>
curryCommandCreator(absorbanceReaderRead, {
commandCreatorFnName: 'absorbanceReaderRead',
module,
filePath,
fileName,
}),
]
return reduceCommandCreators(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const forAbsorbanceReaderOpenLid = (
const moduleState = _getAbsorbanceReaderState(robotState, moduleId)

if (moduleState != null) {
moduleState.lidOpen = true
}
moduleState.lidOpen = true
}
}

export const forAbsorbanceReaderCloseLid = (
Expand All @@ -51,8 +51,8 @@ export const forAbsorbanceReaderCloseLid = (
const moduleState = _getAbsorbanceReaderState(robotState, moduleId)

if (moduleState != null) {
moduleState.lidOpen = false
}
moduleState.lidOpen = false
}
}

export const forAbsorbanceReaderInitialize = (
Expand All @@ -70,11 +70,11 @@ export const forAbsorbanceReaderInitialize = (

const moduleState = _getAbsorbanceReaderState(robotState, moduleId)
if (moduleState != null) {
moduleState.initialization = {
mode: measureMode,
wavelengths: sampleWavelengths,
referenceWavelength,
moduleState.initialization = {
mode: measureMode,
wavelengths: sampleWavelengths,
referenceWavelength,
}
moduleState.lidOpen = false
}
moduleState.lidOpen = false
}
}
2 changes: 1 addition & 1 deletion step-generation/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export interface AbsorbanceReaderInitializeArgs {
export interface AbsorbanceReaderReadArgs {
module: string
commandCreatorFnName: 'absorbanceReaderRead'
filePath: string | null
fileName: string | null
message?: string
}

Expand Down

0 comments on commit 4f92a98

Please sign in to comment.