Skip to content

Commit

Permalink
Fix timestamp logging for the cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRomualdi authored and ergocub committed Nov 3, 2023
1 parent e5c55ce commit edc058e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions devices/YarpRobotLoggerDevice/src/YarpRobotLoggerDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ VISITABLE_STRUCT(TextLoggingEntry,
yarprun_timestamp,
local_timestamp);

void findAndReplaceAll(std::string& data, std::string toSearch, std::string replaceStr)
void findAndReplaceAll(std::string& data, const std::string& toSearch, const std::string& replaceStr)
{
// Get the first occurrence
size_t pos = data.find(toSearch);
Expand Down Expand Up @@ -1120,8 +1120,8 @@ void YarpRobotLoggerDevice::recordVideo(const std::string& cameraName, VideoWrit
std::lock_guard lock(m_bufferManagerMutex);

// TODO here we may save the frame itself
m_bufferManager.push_back(time.count(),
time.count(),
m_bufferManager.push_back(std::chrono::duration<double>(time).count(),
std::chrono::duration<double>(time).count(),
"camera::" + cameraName + "::rgb");
}
}
Expand Down Expand Up @@ -1167,8 +1167,8 @@ void YarpRobotLoggerDevice::recordVideo(const std::string& cameraName, VideoWrit
std::lock_guard lock(m_bufferManagerMutex);

// TODO here we may save the frame itself
m_bufferManager.push_back(time.count(),
time.count(),
m_bufferManager.push_back(std::chrono::duration<double>(time).count(),
std::chrono::duration<double>(time).count(),
"camera::" + cameraName + "::depth");
}
}
Expand Down

0 comments on commit edc058e

Please sign in to comment.