mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 17:35:06 +03:00
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>
This commit is contained in:
parent
ed0d3a9d71
commit
0381b09f89
1 changed files with 3 additions and 0 deletions
|
@ -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])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue