Merge branch 'master' into 'deltastage'

v1.1.2 fixes

See merge request openflexure/openflexure-microscope-server!33
This commit is contained in:
Joel Collins 2019-08-08 10:12:50 +00:00
commit be141b2be1
4 changed files with 12 additions and 5 deletions

View file

@ -205,7 +205,8 @@ class ConfigAPI(MicroscopeView):
"""
payload = JsonPayload(request)
logging.debug("Updating settings from POST request.")
logging.debug("Updating settings from POST request:")
logging.debug(payload.json)
self.microscope.apply_config(payload.json)
self.microscope.save_config()

View file

@ -13,6 +13,12 @@ class PluginSchemaAPI(MicroscopeView):
.. :quickref: Plugin; Get schemas
Returns an array of present plugin schemas (describing plugin user interfaces.)
Please note, this is *not* a list of all enabled plugins, only those with associated
user interface forms.
A complete list of enabled plugins can be found in the microscope state.
"""
out = self.microscope.plugin.schemas
return jsonify(out)

View file

@ -173,15 +173,15 @@ class PiCameraStreamer(BaseCamera):
# Apply gains and let them settle
if 'analog_gain' in settings_dict:
logging.debug("Applying analog_gain: {}".format(settings_dict['analog_gain']))
set_analog_gain(self.camera, settings_dict['analog_gain'])
set_analog_gain(self.camera, float(settings_dict['analog_gain']))
if 'digital_gain' in settings_dict:
logging.debug("Applying digital_gain: {}".format(settings_dict['digital_gain']))
set_digital_gain(self.camera, settings_dict['digital_gain'])
set_digital_gain(self.camera, float(settings_dict['digital_gain']))
# Apply shutter speed
if 'shutter_speed' in settings_dict:
logging.debug("Applying shutter_speed: {}".format(settings_dict['shutter_speed']))
self.camera.shutter_speed = settings_dict['shutter_speed']
self.camera.shutter_speed = int(settings_dict['shutter_speed'])
time.sleep(0.2) # Let gains settle

View file

@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"
[tool.poetry]
name = "openflexure_microscope"
version = "1.1.1"
version = "1.1.2"
description = "Python module, and Flask-based web API, to run the OpenFlexure Microscope."
authors = [