Renamed devices to components
This commit is contained in:
parent
6b99873d53
commit
4003e4e65c
11 changed files with 60 additions and 50 deletions
|
|
@ -1,4 +1,4 @@
|
|||
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.extensions import BaseExtension
|
||||
from openflexure_microscope.common.flask_labthings.resource import Resource
|
||||
from openflexure_microscope.common.flask_labthings.decorators import (
|
||||
|
|
@ -294,7 +294,7 @@ def fast_up_down_up_autofocus(
|
|||
|
||||
class MeasureSharpnessAPI(Resource):
|
||||
def post(self):
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
if not microscope:
|
||||
abort(503, "No microscope connected. Unable to measure sharpness.")
|
||||
|
|
@ -310,7 +310,7 @@ class AutofocusAPI(Resource):
|
|||
|
||||
def post(self):
|
||||
payload = JsonResponse(request)
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
if not microscope:
|
||||
abort(503, "No microscope connected. Unable to autofocus.")
|
||||
|
|
@ -337,7 +337,7 @@ class FastAutofocusAPI(Resource):
|
|||
|
||||
def post(self):
|
||||
payload = JsonResponse(request)
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
if not microscope:
|
||||
abort(503, "No microscope connected. Unable to autofocus.")
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from functools import reduce
|
|||
|
||||
from openflexure_microscope.camera.base import generate_basename
|
||||
from openflexure_microscope.common.flask_labthings.find import (
|
||||
find_device,
|
||||
find_component,
|
||||
find_extension,
|
||||
)
|
||||
from openflexure_microscope.common.flask_labthings.extensions import BaseExtension
|
||||
|
|
@ -360,7 +360,7 @@ class TileScanAPI(Resource):
|
|||
)
|
||||
@marshal_task
|
||||
def post(self, args):
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
if not microscope:
|
||||
abort(503, "No microscope connected. Unable to autofocus.")
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import zipfile
|
|||
import tempfile
|
||||
import logging
|
||||
|
||||
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.resource import Resource
|
||||
from openflexure_microscope.common.flask_labthings.extensions import BaseExtension
|
||||
from openflexure_microscope.common.flask_labthings.decorators import (
|
||||
|
|
@ -100,7 +100,7 @@ class ZipBuilderAPIView(Resource):
|
|||
def post(self):
|
||||
|
||||
ids = list(JsonResponse(request).json)
|
||||
microscope = find_device("org.openflexure.microscope")
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
task = taskify(default_zip_manager.build_zip_from_capture_ids)(microscope, ids)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue