summaryrefslogtreecommitdiffstats
path: root/src/RemoteControl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RemoteControl.cpp')
-rw-r--r--src/RemoteControl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/RemoteControl.cpp b/src/RemoteControl.cpp
index ac9f087..31e63f2 100644
--- a/src/RemoteControl.cpp
+++ b/src/RemoteControl.cpp
@@ -57,7 +57,9 @@ std::list<std::string> RemoteControllable::get_supported_parameters() const {
return parameterlist;
}
-RemoteControllable* RemoteControllers::get_controllable_(const std::string& name) {
+RemoteControllable* RemoteControllers::get_controllable_(
+ const std::string& name)
+{
auto rc = std::find_if(controllables.begin(), controllables.end(),
[&](RemoteControllable* r) { return r->get_rc_name() == name; });
@@ -69,6 +71,17 @@ RemoteControllable* RemoteControllers::get_controllable_(const std::string& name
}
}
+void RemoteControllers::set_param(
+ const std::string& name,
+ const std::string& param,
+ const std::string& value)
+{
+ etiLog.level(info) << "RC: Setting " << name << " " << param
+ << " to " << value;
+ RemoteControllable* controllable = get_controllable_(name);
+ return controllable->set_parameter(param, value);
+}
+
// This runs in a separate thread, because
// it would take too long to be done in the main loop
// thread.