From e46096c70879c5c1a770ecae7da37f543bcca9e8 Mon Sep 17 00:00:00 2001 From: Joan Sola <jsola@iri.upc.edu> Date: Tue, 18 Jan 2022 20:26:56 +0100 Subject: [PATCH] Cosmetics in print() --- src/sensor/sensor_base.cpp | 4 ++-- src/state_block/has_state_blocks.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sensor/sensor_base.cpp b/src/sensor/sensor_base.cpp index 7c9732d76..0e649ec5c 100644 --- a/src/sensor/sensor_base.cpp +++ b/src/sensor/sensor_base.cpp @@ -458,7 +458,7 @@ void SensorBase::printState (bool _metric, bool _state_blocks, std::ostream& _st { auto sb = getStateBlockDynamic(key); if (sb) - _stream << _tabs << " " << key << "[" << (sb->isFixed() ? "Fix" : "Est") << "] = ( " + _stream << _tabs << " " << key << " [" << (sb->isFixed() ? "Fix" : "Est") << "] = ( " << std::setprecision(3) << sb->getState().transpose() << " )" << " @ " << sb << std::endl; } } @@ -474,7 +474,7 @@ void SensorBase::printState (bool _metric, bool _state_blocks, std::ostream& _st { const auto &sb = getStateBlockDynamic(key); if (sb) - _stream << " " << key << "[" << (sb->isFixed() ? "Fix" : "Est") << "] @ " << sb; + _stream << " " << key << " [" << (sb->isFixed() ? "Fix" : "Est") << "] @ " << sb; } _stream << std::endl; } diff --git a/src/state_block/has_state_blocks.cpp b/src/state_block/has_state_blocks.cpp index bd800ab2e..36cada937 100644 --- a/src/state_block/has_state_blocks.cpp +++ b/src/state_block/has_state_blocks.cpp @@ -84,7 +84,7 @@ void HasStateBlocks::printState (bool _metric, bool _state_blocks, std::ostream& auto sb = getStateBlock(key); if (sb) _stream << _tabs << " " << key - << "[" << (sb->isFixed() ? "Fix" : "Est") + << " [" << (sb->isFixed() ? "Fix" : "Est") << "] = ( " << std::setprecision(3) << sb->getState().transpose() << " )" << " @ " << sb << std::endl; } @@ -103,7 +103,7 @@ void HasStateBlocks::printState (bool _metric, bool _state_blocks, std::ostream& const auto &sb = getStateBlock(key); if (sb) _stream << " " << key - << "[" << (sb->isFixed() ? "Fix" : "Est") + << " [" << (sb->isFixed() ? "Fix" : "Est") << "] @ " << sb; } _stream << std::endl; -- GitLab