Moved status routes to instrument/state
This commit is contained in:
parent
e9e2419fe4
commit
9b4bf4c8fc
16 changed files with 52 additions and 64 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from .actions import enabled_root_actions
|
||||
from .captures import *
|
||||
from .state import *
|
||||
from .instrument import *
|
||||
from .streams import *
|
||||
|
|
|
|||
|
|
@ -163,8 +163,8 @@ class GPUPreviewStartAPI(View):
|
|||
|
||||
microscope.camera.start_preview(fullscreen=fullscreen, window=window)
|
||||
|
||||
# TODO: Make schema for microscope status
|
||||
return jsonify(microscope.status)
|
||||
# TODO: Make schema for microscope state
|
||||
return jsonify(microscope.state)
|
||||
|
||||
|
||||
@ThingAction
|
||||
|
|
@ -175,5 +175,5 @@ class GPUPreviewStopAPI(View):
|
|||
"""
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
microscope.camera.stop_preview()
|
||||
# TODO: Make schema for microscope status
|
||||
return jsonify(microscope.status)
|
||||
# TODO: Make schema for microscope state
|
||||
return jsonify(microscope.state)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class MoveStageAPI(View):
|
|||
else:
|
||||
logging.warning("Unable to move. No stage found.")
|
||||
|
||||
# TODO: Make schema for microscope status
|
||||
# TODO: Make schema for microscope state
|
||||
return jsonify(microscope.state["stage"]["position"])
|
||||
|
||||
|
||||
|
|
@ -66,5 +66,5 @@ class ZeroStageAPI(View):
|
|||
microscope = find_component("org.openflexure.microscope")
|
||||
microscope.stage.zero_position()
|
||||
|
||||
# TODO: Make schema for microscope status
|
||||
return jsonify(microscope.status["stage"])
|
||||
# TODO: Make schema for microscope state
|
||||
return jsonify(microscope.state["stage"])
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class NestedSettingsProperty(View):
|
|||
|
||||
|
||||
@ThingProperty
|
||||
class StatusProperty(View):
|
||||
class StateProperty(View):
|
||||
def get(self):
|
||||
"""
|
||||
Show current read-only state of the microscope
|
||||
|
|
@ -82,7 +82,7 @@ class StatusProperty(View):
|
|||
|
||||
|
||||
@Tag("properties")
|
||||
class NestedStatusProperty(View):
|
||||
class NestedStateProperty(View):
|
||||
@doc_response(404, description="Status key cannot be found")
|
||||
def get(self, route):
|
||||
"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue