Skip to content

Commit 4e46605

Browse files
mryel00Surion79
andauthored
libcamera: fix compilation errors for libcamera v0.5.0 (#169)
* libcamera: add support for ControlTypePoint Signed-off-by: Patrick Gehrsitz <[email protected]> * libcamera: fix compile error on missing ControlType This adds a runtime error for missing ControlTypes to fix compilation errors if there are new ControlTypes that are not implemented yet. Signed-off-by: Patrick Gehrsitz <[email protected]> * chore: remove whitespaces Signed-off-by: Patrick Gehrsitz <[email protected]> * libcamera: only use ControlTypePoint for libcamera>=0.3.2 Signed-off-by: Patrick Gehrsitz <[email protected]> * fix: add version check to second switch case Signed-off-by: Patrick Gehrsitz <[email protected]> * fix: add version check to libcamera_parse_point Signed-off-by: Patrick Gehrsitz <[email protected]> * Add AeState to stable LIBCAMERA_CONTROL block Moved AeState from the draft control list to the stable control block for better alignment with finalized controls. * fix: fix backwards compatibility Signed-off-by: Patrick Gehrsitz <[email protected]> --------- Signed-off-by: Patrick Gehrsitz <[email protected]> Co-authored-by: Surion79 <[email protected]>
1 parent 68de118 commit 4e46605

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

device/libcamera/options.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,14 @@ static std::map<unsigned, libcamera_control_id_t> libcamera_control_ids =
5050
LIBCAMERA_CONTROL(AfSpeed, "AfSpeed"),
5151
LIBCAMERA_CONTROL(AfTrigger, "AfTrigger"),
5252
LIBCAMERA_CONTROL(AfState, "AfState"),
53+
#if LIBCAMERA_VERSION_MAJOR == 0 && LIBCAMERA_VERSION_MINOR >= 5 // Support for older libcamera versions
54+
LIBCAMERA_CONTROL(AeState, "AeState"),
55+
#else
56+
LIBCAMERA_DRAFT_CONTROL(AeState),
57+
#endif
5358
LIBCAMERA_DRAFT_CONTROL(AePrecaptureTrigger),
5459
LIBCAMERA_DRAFT_CONTROL(NoiseReductionMode),
5560
LIBCAMERA_DRAFT_CONTROL(ColorCorrectionAberrationMode),
56-
LIBCAMERA_DRAFT_CONTROL(AeState),
5761
LIBCAMERA_DRAFT_CONTROL(AwbState),
5862
LIBCAMERA_DRAFT_CONTROL(LensShadingMapMode),
5963
#if LIBCAMERA_VERSION_MAJOR == 0 && LIBCAMERA_VERSION_MINOR < 1 // Support RasPI bullseye

0 commit comments

Comments
 (0)