utils: tuning: Change Tuner.add() to accept a list of modules

Change the first parameter of Tuner.add() to accept either a list of
modules or a single module. This allows more compact code and is in sync
with Tuner.set_output_order().

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Stefan Klug 2024-07-09 16:15:18 +02:00
parent 1dfedac794
commit 53108b6ff1
2 changed files with 5 additions and 10 deletions

View file

@ -45,15 +45,7 @@ lsc = LSCRkISP1(debug=[lt.Debug.Plot],
smoothing_function=lt.smoothing.MedianBlur(3),)
tuner = lt.Tuner('RkISP1')
tuner.add(agc)
tuner.add(awb)
tuner.add(blc)
tuner.add(ccm)
tuner.add(color_processing)
tuner.add(filter)
tuner.add(gamma_out)
tuner.add(lsc)
tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc])
tuner.set_input_parser(YamlParser())
tuner.set_output_formatter(YamlOutput())
tuner.set_output_order([agc, awb, blc, ccm, color_processing,