From bd5843cec71fc10894a5f3d58dfeffdc01352050 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Thu, 11 Apr 2019 16:45:30 +0100 Subject: [PATCH] Fixed camera's read_config method read_config was only returning keys already present in the camera's config dictionary, which meant that if the camera settings were reset/deleted, it no longer read the settings from the picamera object. I've changed it to use CONFIG_KEYS instead, which I believe is the correct behaviour. --- openflexure_microscope/camera/pi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openflexure_microscope/camera/pi.py b/openflexure_microscope/camera/pi.py index 3f693ad6..eac2aed6 100644 --- a/openflexure_microscope/camera/pi.py +++ b/openflexure_microscope/camera/pi.py @@ -131,7 +131,7 @@ class StreamingCamera(BaseCamera): } # PiCamera parameters (obtained directly from PiCamera object) - for key, _ in self.config['picamera_settings'].items(): + for key, _ in CONFIG_KEYS['picamera_settings'].items(): try: value = getattr(self.camera, key) conf_dict['picamera_settings'][key] = value