Loading openflexure_microscope/api/app.py +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ app, labthing = create_app( app.json_encoder = JSONEncoder # Attach lab devices labthing.register_device(api_microscope, "openflexure_microscope") labthing.register_device(api_microscope, "org.openflexure.microscope") # Attach extensions if not os.path.isfile(USER_EXTENSIONS_PATH): Loading openflexure_microscope/api/default_extensions/autofocus.py +3 −3 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ def fast_up_down_up_autofocus( class MeasureSharpnessAPI(Resource): def post(self): microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to measure sharpness.") Loading @@ -305,7 +305,7 @@ class AutofocusAPI(Resource): def post(self): payload = JsonResponse(request) microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to autofocus.") Loading @@ -331,7 +331,7 @@ class FastAutofocusAPI(Resource): def post(self): payload = JsonResponse(request) microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to autofocus.") Loading openflexure_microscope/api/default_extensions/scan.py +1 −1 Original line number Diff line number Diff line Loading @@ -359,7 +359,7 @@ class TileScanAPI(Resource): ) @marshal_task def post(self, args): microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to autofocus.") Loading openflexure_microscope/api/default_extensions/zip_builder.py +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ class ZipBuilderAPIView(Resource): def post(self): ids = list(JsonResponse(request).json) microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") task = taskify(default_zip_manager.build_zip_from_capture_ids)(microscope, ids) Loading openflexure_microscope/api/v2/views/actions/camera.py +3 −3 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class CaptureAPI(Resource): """ Create a new capture """ microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") resize = args.get("resize", None) if resize: Loading Loading @@ -97,7 +97,7 @@ class GPUPreviewStartAPI(Resource): """ Start the onboard GPU preview. """ microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") payload = JsonResponse(request) window = payload.param("window", default=[]) Loading @@ -120,6 +120,6 @@ class GPUPreviewStopAPI(Resource): """ Stop the onboard GPU preview. """ microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") microscope.camera.stop_preview() return jsonify(microscope.state) Loading
openflexure_microscope/api/app.py +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ app, labthing = create_app( app.json_encoder = JSONEncoder # Attach lab devices labthing.register_device(api_microscope, "openflexure_microscope") labthing.register_device(api_microscope, "org.openflexure.microscope") # Attach extensions if not os.path.isfile(USER_EXTENSIONS_PATH): Loading
openflexure_microscope/api/default_extensions/autofocus.py +3 −3 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ def fast_up_down_up_autofocus( class MeasureSharpnessAPI(Resource): def post(self): microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to measure sharpness.") Loading @@ -305,7 +305,7 @@ class AutofocusAPI(Resource): def post(self): payload = JsonResponse(request) microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to autofocus.") Loading @@ -331,7 +331,7 @@ class FastAutofocusAPI(Resource): def post(self): payload = JsonResponse(request) microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to autofocus.") Loading
openflexure_microscope/api/default_extensions/scan.py +1 −1 Original line number Diff line number Diff line Loading @@ -359,7 +359,7 @@ class TileScanAPI(Resource): ) @marshal_task def post(self, args): microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") if not microscope: abort(503, "No microscope connected. Unable to autofocus.") Loading
openflexure_microscope/api/default_extensions/zip_builder.py +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ class ZipBuilderAPIView(Resource): def post(self): ids = list(JsonResponse(request).json) microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") task = taskify(default_zip_manager.build_zip_from_capture_ids)(microscope, ids) Loading
openflexure_microscope/api/v2/views/actions/camera.py +3 −3 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class CaptureAPI(Resource): """ Create a new capture """ microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") resize = args.get("resize", None) if resize: Loading Loading @@ -97,7 +97,7 @@ class GPUPreviewStartAPI(Resource): """ Start the onboard GPU preview. """ microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") payload = JsonResponse(request) window = payload.param("window", default=[]) Loading @@ -120,6 +120,6 @@ class GPUPreviewStopAPI(Resource): """ Stop the onboard GPU preview. """ microscope = find_device("openflexure_microscope") microscope = find_device("org.openflexure.microscope") microscope.camera.stop_preview() return jsonify(microscope.state)