CSM always returns to start on error

This commit is contained in:
Joe Knapper 2025-04-02 17:54:12 +01:00
parent 550c977f59
commit 79b396a66f

View file

@ -33,7 +33,6 @@ from camera_stage_mapping.camera_stage_calibration_1d import (
image_to_stage_displacement_from_1d, image_to_stage_displacement_from_1d,
) )
from labthings_fastapi.dependencies.invocation import ( from labthings_fastapi.dependencies.invocation import (
InvocationCancelledError,
InvocationLogger, InvocationLogger,
) )
from labthings_fastapi.types.numpy import NDArray, denumpify, DenumpifyingDict from labthings_fastapi.types.numpy import NDArray, denumpify, DenumpifyingDict
@ -206,7 +205,7 @@ class CameraStageMapper(Thing):
result: dict = calibrate_backlash_1d( result: dict = calibrate_backlash_1d(
tracker, move, direction_array, logger=logger tracker, move, direction_array, logger=logger
) )
except InvocationCancelledError as e: except Exception as e:
logger.info("Returning to starting position") logger.info("Returning to starting position")
stage.move_absolute(**starting_position, block_cancellation=True) stage.move_absolute(**starting_position, block_cancellation=True)
raise e raise e