Loading openflexure_microscope/api/v2/views/stage.py +10 −6 Original line number Diff line number Diff line Loading @@ -7,14 +7,19 @@ import logging class StageTypeProperty(PropertyView): """The type of the stage""" schema = fields.String( missing=None, example="SangaStage", OneOf=["SangaStage", "SangaDeltaStage"], description="The translation stage geometry", ) def get(self): """ Get the stage geometry. """ microscope = find_component("org.openflexure.microscope") return microscope.configuration['stage']['type'] schema = fields.String(missing=None, example="SangaStage", description="The stage geometry [SangaStage, SangaDeltaStage]") return microscope.configuration["stage"]["type"] def put(self, stage_type): """ Loading @@ -23,4 +28,3 @@ class StageTypeProperty(PropertyView): microscope = find_component("org.openflexure.microscope") microscope.set_stage(stage_type=stage_type) return microscope.configuration["stage"]["type"] Loading
openflexure_microscope/api/v2/views/stage.py +10 −6 Original line number Diff line number Diff line Loading @@ -7,14 +7,19 @@ import logging class StageTypeProperty(PropertyView): """The type of the stage""" schema = fields.String( missing=None, example="SangaStage", OneOf=["SangaStage", "SangaDeltaStage"], description="The translation stage geometry", ) def get(self): """ Get the stage geometry. """ microscope = find_component("org.openflexure.microscope") return microscope.configuration['stage']['type'] schema = fields.String(missing=None, example="SangaStage", description="The stage geometry [SangaStage, SangaDeltaStage]") return microscope.configuration["stage"]["type"] def put(self, stage_type): """ Loading @@ -23,4 +28,3 @@ class StageTypeProperty(PropertyView): microscope = find_component("org.openflexure.microscope") microscope.set_stage(stage_type=stage_type) return microscope.configuration["stage"]["type"]