Commit 34cc5f4e authored by Alex Kushleyev's avatar Alex Kushleyev
Browse files

add error print in case tof camera autodetection fails

parent fe08a0c5
Pipeline #241866715 failed with stages
in 1 minute and 16 seconds
......@@ -108,16 +108,21 @@ int Hal3MainEnter(int argc, char* const argv[], ros::NodeHandle rosNodeHandle)
status = g_pCameraHAL3->Initialize();
}
if (cameraid == -1) //autodetect TOF camera id
if ((status == 0) && (cameraid == -1)) //autodetect TOF camera id
{
printf("\nUser specified TOF camera id = -1.. Autodetecting..");
cameraid = g_pCameraHAL3->FindTofCamera();
printf("\nFound TOF camera with ID %d\n",cameraid);
}
if (cameraid == -1)
{
status = -1;
if (cameraid == -1)
{
printf("\n\nERROR: Could not autodetect TOF camera\n");
status = -1;
}
else
{
printf("\nFound TOF camera with ID %d\n",cameraid);
status = 0;
}
}
if (status == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment