Skip to content

Commit

Permalink
BUG: explicity set position index
Browse files Browse the repository at this point in the history
  • Loading branch information
simonoxen committed Mar 2, 2023
1 parent 1d33b39 commit d01085e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/OpenEphysIGTLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ void OpenIGTLinkLogic::sendPointMessage(String deviceName, Array<float> values)
{
igtl::PointMessage::Pointer pointMsg = igtl::PointMessage::New();
pointMsg->SetDeviceName(deviceName.toStdString());
for (int i = 0; i < values.size();)
for (int i = 0; i < values.size(); i += 3)
{
igtl::PointElement::Pointer point = igtl::PointElement::New();
point->SetPosition(values[i++], values[i++], values[i++]);
point->SetPosition(values[i], values[i + 1], values[i + 2]);
point->SetName(std::to_string(i / 3).c_str());
point->SetGroupName("GROUP_0");
point->SetRGBA(0x00, 0x00, 0xFF, 0xFF);
Expand Down

0 comments on commit d01085e

Please sign in to comment.