[libcamera-devel] [PATCH] ipa: rpi: print path and version read on config mismatch

Max Schulze max.schulze at online.de
Thu Nov 24 16:53:15 CET 2022


When the version is not what we expect, it is way helpful to
note the file where it happened and which version was effectively read
(i.e. to rule out conversion errors...)

Signed-off-by: Max Schulze <max.schulze at online.de>
---
 src/ipa/raspberrypi/controller/controller.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp
index e9156785..3f09ea92 100644
--- a/src/ipa/raspberrypi/controller/controller.cpp
+++ b/src/ipa/raspberrypi/controller/controller.cpp
@@ -41,7 +41,9 @@ int Controller::read(char const *filename)
 
 	if (version < 2.0) {
 		LOG(RPiController, Warning)
-			<< "This format of the tuning file will be deprecated soon!"
+			<< "This format of the tuning file " << filename
+			<< " will be deprecated soon! \n"
+			<< " Read version " <<  (*root)["version"].get<std::string>("")
 			<< " Please use the convert_tuning.py utility to update to version 2.0.";
 
 		for (auto const &[key, value] : root->asDict()) {
-- 
2.30.2



More information about the libcamera-devel mailing list