py: Generate control enums from yaml
Generate enums for controls from control_ids.yaml. The generator script has some heuristics to generate nicer enum names. E.g. instead of having "LensShadingMapMode.LensShadingMapModeOff" we get "LensShadingMapMode.Off". This heuristics may need to be updated when the yaml file is changed or new controls are added. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
8aa02271fd
commit
6e92cb9dc4
@@ -137,10 +137,12 @@ static void handleRequestCompleted(Request *req)
|
||||
}
|
||||
|
||||
void init_pyenums(py::module &m);
|
||||
void init_pyenums_generated(py::module &m);
|
||||
|
||||
PYBIND11_MODULE(_libcamera, m)
|
||||
{
|
||||
init_pyenums(m);
|
||||
init_pyenums_generated(m);
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user