Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Dec 12, 2023
1 parent cfc7fd9 commit 7b4ed81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions plotjuggler_plugins/ParserROS/ros_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ inline void ParserROS::parseCovariance(const std::string& prefix, double& timest
std::array<double, N * N> cov;
for (auto& val : cov)
{
_deserializer->deserialize(RosMsgParser::FLOAT64).convert<double>();
val = _deserializer->deserialize(RosMsgParser::FLOAT64).convert<double>();
}
for (int i = 0; i < N; i++)
{
for (int j = i; j < N; j++)
{
const size_t index = i * N + j;
getSeries(fmt::format("{}[{};{}]", prefix, i, j))
.pushBack({ timestamp, cov[index] });
getSeries(fmt::format("{}[{};{}]", prefix, i, j)).pushBack({ timestamp, cov[index] });
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ class Deserializer
virtual void jump(size_t bytes) = 0;

// deserialize the current pointer into a variant (not a string)
virtual Variant deserialize(BuiltinType type) = 0;
[[nodiscard]] virtual Variant deserialize(BuiltinType type) = 0;

virtual Span<const uint8_t> deserializeByteSequence() = 0;
[[nodiscard]] virtual Span<const uint8_t> deserializeByteSequence() = 0;

// deserialize the current pointer into a string
virtual void deserializeString(std::string& out) = 0;

virtual uint32_t deserializeUInt32() = 0;
[[nodiscard]] virtual uint32_t deserializeUInt32() = 0;

virtual const uint8_t* getCurrentPtr() const = 0;
[[nodiscard]] virtual const uint8_t* getCurrentPtr() const = 0;

virtual size_t bytesLeft() const
[[nodiscard]] virtual size_t bytesLeft() const
{
return _buffer.size() - (getCurrentPtr() - _buffer.data());
}
Expand Down

0 comments on commit 7b4ed81

Please sign in to comment.