Loading openflexure_microscope/api/v2/views/actions/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ _actions = { "conditions": True, }, "setStage": { "rule" : "/stage/set/", "view_class": stage.SetStageAPI, "rule" : "/stage/type/", "view_class": stage.StageTypeAPI, "conditions": True, }, "shutdown": { Loading openflexure_microscope/api/v2/views/actions/stage.py +9 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class ZeroStageAPI(ActionView): # TODO: Make schema for microscope state return microscope.state["stage"] class SetStageAPI(ActionView): class StageTypeAPI(ActionView): args = { "stage_type": fields.String(missing = None, example = "SangaStage", description = "The stage geometry [SangaStage, SangaDeltaStage]") } Loading @@ -78,5 +78,12 @@ class SetStageAPI(ActionView): microscope.set_stage(stage_type=args.get("stage_type")) # TODO: Make schema for microscope state return microscope.state["stage"] return microscope.configuration["stage"]["type"] def get(self): """ Get the stage geometry. """ microscope = find_component("org.openflexure.microscope") return microscope.configuration["stage"]["type"] Loading
openflexure_microscope/api/v2/views/actions/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ _actions = { "conditions": True, }, "setStage": { "rule" : "/stage/set/", "view_class": stage.SetStageAPI, "rule" : "/stage/type/", "view_class": stage.StageTypeAPI, "conditions": True, }, "shutdown": { Loading
openflexure_microscope/api/v2/views/actions/stage.py +9 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class ZeroStageAPI(ActionView): # TODO: Make schema for microscope state return microscope.state["stage"] class SetStageAPI(ActionView): class StageTypeAPI(ActionView): args = { "stage_type": fields.String(missing = None, example = "SangaStage", description = "The stage geometry [SangaStage, SangaDeltaStage]") } Loading @@ -78,5 +78,12 @@ class SetStageAPI(ActionView): microscope.set_stage(stage_type=args.get("stage_type")) # TODO: Make schema for microscope state return microscope.state["stage"] return microscope.configuration["stage"]["type"] def get(self): """ Get the stage geometry. """ microscope = find_component("org.openflexure.microscope") return microscope.configuration["stage"]["type"]