Loading openflexure_microscope/plugins/default/camera_calibration/plugin.py +18 −2 Original line number Diff line number Diff line Loading @@ -7,13 +7,27 @@ import logging from .recalibrate_utils import recalibrate_camera, auto_expose_and_freeze_settings API_SCHEMA = { 'icon': 'lifesaver', 'requireConnection': True, 'forms': [ { 'route': '/recalibrate', 'schema': [ { 'fieldType': "htmlBlock", 'name': "heading", 'content': "<b>This is different form in a plugin!</b>" } ] } ] } class RecalibrateAPIView(MicroscopeViewPlugin): def post(self): payload = JsonPayload(request) # TODO: Figure out the range of z values to use logging.info("Starting microscope recalibration...") task = self.microscope.task.start(self.plugin.recalibrate) Loading @@ -30,6 +44,8 @@ class Plugin(MicroscopePlugin): '/recalibrate': RecalibrateAPIView, } api_schema = API_SCHEMA def recalibrate(self): """Reset the camera's settings. Loading Loading
openflexure_microscope/plugins/default/camera_calibration/plugin.py +18 −2 Original line number Diff line number Diff line Loading @@ -7,13 +7,27 @@ import logging from .recalibrate_utils import recalibrate_camera, auto_expose_and_freeze_settings API_SCHEMA = { 'icon': 'lifesaver', 'requireConnection': True, 'forms': [ { 'route': '/recalibrate', 'schema': [ { 'fieldType': "htmlBlock", 'name': "heading", 'content': "<b>This is different form in a plugin!</b>" } ] } ] } class RecalibrateAPIView(MicroscopeViewPlugin): def post(self): payload = JsonPayload(request) # TODO: Figure out the range of z values to use logging.info("Starting microscope recalibration...") task = self.microscope.task.start(self.plugin.recalibrate) Loading @@ -30,6 +44,8 @@ class Plugin(MicroscopePlugin): '/recalibrate': RecalibrateAPIView, } api_schema = API_SCHEMA def recalibrate(self): """Reset the camera's settings. Loading