diff --git a/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp b/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp index 759b4cb477dbeeb79773b0cea1ed8ec93dec9e06..df065c634b00903e407290caee31218b76d64486 100644 --- a/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp +++ b/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp @@ -234,7 +234,7 @@ namespace armarx { logstream << "Timestamp"; - for (auto& channel : selectedChannels) + for (auto & channel : selectedChannels) { logstream << "," << channel.toStdString(); } @@ -740,11 +740,15 @@ namespace armarx if (logstream.is_open() && dataMaptoAppend.size() > 0) { - logstream << (time - logStartTime).toMilliSecondsDouble(); + logstream << (time - logStartTime).toMilliSecondsDouble() << ","; - for (const auto& elem : dataMaptoAppend) + for (auto& channel : selectedChannels) { - logstream << "," /*<< elem.first << ","*/ << elem.second->getOutputValueOnly(); + logstream << dataMaptoAppend.at(channel.toStdString())->Variant::getOutputValueOnly(); + if (!selectedChannels.endsWith(channel)) + { + logstream << ","; + } } logstream << std::endl;