Skip to content
Snippets Groups Projects
Commit 02ff391e authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Merge branch 'fix_setfill' into 'master'

Fix std::setfill so that we always leave the ctout state with  a space fill

See merge request mobile_robotics/wolf!230
parents 98ab3b6e 47c4b635
No related branches found
No related tags found
1 merge request!230Fix std::setfill so that we always leave the ctout state with a space fill
...@@ -364,6 +364,7 @@ TEST(Odom2D, KF_callback) ...@@ -364,6 +364,7 @@ TEST(Odom2D, KF_callback)
std::cout << "capture ts: " << capture->getTimeStamp() << " - " << capture->getTimeStamp().get(); std::cout << "capture ts: " << capture->getTimeStamp() << " - " << capture->getTimeStamp().get();
std::cout << "nsec: " << capture->getTimeStamp().getNanoSeconds() << std::endl; std::cout << "nsec: " << capture->getTimeStamp().getNanoSeconds() << std::endl;
std::cout << "filled nsec: " << std::setfill('0') << std::setw(9) << std::right << capture->getTimeStamp().getNanoSeconds() << std::endl; std::cout << "filled nsec: " << std::setfill('0') << std::setw(9) << std::right << capture->getTimeStamp().getNanoSeconds() << std::endl;
std::cout << std::setfill(' ');
// Processor // Processor
sensor_odom2d->process(capture); sensor_odom2d->process(capture);
......
...@@ -6,6 +6,7 @@ namespace wolf { ...@@ -6,6 +6,7 @@ namespace wolf {
std::ostream& operator<<(std::ostream& os, const TimeStamp& _ts) std::ostream& operator<<(std::ostream& os, const TimeStamp& _ts)
{ {
os << _ts.getSeconds() << "." << std::setfill('0') << std::setw(9) << std::right <<_ts.getNanoSeconds(); // write obj to stream os << _ts.getSeconds() << "." << std::setfill('0') << std::setw(9) << std::right <<_ts.getNanoSeconds(); // write obj to stream
os << std::setfill(' ');
return os; return os;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment