Skip to content
Snippets Groups Projects
Commit a78f7e2d authored by Markus Grotz's avatar Markus Grotz
Browse files

added mutex for ArmarXPlotter

parent b172567d
No related branches found
No related tags found
No related merge requests found
......@@ -238,6 +238,8 @@ namespace armarx
void ArmarXPlotter::toggleLogging(bool toggled)
{
std::lock_guard<std::mutex> lock(mutex);
if (toggled)
{
std::string filename = "datalog-" + IceUtil::Time::now().toDateTime() + ".csv";
......@@ -266,6 +268,8 @@ namespace armarx
}
else
{
logstream.flush();
ARMARX_INFO << "done writing log";
logstream.close();
}
}
......
......@@ -49,6 +49,7 @@
#include <vector>
#include <fstream>
#include <mutex>
//forward declarations
class QwtPlotCurve;
......@@ -209,6 +210,8 @@ namespace armarx
std::map<std::string, QwtThermo*> bars;
void clearBarList();
std::mutex mutex;
};
......
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