mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 02:23:34 +08:00
Removed sstream from uc_frame.cpp
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <sstream>
|
|
||||||
#include <uavcan/transport/frame.hpp>
|
#include <uavcan/transport/frame.hpp>
|
||||||
#include <uavcan/transport/can_io.hpp>
|
#include <uavcan/transport/can_io.hpp>
|
||||||
|
|
||||||
@@ -247,9 +246,13 @@ bool RxFrame::parse(const CanRxFrame& can_frame)
|
|||||||
|
|
||||||
std::string RxFrame::toString() const
|
std::string RxFrame::toString() const
|
||||||
{
|
{
|
||||||
std::ostringstream os; // C++03 doesn't support long long, so we need ostream to print the timestamp
|
std::string out = Frame::toString();
|
||||||
os << Frame::toString() << " ts_m=" << ts_mono_ << " ts_utc=" << ts_utc_ << " iface=" << int(iface_index_);
|
out.reserve(128);
|
||||||
return os.str();
|
out += " ts_m=" + ts_mono_.toString();
|
||||||
|
out += " ts_utc=" + ts_utc_.toString();
|
||||||
|
out += " iface=";
|
||||||
|
out += '0' + iface_index_;
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user