Skip to content

Commit

Permalink
Merge branch 'zcm-strings'
Browse files Browse the repository at this point in the history
  • Loading branch information
jbendes committed Nov 22, 2024
2 parents 5649838 + fd84957 commit add5819
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,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 @@ -269,7 +269,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

0 comments on commit add5819

Please sign in to comment.