Updated docs

This commit is contained in:
jtc42 2019-06-07 13:37:20 +01:00
parent fdbba08b66
commit 235aa984f9
12 changed files with 143 additions and 77 deletions

View file

@ -1 +1,2 @@
sphinxcontrib.httpdomain
sphinxcontrib.httpdomain
sphinx_rtd_theme

View file

@ -42,21 +42,23 @@ CURL
.. code-block:: none
curl -X POST -H "Content-Type: application/json" -d \\
'{"picamera_settings": {"shutter_speed": 2000}, "jpeg_quality": 90}' http://192.168.1.126:5000/api/v1/config
'{"camera_settings": {"picamera_settings": {"shutter_speed": 2000}, "jpeg_quality": 90}}' http://192.168.1.126:5000/api/v1/config
HTTPie
++++++
.. code-block:: none
http POST http://192.168.1.126:5000/api/v1/config jpeg_quality:=90 picamera_settings:='{"shutter_speed": 2000}'
http POST http://192.168.1.126:5000/api/v1/config camera_settings:='{"jpeg_quality": 90, "picamera_settings": {"shutter_speed": 2000}}'
Python Requests
+++++++++++++++
.. code-block:: python
json_payload = {
"jpeg_quality": 90,
"picamera_settings": {"shutter_speed": 2000}
camera_settings: {
"jpeg_quality": 90,
"picamera_settings": {"shutter_speed": 2000}
}
}
requests.post('http://192.168.1.126:5000/api/v1/config', json=json_payload)

View file

@ -1,5 +1,5 @@
Microscope configuration
=======================================================
========================
.. toctree::
:maxdepth: 2
@ -18,7 +18,7 @@ in separate "auxillary" config files, and are linked together by adding the conf
microscope RC file. This is set up by default, as shown below:
Default microscope_settings.yaml
+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++
.. code-block:: yaml
# Resolutions for streaming and capture
@ -58,7 +58,7 @@ Example picamera_settings.yaml
Loading the runtime-config
+++++++
++++++++++++++++++++++++++
By default, a microscope object will load the a runtime-config from the default location.
This RC can then be passed to any hardware attached to the microscope. This can be particularly

View file

@ -22,12 +22,17 @@ Lock module
Default plugins
---------------
Microscope plugin
+++++++++++++++++
.. automodule:: openflexure_microscope.plugins.default.plugin
Autofocus
+++++++++
.. automodule:: openflexure_microscope.plugins.default.autofocus
:members:
Web API plugin
++++++++++++++
.. automodule:: openflexure_microscope.plugins.default.api
Camera calibration
++++++++++++++++++
.. automodule:: openflexure_microscope.plugins.default.camera_calibration
:members:
Scan and Stack
++++++++++++++
.. automodule:: openflexure_microscope.plugins.default.scan
:members:

View file

@ -26,7 +26,7 @@ Generally, for adding anything other than very simple functionality, plugins sho
The main restriction is that the plugin package must be importable using an absolute import from within the Python environment being used to load your microscope.
Loading plugins with microscope_settings.yaml
--------------------------------------
---------------------------------------------
Both types of plugin are loaded by specifying the plugin class in your :ref:`MicroscopeRC`. In the case of a single-file plugin, specify the path to the plugin file, followed by the name of your :py:class:`openflexure_microscope.plugins.MicroscopePlugin` child class, separated by a colon. For packaged plugins, specify the absolute module name in place of the path.
For example, the plugins section of your microscope_settings.yaml file may look like: