summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/raspberrypi.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-03-27 13:20:21 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-03-31 13:29:17 +0100
commitcf6df17958f8af629410038d96e18b36df0ae6e7 (patch)
tree974272139253981f49c3e71e3e9f9d87a6dd9b20 /src/ipa/raspberrypi/raspberrypi.cpp
parentf7bf0be65360d9154e3bbed8d1a4c69cad7b0b98 (diff)
ipa: raspberrypi Store the target string in the controller
The target string may be used by algorithms to determine the running hardware target. Store the target string provided by the camera tuning files in the controller state. Add a getTarget() member function to retrieve this string. Validate the correct hardware target ("bcm2835") during the IPA initialisation phase. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/raspberrypi.cpp')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 66a020d0..92c65a2c 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -266,6 +266,14 @@ int IPARPi::init(const IPASettings &settings, bool lensPresent, IPAInitResult *r
return ret;
}
+ const std::string &target = controller_.getTarget();
+ if (target != "bcm2835") {
+ LOG(IPARPI, Error)
+ << "Tuning data file target returned \"" << target << "\""
+ << ", expected \"bcm2835\"";
+ return -EINVAL;
+ }
+
lensPresent_ = lensPresent;
controller_.initialise();