1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 01:50:46 +02:00

Improved logging and formatting

This commit is contained in:
Simon Rasmussen
2017-02-16 22:51:44 +01:00
parent 68e72e393d
commit 70cfe6cad3

View File

@@ -16,18 +16,9 @@ public:
{
}
void setup_producer()
{
_stream.connect();
}
void teardown_producer()
{
_stream.disconnect();
}
void stop_producer()
{
_stream.disconnect();
}
void setup_producer() { _stream.connect(); }
void teardown_producer() { _stream.disconnect(); }
void stop_producer() { _stream.disconnect(); }
bool try_get(std::vector<unique_ptr<T> >& products)
{
@@ -39,9 +30,12 @@ public:
//LOG_DEBUG("Read %d bytes from stream", len);
if (len < 1) {
if (len == 0) {
LOG_WARN("Read nothing from stream");
return false;
} else if (len < 0) {
LOG_WARN("Stream closed");
return false;
}
BinParser bp(buf, static_cast<size_t>(len));