From 16e553907a70f9da4dd22e70936c4555a6bd2bcd Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 18 Apr 2024 17:24:41 +0200 Subject: [PATCH] Disable sendspherical16 and 32 --- NetworkSync.cpp | 26 +++++++++++++------------- NetworkSync.h | 15 ++++++++------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/NetworkSync.cpp b/NetworkSync.cpp index c5b556d..4142fea 100644 --- a/NetworkSync.cpp +++ b/NetworkSync.cpp @@ -38,19 +38,19 @@ void NetworkSync::SendSpherical(unsigned char *data, int startIndex, SendAngle8(data, startIndex++, s.distance); } -void NetworkSync::SendSpherical16(unsigned char *data, int startIndex, - Spherical s) { - SendAngle16(data, startIndex, s.horizontalAngle); - SendAngle16(data, startIndex += 2, s.verticalAngle); - SendSingle100(data, startIndex += 2, s.distance); -} +// void NetworkSync::SendSpherical16(unsigned char *data, int startIndex, +// Spherical s) { +// SendAngle16(data, startIndex, s.horizontalAngle); +// SendAngle16(data, startIndex += 2, s.verticalAngle); +// SendSingle100(data, startIndex += 2, s.distance); +// } -void NetworkSync::SendSpherical32(unsigned char *data, int startIndex, - Spherical s) { - SendAngle32(data, startIndex, s.horizontalAngle); - SendAngle32(data, startIndex += 4, s.verticalAngle); - SendSingle100(data, startIndex += 4, s.distance); -} +// void NetworkSync::SendSpherical32(unsigned char *data, int startIndex, +// Spherical s) { +// SendAngle32(data, startIndex, s.horizontalAngle); +// SendAngle32(data, startIndex += 4, s.verticalAngle); +// SendSingle100(data, startIndex += 4, s.distance); +// } void NetworkSync::SendQuat32(unsigned char *data, int startIndex, const Quaternion q) { @@ -169,7 +169,7 @@ void NetworkSync::PublishRelativeObject(SendBuffer sendBuffer, UInt8 parentId, Pose_Position, }; unsigned int ix = 4; - SendSpherical32(buffer, ix, object->position); + SendSpherical(buffer, ix, object->position); // SendVector3(buffer, ix, worldPosition3); sendBuffer(buffer, bufferSize); } diff --git a/NetworkSync.h b/NetworkSync.h index 914a9d0..9368d06 100644 --- a/NetworkSync.h +++ b/NetworkSync.h @@ -17,7 +17,7 @@ public: /// @brief Inform that the given object is no longer being tracked /// @param obj virtual void DestroyObject(InterestingThing *obj) = 0; - + virtual void NewObject(InterestingThing *obj){}; /// @brief The id of a Pose message static const char PoseMsg = 0x10; static const char PoseTypeMsg = 0x11; @@ -41,6 +41,7 @@ public: void SendPoseMsg(SendBuffer sendBuffer, Roboid *roboid); void SendDestroyObject(SendBuffer sendBuffer, InterestingThing *obj); + void PublishNewObject(); void PublishTrackedObjects(SendBuffer sendBuffer, InterestingThing **objects); @@ -57,10 +58,10 @@ protected: void SendInt32(unsigned char *data, unsigned int startIndex, Int32 value); void SendAngle8(unsigned char *data, unsigned int startIndex, const float value); - void SendAngle16(unsigned char *data, unsigned int startIndex, - const float value); - void SendAngle32(unsigned char *data, unsigned int startIndex, - const float value); + // void SendAngle16(unsigned char *data, unsigned int startIndex, + // const float value); + // void SendAngle32(unsigned char *data, unsigned int startIndex, + // const float value); void SendVector3(unsigned char *data, unsigned int startIndex, const Vector3 v); void SendQuaternion(unsigned char *data, const int startIndex, @@ -68,8 +69,8 @@ protected: void SendPolar(unsigned char *data, unsigned char *startIndex, Polar p); void SendSpherical(unsigned char *data, int startIndex, Spherical s); - void SendSpherical16(unsigned char *data, int startIndex, Spherical s); - void SendSpherical32(unsigned char *data, int startIndex, Spherical s); + // void SendSpherical16(unsigned char *data, int startIndex, Spherical s); + // void SendSpherical32(unsigned char *data, int startIndex, Spherical s); void SendQuat32(unsigned char *data, int startIndex, const Quaternion q); };