Skip to content

Commit fa5bd07

Browse files
authored
Merge pull request #31 from qualisys/update_to_1.24
Update to RTSDK 1.24
2 parents cea1da6 + 81dfe17 commit fa5bd07

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

RTClientExample/OutputSettings.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,11 @@ void COutput::Print6DOFSettings(CRTProtocol* poRTProtocol)
650650
}
651651
else
652652
{
653+
if (nMajorVersion > 1 || nMinorVersion > 23)
654+
{
655+
std::string enabledAsStr = bodiesSettings[iBody].enabled ? "True" : "False";
656+
printf(" Enabled: %s\n", enabledAsStr.c_str());
657+
}
653658
printf(" Color: R=%.2X G=%.2X B=%.2X\n", color & 0xff, (color >> 8) & 0xff, (color >> 16) & 0xff);
654659
printf(" Bone length tolerance: %f\n", bodiesSettings[iBody].boneLengthTolerance);
655660
printf(" Max residual: %f\n", bodiesSettings[iBody].maxResidual);

RTClientExample/RTClientExample.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "Operations.h"
22

33
#define LATEST_SELECTABLE_MAJOR_VERSION 1
4-
#define LATEST_SELECTABLE_MINOR_VERSION 22
4+
#define LATEST_SELECTABLE_MINOR_VERSION 24
55
#define PROGRAM_VERSION 0
66

77
int main(int argc, char **argv)

RTPacket.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#endif
1515

1616
#define MAJOR_VERSION 1
17-
#define MINOR_VERSION 23
17+
#define MINOR_VERSION 24
1818

1919
class DLL_EXPORT CRTPacket
2020
{

RTProtocol.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -3211,6 +3211,16 @@ bool CRTProtocol::Read6DOFSettings(bool &bDataAvailable)
32113211
}
32123212
s6DOFBodySettings.name = oXML.GetChildData();
32133213

3214+
if (mnMajorVersion > 1 || mnMinorVersion > 23)
3215+
{
3216+
if (!oXML.FindChildElem("Enabled"))
3217+
{
3218+
s6DOFBodySettings.enabled = true;
3219+
}
3220+
s6DOFBodySettings.enabled = oXML.GetChildData() == "true" ? true : false;
3221+
}
3222+
3223+
32143224
if (!oXML.FindChildElem("Color"))
32153225
{
32163226
return false;
@@ -5826,7 +5836,6 @@ bool CRTProtocol::SetForceSettings(
58265836
return false;
58275837
} // SetForceSettings
58285838

5829-
58305839
bool CRTProtocol::Set6DOFBodySettings(std::vector<SSettings6DOFBody> settings)
58315840
{
58325841
if (mnMajorVersion == 1 && mnMinorVersion < 21)
@@ -5848,6 +5857,7 @@ bool CRTProtocol::Set6DOFBodySettings(std::vector<SSettings6DOFBody> settings)
58485857
oXML.AddElem("Body");
58495858
oXML.IntoElem();
58505859
oXML.AddElem("Name", body.name.c_str());
5860+
oXML.AddElem("Enabled", body.enabled ? "true" : "false");
58515861
oXML.AddElem("Color");
58525862
oXML.AddAttrib("R", std::to_string(body.color & 0xff).c_str());
58535863
oXML.AddAttrib("G", std::to_string((body.color >> 8) & 0xff).c_str());

RTProtocol.h

+1
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ class DLL_EXPORT CRTProtocol
390390
struct SSettings6DOFBody
391391
{
392392
std::string name;
393+
bool enabled;
393394
uint32_t color;
394395
std::string filterPreset;
395396
float maxResidual;

0 commit comments

Comments
 (0)