stage API returns a dict

This commit is contained in:
samuelmcdermott 2020-10-12 16:56:25 +01:00
parent b25e7b75e0
commit f30679d4db

View file

@ -76,14 +76,12 @@ class StageTypeAPI(ActionView):
""" """
microscope = find_component("org.openflexure.microscope") microscope = find_component("org.openflexure.microscope")
microscope.set_stage(stage_type=args.get("stage_type")) microscope.set_stage(stage_type=args.get("stage_type"))
return {"stage_type": microscope.configuration["stage"]["type"]}
# TODO: Make schema for microscope state
return microscope.configuration["stage"]["type"]
def get(self): def get(self):
""" """
Get the stage geometry. Get the stage geometry.
""" """
microscope = find_component("org.openflexure.microscope") microscope = find_component("org.openflexure.microscope")
return microscope.configuration["stage"]["type"] return {"stage_type": microscope.configuration["stage"]["type"]}