[PATCH 3/3] py: Add bindings for ControlId enum name
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Sep 10 23:31:06 CEST 2024
Quoting Paul Elder (2024-09-10 21:48:12)
> Add python bindings for quering enum value names from a ControlId.
s/quering/querying/
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
>
> ---
> New in v2
> ---
> src/py/libcamera/py_main.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp
> index ab33f38a8..f6aff5005 100644
> --- a/src/py/libcamera/py_main.cpp
> +++ b/src/py/libcamera/py_main.cpp
> @@ -404,7 +404,8 @@ PYBIND11_MODULE(_libcamera, m)
> .def("__repr__", [](const ControlId &self) {
> return py::str("libcamera.ControlId({}, {}, {})")
> .format(self.id(), self.name(), self.type());
> - });
> + })
> + .def("enum_name", &ControlId::enumName);
Looks too easy ? ;-)
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> pyControlInfo
> .def_property_readonly("min", [](const ControlInfo &self) {
> --
> 2.39.2
>
More information about the libcamera-devel
mailing list