Skip to content
Snippets Groups Projects
Commit d12f691f authored by Hoop77's avatar Hoop77
Browse files

-

parent 03324af6
Branches
No related merge requests found
...@@ -78,6 +78,7 @@ private: ...@@ -78,6 +78,7 @@ private:
void stmDataCallback(const stmDataMsg::ConstPtr & inMsg); void stmDataCallback(const stmDataMsg::ConstPtr & inMsg);
void ussDataCallback(const ussDataMsg::ConstPtr & inMsg); void ussDataCallback(const ussDataMsg::ConstPtr & inMsg);
}; };
} }
#endif //MODULES_LOGGING_H #endif //MODULES_LOGGING_H
...@@ -49,9 +49,12 @@ void Logging::onInit() ...@@ -49,9 +49,12 @@ void Logging::onInit()
loggingServer->advertiseService( loggingServer->advertiseService(
[this](const auto & clientEndpoint, auto & requestMessage, auto & responseMessage) [this](const auto & clientEndpoint, auto & requestMessage, auto & responseMessage)
{ {
std::cout << "\n----------------------------\n"
<< "!!! CONNECTED !!!\n"
<< "\n----------------------------\n\n";
std::lock_guard<std::mutex> lock{loggingMutex}; std::lock_guard<std::mutex> lock{loggingMutex};
responseMessage = networking::utils::stringFromStreambuf(loggingBuffer, responseMessage = networking::utils::stringFromStreambuf(
std::min(loggingBuffer.size(), MAX_MESSAGE_SIZE)); loggingBuffer, std::min(loggingBuffer.size(), MAX_MESSAGE_SIZE));
}); });
NODELET_INFO("Logging::onInit -- END"); NODELET_INFO("Logging::onInit -- END");
...@@ -106,8 +109,9 @@ void Logging::stmDataCallback(const stmDataMsg::ConstPtr & inMsg) ...@@ -106,8 +109,9 @@ void Logging::stmDataCallback(const stmDataMsg::ConstPtr & inMsg)
void Logging::ussDataCallback(const ussDataMsg::ConstPtr & inMsg) void Logging::ussDataCallback(const ussDataMsg::ConstPtr & inMsg)
{ {
std::cout << "Logging received new uss data ( ).\n"; auto distance = std::to_string(inMsg->distance);
logMessage(std::string{"uss [distance]: "} + std::to_string(inMsg->distance)); std::cout << "Logging received new uss data ( distance: " << distance << " ).\n";
logMessage(std::string{"uss [distance]: "} + distance);
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment