Skip to content

Commit

Permalink
add support for raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed Oct 27, 2023
1 parent 9c48356 commit 7a6bc9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manual/actmodoscheadtracker.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
\hline
\indattr{eogpath} & OSC target path for EOG data, or empty for no EOG (string) & \\
\hline
\indattr{rawpath} & OSC target path for raw data, or empty for no raw data (string) & \\
\hline
\indattr{name} & Prefix in OSC control variables (string) & oscheadtracker\\
\hline
\indattr{rotpath} & OSC target path for rotation data (string) & \\
Expand Down
10 changes: 10 additions & 0 deletions plugins/src/tascarmod_oscheadtracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class oscheadtracker_t : public TASCAR::actor_module_t {
std::string rotpath;
// EOG path:
std::string eogpath;
// raw path:
std::string rawpath;
// configuration variables:
std::string name;
// use only z-rotation for referencing:
Expand Down Expand Up @@ -126,6 +128,10 @@ void oscheadtracker_t::connect()
lo_send(headtrackertarget, "/eog/connect", "is", session->get_srv_port(),
eogpath.c_str());
}
if(!rawpath.empty()) {
lo_send(headtrackertarget, "/raw/connect", "is", session->get_srv_port(),
rawpath.c_str());
}
}
}

Expand All @@ -134,6 +140,8 @@ void oscheadtracker_t::disconnect()
lo_send(headtrackertarget, "/disconnect", "");
if(!eogpath.empty())
lo_send(headtrackertarget, "/eog/disconnect", "");
if(!rawpath.empty())
lo_send(headtrackertarget, "/raw/disconnect", "");
}

void oscheadtracker_t::release()
Expand All @@ -153,6 +161,8 @@ oscheadtracker_t::oscheadtracker_t(const TASCAR::module_cfg_t& cfg)
GET_ATTRIBUTE(rotpath, "", "OSC target path for rotation data");
GET_ATTRIBUTE(eogpath, "",
"OSC target path for EOG data, or empty for no EOG");
GET_ATTRIBUTE(rawpath, "",
"OSC target path for raw data, or empty for no raw data");
GET_ATTRIBUTE(ttl, "", "Time-to-live of OSC multicast data");
GET_ATTRIBUTE(autoref, "",
"Filter coefficient for estimating reference orientation from "
Expand Down

0 comments on commit 7a6bc9d

Please sign in to comment.