Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Nov 29, 2023
1 parent 986b979 commit 4278be8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/v2i-hub/TelematicBridgePlugin/src/TelematicUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ namespace TelematicBridge
{
auto msgStr = natsMsg_GetData(msg);
auto root = parseJson(msgStr);
if (object && root.isMember(TOPICS) && root[TOPICS].isArray())
if (object && root.isMember(TOPICS_KEY) && root[TOPICS_KEY].isArray())
{
auto obj = (TelematicUnit *)object;
// clear old selected topics
obj->clearSelectedTopics();

// update selected topics with selected topics from latest request
for (auto itr = root[TOPICS].begin(); itr != root[TOPICS].end(); itr++)
for (auto itr = root[TOPICS_KEY].begin(); itr != root[TOPICS_KEY].end(); itr++)
{
obj->addSelectedTopic(itr->asString());
}
Expand Down

0 comments on commit 4278be8

Please sign in to comment.