Skip to content

Commit

Permalink
get_status_node should return false (quietly) when the node is not co…
Browse files Browse the repository at this point in the history
…nnected
  • Loading branch information
radfordi committed May 31, 2019
1 parent e8380a5 commit 3a2fa25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tm2/tm-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,8 @@ namespace librealsense

perc::TrackingData::RelativePose rel_pose;
auto status = _tm_dev->GetStaticNode(guid.data(), rel_pose);
if (status == Status::ERROR_FW_INTERNAL) // non-fatal; just means the node is not available
return false;
if (status == perc::Status::SUCCESS)
{
pos[0] = rel_pose.translation.x;
Expand All @@ -1184,12 +1186,10 @@ namespace librealsense
orient_quat[1] = rel_pose.rotation.j;
orient_quat[2] = rel_pose.rotation.k;
orient_quat[3] = rel_pose.rotation.r;
return true;
}
else
{
LOG_WARNING("Get static node failed, status =" << (uint32_t)status);
}
return (status == Status::SUCCESS);

throw io_exception(to_string() << "Unexpected error getting static node, status = " << (uint32_t)status);
}


Expand Down

0 comments on commit 3a2fa25

Please sign in to comment.