Add "board" to all device states

This commit is contained in:
Joel Collins 2019-09-19 17:22:04 +01:00
parent b0be4fc26a
commit 33af3bf48c
3 changed files with 18 additions and 5 deletions

View file

@ -66,9 +66,13 @@ class PiCameraStreamer(BaseCamera):
) #: :py:class:`picamera.PiCamera`: Picamera object
# Store state of PiCameraStreamer
self.state.update(
{"stream_active": False, "record_active": False, "preview_active": False}
)
self.state.update({
"stream_active": False,
"record_active": False,
"preview_active": False,
"board": f"picamera_{self.camera.revision}",
})
# Reset variable states
self.set_zoom(1.0)
@ -78,6 +82,9 @@ class PiCameraStreamer(BaseCamera):
self.numpy_resolution = (1312, 976)
self.jpeg_quality = 75
# Update board identifier
self.state.update({})
# Create an empty stream
self.stream = io.BytesIO()