Apply suggestions from code review of branch update-for-labthings0.0.12

Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
This commit is contained in:
Julian Stirling 2025-12-16 13:23:03 +00:00
parent a67afdf21f
commit ddc81f9c17
2 changed files with 2 additions and 8 deletions

View file

@ -71,8 +71,7 @@ class PicameraStreamOutput(Output):
def __init__(self, stream: lt.outputs.MJPEGStream) -> None:
"""Create an output that puts frames in an MJPEGStream.
We need to pass the stream object, because new frame notifications happen in
the anyio event loop and frames are sent from a thread.
:param stream: The labthings MJPEGStream to send frames to.
"""
Output.__init__(self)
self.stream = stream
@ -182,7 +181,7 @@ class StreamingPiCamera2(BaseCamera):
"""Override save_settings to ensure that camera properties don't recurse.
This method is run by any Thing when a setting is saved. However, the
method reads the thing_setting. As reading the thing setting talks to the
method reads the setting. As reading the setting talks to the
camera and calls save_settings if the value is not as expected, this could
cause recursion. Also this means that saving one setting causes all others
to be read each time.