Renamed devices to components
This commit is contained in:
parent
6b99873d53
commit
4003e4e65c
11 changed files with 60 additions and 50 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from openflexure_microscope.api.utilities import get_bool, JsonResponse
|
||||
from openflexure_microscope.common.flask_labthings.resource import Resource
|
||||
from openflexure_microscope.common.flask_labthings.find import find_device
|
||||
from openflexure_microscope.common.flask_labthings.find import find_component
|
||||
from openflexure_microscope.common.flask_labthings.decorators import (
|
||||
use_args,
|
||||
marshal_with,
|
||||
|
|
@ -48,7 +48,7 @@ class CaptureAPI(Resource):
|
|||
"""
|
||||
Create a new capture
|
||||
"""
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
resize = args.get("resize", None)
|
||||
if resize:
|
||||
|
|
@ -100,7 +100,7 @@ class GPUPreviewStartAPI(Resource):
|
|||
"""
|
||||
Start the onboard GPU preview.
|
||||
"""
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
window = args.get("window")
|
||||
logging.debug(window)
|
||||
|
|
@ -124,7 +124,7 @@ class GPUPreviewStopAPI(Resource):
|
|||
"""
|
||||
Stop the onboard GPU preview.
|
||||
"""
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
microscope.camera.stop_preview()
|
||||
# TODO: Make schema for microscope status
|
||||
return jsonify(microscope.status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue