Apply suggestions from code review of branch jpeg-capture-in-stacking

Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
This commit is contained in:
Julian Stirling 2025-06-25 09:17:32 +00:00
parent 4e78f3d104
commit 8a4ad49c03
2 changed files with 3 additions and 5 deletions

View file

@ -146,8 +146,6 @@ class BaseCamera(Thing):
) -> None:
"""Capture an image and save it to disk
This will set the event `acquired` once the image has been acquired, so
that the stage may be moved while it's saved.
save_resolution can be set to resize the image before saving. By default this is None
meaning that the image is saved at original resoltion.

View file

@ -141,7 +141,7 @@ class StreamingPiCamera2(BaseCamera):
"%s while updating persistent controls.",
key,
self.persistent_controls[key],
self.persistent_controls[key],
value,
)
else:
self.persistent_controls[key] = value
@ -442,14 +442,14 @@ class StreamingPiCamera2(BaseCamera):
@thing_action
def capture_image(
self,
stream_name: Literal["main", "lores", "raw", "full"] = "main",
stream_name: Literal["main", "lores", "raw"] = "main",
wait: Optional[float] = 0.9,
):
"""Acquire one image from the camera.
Return it as a PIL Image
stream_name: (Optional) The PiCamera2 stream to use, should be one of ["main", "lores", "raw", "full"]. Default = "main"
stream_name: (Optional) The PiCamera2 stream to use, should be one of ["main", "lores", "raw"]. Default = "main"
wait: (Optional, float) Set a timeout in seconds.
A TimeoutError is raised if this time is exceeded during capture.
Default = 0.9s, lower than the 1s timeout default in picamera yaml settings