summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-27 17:44:21 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-27 22:02:27 +0300
commit0381b09f89000713edc2a34a565657bfa548ab0c (patch)
treeea544cd8fe5226aaa7ad9ba7d09eb0c579d596ab
parented0d3a9d71acdaf9254fed82032cce26b4534c36 (diff)
py: Fix SceneFlicker enum values
Stripping 'SceneFlicker' prefix from the enum value names leads to '50Hz' and '60Hz', which are not valid names. So add another heuristics to keep the prefix for SceneFlicker. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xsrc/py/libcamera/gen-py-control-enums.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/py/libcamera/gen-py-control-enums.py b/src/py/libcamera/gen-py-control-enums.py
index dcc28b1a..6b2b5362 100755
--- a/src/py/libcamera/gen-py-control-enums.py
+++ b/src/py/libcamera/gen-py-control-enums.py
@@ -42,6 +42,9 @@ def generate_py(controls):
if name == 'LensShadingMapMode':
prefix = 'LensShadingMapMode'
+ elif name == 'SceneFlicker':
+ # If we strip the prefix, we would get '50Hz', which is illegal name
+ prefix = ''
else:
prefix = find_common_prefix([e['name'] for e in enum])