23 #include "pantilt_plugin.h"
25 #include "dirperc/dp_thread.h"
26 #include "robotis/rx28_thread.h"
27 #include "sensor_thread.h"
28 #include "sony/evid100p_thread.h"
45 std::set<std::string> ptus;
46 std::set<std::string> ignored_ptus;
48 std::string prefix =
"/hardware/pantilt/";
49 std::string ptus_prefix = prefix +
"ptus/";
55 std::string ptu = std::string(i->
path()).substr(ptus_prefix.length());
56 ptu = ptu.substr(0, ptu.find(
"/"));
58 if ((ptus.find(ptu) == ptus.end()) && (ignored_ptus.find(ptu) == ignored_ptus.end())) {
59 std::string ptu_prefix = ptus_prefix + ptu +
"/";
74 }
else if (type ==
"EviD100P") {
76 }
else if (type ==
"DirPercASCII") {
79 throw Exception(
"Unknown PTU type %s", type.c_str());
87 ignored_ptus.insert(ptu);
94 throw Exception(
"No synchronization peers configured, aborting");
99 PLUGIN_DESCRIPTION(
"Use pan/tilt units with Fawkes.")