summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/controller')
-rw-r--r--src/ipa/raspberrypi/controller/algorithm.h4
-rw-r--r--src/ipa/raspberrypi/controller/controller.cpp6
-rw-r--r--src/ipa/raspberrypi/controller/controller.h4
3 files changed, 14 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/algorithm.h b/src/ipa/raspberrypi/controller/algorithm.h
index 4f327598..7c22fbe4 100644
--- a/src/ipa/raspberrypi/controller/algorithm.h
+++ b/src/ipa/raspberrypi/controller/algorithm.h
@@ -41,6 +41,10 @@ public:
{
return controller_->getGlobalMetadata();
}
+ const std::string &getTarget() const
+ {
+ return controller_->getTarget();
+ }
private:
Controller *controller_;
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<YamlObject> root = YamlParser::parse(file);
double version = (*root)["version"].get<double>(1.0);
+ target_ = (*root)["target"].get<std::string>("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_;
+}
diff --git a/src/ipa/raspberrypi/controller/controller.h b/src/ipa/raspberrypi/controller/controller.h
index e6c950c3..24e02903 100644
--- a/src/ipa/raspberrypi/controller/controller.h
+++ b/src/ipa/raspberrypi/controller/controller.h
@@ -46,6 +46,7 @@ public:
void process(StatisticsPtr stats, Metadata *imageMetadata);
Metadata &getGlobalMetadata();
Algorithm *getAlgorithm(std::string const &name) const;
+ const std::string &getTarget() const;
protected:
int createAlgorithm(const std::string &name, const libcamera::YamlObject &params);
@@ -53,6 +54,9 @@ protected:
Metadata globalMetadata_;
std::vector<AlgorithmPtr> algorithms_;
bool switchModeCalled_;
+
+private:
+ std::string target_;
};
} /* namespace RPiController */