summaryrefslogtreecommitdiff
path: root/src/libcamera/gen-controls.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/gen-controls.py')
-rwxr-xr-xsrc/libcamera/gen-controls.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/libcamera/gen-controls.py b/src/libcamera/gen-controls.py
index ff8bda6b..87c3d52a 100755
--- a/src/libcamera/gen-controls.py
+++ b/src/libcamera/gen-controls.py
@@ -42,10 +42,11 @@ ${description}
name, ctrl = ctrl.popitem()
id_name = snake_case(name).upper()
- if ctrl.get('size'):
- ctrl_type = 'Span<const %s>' % ctrl['type']
- else:
- ctrl_type = ctrl['type']
+ ctrl_type = ctrl['type']
+ if ctrl_type == 'string':
+ ctrl_type = 'std::string'
+ elif ctrl.get('size'):
+ ctrl_type = 'Span<const %s>' % ctrl_type
info = {
'name': name,
@@ -97,10 +98,11 @@ def generate_h(controls):
ids.append('\t' + id_name + ' = ' + str(id_value) + ',')
- if ctrl.get('size'):
- ctrl_type = 'Span<const %s>' % ctrl['type']
- else:
- ctrl_type = ctrl['type']
+ ctrl_type = ctrl['type']
+ if ctrl_type == 'string':
+ ctrl_type = 'std::string'
+ elif ctrl.get('size'):
+ ctrl_type = 'Span<const %s>' % ctrl_type
info = {
'name': name,