Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed strings in zcm #1025

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void processData(const string& name, zcm_field_type_t type, const void* d
v->numerics.emplace_back(name, toDouble<bool>(data));
break;
case ZCM_FIELD_STRING:
v->strings.emplace_back(name, string((const char*)data));
v->strings.emplace_back(name, string(*((const char**)data)));
break;
case ZCM_FIELD_USER_TYPE:
assert(false && "Should not be possble");
Expand Down Expand Up @@ -267,7 +267,7 @@ bool DataLoadZcm::readDataFromFile(FileLoadInfo* info, PlotDataMapRef& plot_data

vector<pair<string, double>> numerics;
vector<pair<string, string>> strings;
ProcessUsr usr = { numerics, strings };
ProcessUsr usr { numerics, strings };

auto processEvent = [&](const zcm::LogEvent* evt) {
if (_selected_channels.find(evt->channel) == _selected_channels.end())
Expand Down
2 changes: 1 addition & 1 deletion plotjuggler_plugins/PluginsZcm/datastream_zcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void DataStreamZcm::processData(const string& name, zcm_field_type_t type,
me->_numerics.emplace_back(name, toDouble<bool>(data));
break;
case ZCM_FIELD_STRING:
me->_strings.emplace_back(name, string((const char*)data));
me->_strings.emplace_back(name, string(*((const char**)data)));
break;
case ZCM_FIELD_USER_TYPE:
assert(false && "Should not be possble");
Expand Down
Loading