Fixed camera settings read

This commit is contained in:
Joel Collins 2020-11-22 16:12:04 +00:00
parent a065bc643e
commit 25d3b15d4e
2 changed files with 14 additions and 25 deletions

View file

@ -136,17 +136,13 @@ class MissingCamera(BaseCamera):
""" """
# Get config items from the base class # Get config items from the base class
conf_dict = BaseCamera.read_settings(self) conf_dict = {
# Include device-specific config items
conf_dict.update(
{
"stream_resolution": self.stream_resolution, "stream_resolution": self.stream_resolution,
"image_resolution": self.image_resolution, "image_resolution": self.image_resolution,
"numpy_resolution": self.numpy_resolution, "numpy_resolution": self.numpy_resolution,
"jpeg_quality": self.jpeg_quality, "jpeg_quality": self.jpeg_quality,
} }
)
return conf_dict return conf_dict

View file

@ -127,13 +127,7 @@ class PiCameraStreamer(BaseCamera):
""" """
Return config dictionary of the PiCameraStreamer. Return config dictionary of the PiCameraStreamer.
""" """
conf_dict = {
# Get config items from the base class
conf_dict = BaseCamera.read_settings(self)
# Include device-specific config items
conf_dict.update(
{
"stream_resolution": self.stream_resolution, "stream_resolution": self.stream_resolution,
"image_resolution": self.image_resolution, "image_resolution": self.image_resolution,
"numpy_resolution": self.numpy_resolution, "numpy_resolution": self.numpy_resolution,
@ -141,7 +135,6 @@ class PiCameraStreamer(BaseCamera):
"mjpeg_quality": self.mjpeg_quality, "mjpeg_quality": self.mjpeg_quality,
"picamera": {}, "picamera": {},
} }
)
# Include a subset of picamera properties. Excludes lens shading table # Include a subset of picamera properties. Excludes lens shading table
for key in PiCameraStreamer.picamera_settings_keys: for key in PiCameraStreamer.picamera_settings_keys: