From cf6df17958f8af629410038d96e18b36df0ae6e7 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 27 Mar 2023 13:20:21 +0100 Subject: 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 Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/controller/controller.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ipa/raspberrypi/controller/controller.cpp') diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp index e9156785..a6250ee1 100644 --- a/src/ipa/raspberrypi/controller/controller.cpp +++ b/src/ipa/raspberrypi/controller/controller.cpp @@ -38,6 +38,7 @@ int Controller::read(char const *filename) std::unique_ptr root = YamlParser::parse(file); double version = (*root)["version"].get(1.0); + target_ = (*root)["target"].get("bcm2835"); if (version < 2.0) { LOG(RPiController, Warning) @@ -142,3 +143,8 @@ Algorithm *Controller::getAlgorithm(std::string const &name) const } return nullptr; } + +const std::string &Controller::getTarget() const +{ + return target_; +} -- cgit v1.2.1