Use quick capture for CSM

This commit is contained in:
Julian Stirling 2026-06-04 10:41:47 +01:00
parent 853301ca5d
commit 2faf324a59
2 changed files with 9 additions and 4 deletions

View file

@ -519,7 +519,12 @@ class BaseCamera(OFMThing, ABC):
@lt.property @lt.property
def capture_modes(self) -> Mapping[str, CaptureMode]: def capture_modes(self) -> Mapping[str, CaptureMode]:
"""Modes the camera can use for capturing.""" """Modes the camera can use for capturing."""
return {"standard": CaptureMode(description=("The standard capture mode."))} return {
"quick": CaptureMode(
description="Capture without altering the stream settings.",
),
"standard": CaptureMode(description="The standard capture mode."),
}
def _validate_capture_mode(self, capture_mode: str) -> str: def _validate_capture_mode(self, capture_mode: str) -> str:
"""Check input capture mode exists, always returns a valid mode. """Check input capture mode exists, always returns a valid mode.
@ -559,7 +564,7 @@ class BaseCamera(OFMThing, ABC):
This method provides the interface expected by the camera_stage_mapping. This method provides the interface expected by the camera_stage_mapping.
""" """
img = self.capture_as_array() img = self.capture_as_array(capture_mode="quick")
return downsample(self.downsampled_array_factor, img) return downsample(self.downsampled_array_factor, img)
@lt.action @lt.action

View file

@ -991,7 +991,7 @@ class PiCameraV2(StreamingPiCamera2):
stream_name="main", stream_name="main",
), ),
"quick": PiCamera2CaptureMode( "quick": PiCamera2CaptureMode(
description="Capture directly from the current stream.", description="Capture without altering the stream settings.",
streaming_mode=None, streaming_mode=None,
stream_name="main", stream_name="main",
), ),
@ -1054,7 +1054,7 @@ class PiCameraHQ(StreamingPiCamera2):
stream_name="main", stream_name="main",
), ),
"quick": PiCamera2CaptureMode( "quick": PiCamera2CaptureMode(
description="Capture directly from the current stream.", description="Capture without altering the stream settings.",
streaming_mode=None, streaming_mode=None,
stream_name="main", stream_name="main",
), ),