Skip to content

Commit

Permalink
Merge pull request #18 from azerupi/main
Browse files Browse the repository at this point in the history
Fix parseModelDef for NatNet >=4.1.0
  • Loading branch information
whoenig committed Aug 6, 2024
2 parents 0a3dd5a + 66ad0e3 commit 251b6c6
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 251b6c6

Please sign in to comment.