Skip to content

Commit

Permalink
Fix parseModelDef for NatNet >=4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
azerupi committed Aug 6, 2024
1 parent 0a3dd5a commit 66ad0e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/optitrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ namespace libmotioncapture {
int type = 0; memcpy(&type, ptr, 4); ptr += 4;
// printf("Type : %d\n", i, type);

if ((major == 4 && minor >= 1) || major > 4)
{
// If the NatNet version is 4.1 or greater, next four bytes represent
// the number of bytes in the dataset. Just skip them.
ptr += 4;
}

if(type == 0) // markerset
{
ptr += strlen(ptr) + 1; // name
Expand Down

0 comments on commit 66ad0e3

Please sign in to comment.