From 200fffea8fe5c49209f60efbdf68411e92bf46d4 Mon Sep 17 00:00:00 2001 From: Ricardas Jonaitis Date: Mon, 18 Mar 2024 13:22:20 +0200 Subject: [PATCH] Fix windows compilation --- src/protocols/SamplesPacket.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/protocols/SamplesPacket.h b/src/protocols/SamplesPacket.h index a9e13d136..c2e29158e 100644 --- a/src/protocols/SamplesPacket.h +++ b/src/protocols/SamplesPacket.h @@ -14,7 +14,7 @@ template class SamplesPacket { public: /** The size of the structure that holds the sample packet information. */ - static constexpr int headerSize = sizeof(SamplesPacket); + static constexpr int headerSize = 3 * sizeof(uint8_t*) * chCount + sizeof(uint64_t) + sizeof(uint32_t)*4; // TODO: should be sizeof(SamplesPacket), but MSVC can't compile /** @brief Constructs the sample packet class. @@ -170,9 +170,8 @@ template class SamplesPacket } } + public: uint64_t timestamp; ///< The timestamp of the packet. - bool useTimestamp; ///< Whether to use the timestamp or not. - bool flush; ///< Whether to flush the whole packet early or not. private: uint8_t* head[chCount]; @@ -183,6 +182,9 @@ template class SamplesPacket uint32_t length; uint32_t mCapacity; uint8_t frameSize; + public: + bool useTimestamp; ///< Whether to use the timestamp or not. + bool flush; ///< Whether to flush the whole packet early or not. }; } // namespace lime