utils: codegen: gen-controls.py: Convert to jinja2 templates
Jinja2 templates help separate the logic related to the template from the generation of the data. The python code becomes much clearer as a result. As an added bonus, we can use a single template file for both controls and properties. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
@@ -80,7 +80,7 @@ foreach mode, entry : controls_map
|
||||
properties_files_names += files_list
|
||||
endif
|
||||
|
||||
template_file = files(outfile + '.in')
|
||||
template_file = files('control_ids.h.in')
|
||||
ranges_file = files('../../src/libcamera/control_ranges.yaml')
|
||||
control_headers += custom_target(header + '_h',
|
||||
input : input_files,
|
||||
|
||||
Reference in New Issue
Block a user