[4/4] ipa: rpi: controller: Ignore algorithms starting with disable
diff mbox series

Message ID 20251024144049.3311-5-david.plowman@raspberrypi.com
State New
Headers show
Series
  • Raspberry Pi AWB using neural networks
Related show

Commit Message

David Plowman Oct. 24, 2025, 2:16 p.m. UTC
From: Peter Bailey <peter.bailey@raspberrypi.com>

Prevent an algorithm starting with "disable" from being loaded.

Signed-off-by: Peter Bailey <peter.bailey@raspberrypi.com>
---
 src/ipa/rpi/controller/controller.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

Patch
diff mbox series

diff --git a/src/ipa/rpi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp
index df45dcd3..5eee0693 100644
--- a/src/ipa/rpi/controller/controller.cpp
+++ b/src/ipa/rpi/controller/controller.cpp
@@ -145,6 +145,12 @@  int Controller::read(char const *filename)
 
 int Controller::createAlgorithm(const std::string &name, const YamlObject &params)
 {
+	if (name.find("disable") == 0) {
+		LOG(RPiController, Debug)
+			<< "Algorithm \"" << name << "\" is disabled";
+		return 0;
+	}
+
 	auto it = getAlgorithms().find(name);
 	if (it == getAlgorithms().end()) {
 		LOG(RPiController, Warning)