libtuning: Migrate prints to python logging framework
In ctt_ccm.py the logging functionality of the Cam object was used. As we don't want to port over that class, it needs to be replaced anyways. While at it, also replace the eprint function as it doesn't add any value over the logging framework and misses the ability for easy log formatting. For nice output formatting add the coloredlogs library. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
This commit is contained in:
parent
b1f3b3f08d
commit
aa02706a34
9 changed files with 62 additions and 46 deletions
|
@ -5,6 +5,8 @@
|
|||
#
|
||||
# Tuning script for rkisp1
|
||||
|
||||
import coloredlogs
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import libtuning as lt
|
||||
|
@ -13,6 +15,9 @@ from libtuning.generators import YamlOutput
|
|||
from libtuning.modules.lsc import LSCRkISP1
|
||||
from libtuning.modules.agc import AGCRkISP1
|
||||
|
||||
|
||||
coloredlogs.install(level=logging.INFO, fmt='%(name)s %(levelname)s %(message)s')
|
||||
|
||||
tuner = lt.Tuner('RkISP1')
|
||||
tuner.add(LSCRkISP1(
|
||||
debug=[lt.Debug.Plot],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue