Register as Thing properties
This commit is contained in:
parent
6caa663628
commit
7715c19305
1 changed files with 4 additions and 0 deletions
|
|
@ -9,10 +9,13 @@ from openflexure_microscope.common.labthings_core.utilities import (
|
||||||
from openflexure_microscope.common.flask_labthings.find import find_device
|
from openflexure_microscope.common.flask_labthings.find import find_device
|
||||||
from openflexure_microscope.common.flask_labthings.resource import Resource
|
from openflexure_microscope.common.flask_labthings.resource import Resource
|
||||||
|
|
||||||
|
from openflexure_microscope.common.flask_labthings.decorators import ThingProperty
|
||||||
|
|
||||||
from flask import jsonify, request, abort
|
from flask import jsonify, request, abort
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
||||||
|
@ThingProperty
|
||||||
class SettingsProperty(Resource):
|
class SettingsProperty(Resource):
|
||||||
def get(self):
|
def get(self):
|
||||||
microscope = find_device("org.openflexure.microscope")
|
microscope = find_device("org.openflexure.microscope")
|
||||||
|
|
@ -57,6 +60,7 @@ class NestedSettingsProperty(Resource):
|
||||||
return self.get(route)
|
return self.get(route)
|
||||||
|
|
||||||
|
|
||||||
|
@ThingProperty
|
||||||
class StatusProperty(Resource):
|
class StatusProperty(Resource):
|
||||||
def get(self):
|
def get(self):
|
||||||
microscope = find_device("org.openflexure.microscope")
|
microscope = find_device("org.openflexure.microscope")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue