Add "board" to all device states
This commit is contained in:
parent
b0be4fc26a
commit
33af3bf48c
3 changed files with 18 additions and 5 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue