@@ -528,7 +528,7 @@ def snap_image(self) -> ArrayModel:
528
528
def capture_array (
529
529
self ,
530
530
stream_name : Literal ["main" , "lores" , "raw" ] = "main" ,
531
- wait : float = None ,
531
+ wait : Optional [ float ] = 0.9 ,
532
532
) -> ArrayModel :
533
533
"""Acquire one image from the camera and return as an array
534
534
@@ -537,7 +537,9 @@ def capture_array(
537
537
binary image formats will be added in due course.
538
538
539
539
stream_name: (Optional) The PiCamera2 stream to use, should be one of ["main", "lores", "raw"]. Default = "main"
540
- wait: (Optional, float) Set a timeout in seconds. A TimeoutError is raised if this time is exceeded during capture. Default = None
540
+ wait: (Optional, float) Set a timeout in seconds.
541
+ A TimeoutError is raised if this time is exceeded during capture.
542
+ Default = 0.9s, lower than the 1s timeout default in picamera yaml settings
541
543
"""
542
544
with self .picamera () as cam :
543
545
return cam .capture_array (stream_name , wait = wait )
@@ -548,15 +550,17 @@ def capture_raw(
548
550
states_getter : GetThingStates ,
549
551
get_states : bool = True ,
550
552
get_processing_inputs : bool = True ,
551
- wait : float = None ,
553
+ wait : Optional [ float ] = 0.9 ,
552
554
) -> RawImageModel :
553
555
"""Capture a raw image
554
556
555
557
This function is intended to be as fast as possible, and will return
556
558
as soon as an image has been captured. The output format is not intended
557
559
to be useful, except as input to `raw_to_png`.
558
560
559
- wait: (Optional, float) Set a timeout in seconds. A TimeoutError is raised if this time is exceeded during capture. Default = None
561
+ wait: (Optional, float) Set a timeout in seconds.
562
+ A TimeoutError is raised if this time is exceeded during capture.
563
+ Default = 0.9s, lower than the 1s timeout default in picamera yaml settings
560
564
561
565
When used via the HTTP interface, this function returns the data as a
562
566
`Blob` object, meaning it can be passed to another action without
@@ -705,7 +709,7 @@ def capture_jpeg(
705
709
self ,
706
710
metadata_getter : GetThingStates ,
707
711
resolution : Literal ["lores" , "main" , "full" ] = "main" ,
708
- wait : float = None ,
712
+ wait : Optional [ float ] = 0.9 ,
709
713
) -> JPEGBlob :
710
714
"""Acquire one image from the camera as a JPEG
711
715
@@ -720,7 +724,8 @@ def capture_jpeg(
720
724
resolution image.
721
725
722
726
wait: (Optional, float) Set a timeout in seconds.
723
- A TimeoutError is raised if this time is exceeded during capture. Default = None
727
+ A TimeoutError is raised if this time is exceeded during capture.
728
+ Default = 0.9s, lower than the 1s timeout default in picamera yaml settings
724
729
725
730
Note that this always uses the image processing pipeline - to
726
731
bypass this, you must use a raw capture.
0 commit comments