diff --git a/openflexure_microscope/api/v1/blueprints/base.py b/openflexure_microscope/api/v1/blueprints/base.py index 5e71aa4f..1a6353f1 100644 --- a/openflexure_microscope/api/v1/blueprints/base.py +++ b/openflexure_microscope/api/v1/blueprints/base.py @@ -176,6 +176,7 @@ class ConfigAPI(MicroscopeView): return jsonify(self.microscope.config) + def construct_blueprint(microscope_obj): blueprint = Blueprint('base_blueprint', __name__) diff --git a/openflexure_microscope/api/v1/blueprints/stage.py b/openflexure_microscope/api/v1/blueprints/stage.py index c1786f30..b0ee5a6b 100644 --- a/openflexure_microscope/api/v1/blueprints/stage.py +++ b/openflexure_microscope/api/v1/blueprints/stage.py @@ -1,5 +1,6 @@ -from openflexure_microscope.api.utilities import gen, axes_to_array, JsonPayload +from openflexure_microscope.api.utilities import gen, JsonPayload from openflexure_microscope.api.v1.views import MicroscopeView +from openflexure_microscope.utilities import axes_to_array from flask import Response, Blueprint, jsonify, request @@ -80,69 +81,6 @@ class PositionAPI(MicroscopeView): return jsonify(self.microscope.state['stage']['position']) -class StageParamsAPI(MicroscopeView): - - def get(self): - """ - Return current parameters of the stage. - - .. :quickref: Stage params; Get current stage parameters - - **Example request**: - - .. sourcecode:: http - - GET /stage/params HTTP/1.1 - Accept: application/json - - **Example response**: - - .. sourcecode:: http - - HTTP/1.1 200 OK - Vary: Accept - Content-Type: application/json - - { - "backlash": { - "x": 0, - "y": 0, - "z": 128 - }, - } - - """ - - return jsonify(self.microscope.state['stage']) - - def post(self): - """ - Set parameters of the stage. - - .. :quickref: Stage params; Set current stage parameters - - :reqheader Accept: application/json - :